From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49B2FC433E6 for ; Mon, 8 Mar 2021 13:44:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B2F0651CD for ; Mon, 8 Mar 2021 13:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbhCHNmD (ORCPT ); Mon, 8 Mar 2021 08:42:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:33282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhCHNlh (ORCPT ); Mon, 8 Mar 2021 08:41:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 298E065100; Mon, 8 Mar 2021 13:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615210897; bh=VJUKujo7WxafrOc8jPvmlgV1PGGLFcyoKaimjk+JkbI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qafNv49/9sAq64knyWCJuaryRmCy9UedUNxRal+C/ORVyFogRcMJRyGS6b0VLyt5S l01/0XZfBjpNbq6jHvpykfvYPVkFMd2qZtjtzWGQc1lg5CQDexK2mxUs3JLP+LwAqB k7D2CL5uLJNWGspYwGDTN/TSDBsHjNsPx2LhCLPQnhqxr7a3gsbDmBMojuGXfNHS4J QWap0loHYZ5ZP3a3U1BDc9FLL/VfmXHiPJmzpXK5oDjw0OZEJTypjQXbxQe9iTpNOS M4yN+b7zxO4CMywHcI79NyziACG2PlZMToQcyCg25B8mA7wQKvvsYPc6vSIUPvPept Qx8dDNfmVnsMQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 1234940647; Mon, 8 Mar 2021 10:41:34 -0300 (-03) Date: Mon, 8 Mar 2021 10:41:34 -0300 From: Arnaldo Carvalho de Melo To: Daniel Borkmann Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , 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, Stephane Eranian Subject: Re: [PATCH] tools include: Add __sum16 and __wsum definitions. Message-ID: References: <20210307223024.4081067-1-irogers@google.com> <4aa2a66d-b8e4-adfe-8b61-615d98012a65@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4aa2a66d-b8e4-adfe-8b61-615d98012a65@iogearbox.net> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Em Mon, Mar 08, 2021 at 02:37:32PM +0100, Daniel Borkmann escreveu: > 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? I'll process it. - Arnaldo