Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1751852pxb; Mon, 8 Mar 2021 05:40:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJybGA/yekNooqxSm6ZhpRhV6MVjNoS+gwlbEQ/8kbxgr5zQehtGzPxi/cPBWRBAjiEV5Vd9 X-Received: by 2002:a17:907:78d9:: with SMTP id kv25mr15319000ejc.415.1615210816145; Mon, 08 Mar 2021 05:40:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615210816; cv=none; d=google.com; s=arc-20160816; b=z6u8DMAkHmYNS7pEtpZwC9SplboWtTzTHWMnTWVvXiw2DY4HES3nvh4OzE/txNntxB 7ev1XebWaPp6eBaVgfN3VzmoRKyV7gMfwwCOf3nUbb4eVTa/oSCgF+XLek5M6mjqzSf1 BLGRYhFolAkH7QIdwbvLOZ1JW5BT3AQwEHNYeC0UcAquAkoWo4JcG/r+iWFPA1arkSTe L3Gnnh0UzLA7aYvhWF3aMnf+DzdxC92in584HI4c+b7h+O5rDI0UTyMVH6xOY0Q2NdEC 8Muu9+71nYN0oYmlM1OvLzlhjweqls/Z2LEIl+rCc1zBNVSPnBNebMUXsOYvLY0xX1p3 oU2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=4m/uD/j2c9l036aC93Z9eFEg2G/sv9PCT5D/JP3OoWo=; b=bVtsJUhhLsxocRvlTMWDxInmRHo1HzPAHRh2qg7Y2OKlxFOnVJBxRLZ0x0mHqr1LLm RNti5doptoSgqrFf/+vEsxtuyvrblIymQRV0X3S8n3jbr8JBLRL2+7/Gg+xd9SrYzqz4 njTXYJEJnohn5Rt3MZxor/FeB+6oM2LkZqogOHWp9hqSpOswYlb/oqbqwjrKPU9hFNx3 lC0Tylv58vxsrfHSR8xJW1okraCQDAQojG2dyotVzM8gCoSYcglVInTvkflPd2p89MwH fdpXdgYjH1mt7G8pGpDP5Y7l6KZ6NhYyX7dcTfvy3lZs4yQeG76qZLjGAzArWbMLF7QK K7EA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca3si6733443ejb.561.2021.03.08.05.39.53; Mon, 08 Mar 2021 05:40:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbhCHNiU (ORCPT + 99 others); Mon, 8 Mar 2021 08:38:20 -0500 Received: from www62.your-server.de ([213.133.104.62]:41230 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbhCHNh5 (ORCPT ); Mon, 8 Mar 2021 08:37:57 -0500 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lJG4j-000AJy-RM; Mon, 08 Mar 2021 14:37:33 +0100 Received: from [85.7.101.30] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJG4j-0008T9-F6; Mon, 08 Mar 2021 14:37:33 +0100 Subject: Re: [PATCH] tools include: Add __sum16 and __wsum definitions. To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Song Liu , linux-kernel@vger.kernel.org, Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , John Fastabend , KP Singh , Tiezhu Yang , netdev@vger.kernel.org, bpf@vger.kernel.org Cc: Stephane Eranian References: <20210307223024.4081067-1-irogers@google.com> From: Daniel Borkmann Message-ID: <4aa2a66d-b8e4-adfe-8b61-615d98012a65@iogearbox.net> Date: Mon, 8 Mar 2021 14:37:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20210307223024.4081067-1-irogers@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/26102/Mon Mar 8 13:03:13 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/7/21 11:30 PM, Ian Rogers wrote: > This adds definitions available in the uapi version. > > Explanation: > In the kernel include of types.h the uapi version is included. > In tools the uapi/linux/types.h and linux/types.h are distinct. > For BPF programs a definition of __wsum is needed by the generated > bpf_helpers.h. The definition comes either from a generated vmlinux.h or > from that may be transitively included from bpf.h. The > perf build prefers linux/types.h over uapi/linux/types.h for > *. To allow tools/perf/util/bpf_skel/bpf_prog_profiler.bpf.c > to compile with the same include path used for perf then these > definitions are necessary. > > There is likely a wider conversation about exactly how types.h should be > specified and the include order used by the perf build - it is somewhat > confusing that tools/include/uapi/linux/bpf.h is using the non-uapi > types.h. > > *see tools/perf/Makefile.config: > ... > INC_FLAGS += -I$(srctree)/tools/include/ > INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi > INC_FLAGS += -I$(srctree)/tools/include/uapi > ... > The include directories are scanned from left-to-right: > https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html > As tools/include/linux/types.h appears before > tools/include/uapi/linux/types.h then I say it is preferred. > > Signed-off-by: Ian Rogers Given more related to perf build infra, I presume Arnaldo would pick this one up? Thanks, Daniel