Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1753938pxb; Mon, 8 Mar 2021 05:43:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZDfNmlI4KVLhr0AwcHSBZ94T29sOWuq4lpueMzHaq4P0u3AJg/VVXoYXP94w/V2u/TfMV X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr14825919ejs.81.1615211013577; Mon, 08 Mar 2021 05:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615211013; cv=none; d=google.com; s=arc-20160816; b=sZ1g7I4sp76n8RRkdAK0cbzuLLERURZ9rRE/URu9ZCh7GNOaVn4XoBd2P2HiJtNvEn 7Ir18bxdsSCilY0A9YQaBaoI6lPlHyFiE6uXYk0pspAKJ5YljlR9n08YzqzK0mFHmhby aOZPJqjw3K+4tMHJ5vXY4zz0WKLr2xVtQ+8LoantsEtEo8btSEyYJQUZ55B/hDvMwGr2 hsobMSsY96u5cKpD0MhVfXuNFQrCTkzd5y5eb1MYhG71VnE6YKt8rmy9LQ+EZFO/DnBQ SestPPgHe9IgAcsKUbsr3kTFTz2NB7EZ6YBcg/hkSaNXXOWzZtz+c6M156zv7qKN5Bic iokQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cTOIvm9Lmxi57+G4IT+UGruf4085V5KGWnPQLq2ULdg=; b=cxwUm3KuJhI9VDudpbDMMMl3jPN8Z4jzMwNkdW3Hx5MZ21cNIuXqAjaKpIMlKg2/Ws e7ejZ91oz6XgvYjWkuIACfUAmKDnzMk7vfV8A31I2WK9jcC/7JpR8Eaa/59xOgZgNuIy fLWrttlvrOP1S6umgx09nUs0YHQdjhQC8uPy5R3r3qlMb7H7P2vnC9bRhU7OXttG9uH1 iUxP+So0aQ3P4a41H/3EnT/JVDQrDKM4fLqQjq9/ZLcSIdRU9Vumnb3Bjal8qYanUHa8 G8Tv40WZcaA/uEF5Y4XsreDXn/zIV2xTOJ74OGwZyz12sFZV7GsxAgrb6TiXUOKEKVaE 2R6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qafNv49/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si7894438edf.287.2021.03.08.05.43.11; Mon, 08 Mar 2021 05:43:33 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qafNv49/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbhCHNmC (ORCPT + 99 others); Mon, 8 Mar 2021 08:42:02 -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: linux-kernel@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