Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6989031ybl; Wed, 15 Jan 2020 13:33:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzEH9ppiZuOxTV03Cf8mM77fMq75UfvGaJ8ez6ZCe1Uq+bRLpzX1S9xFJWv7eXc3x0tTCBm X-Received: by 2002:a05:6808:c:: with SMTP id u12mr1578549oic.107.1579124032214; Wed, 15 Jan 2020 13:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579124032; cv=none; d=google.com; s=arc-20160816; b=TOMxCbEl7pFIQixGFNMppjyAnbs8L8RriYX5aR+x9VqaHXeXXwIz3tG9/L+zxdRgil gEA3LqcImoAJ7EFNrfACytBhwBN4mQUVWWdzz2DxDK8y63BZvd6+Uaoft5cDPattD1nc FBhLEliP03TxWSfD5+khmniYwepHRw/cTQiCQup+rYbrT1nUNJorWxIJjLiSYy4XJB6u IedJ7tBpxib2aN/tA1ohCj3FRxbdMBSSZHVzQuM1ZOjMPlQe01ZXBSgpjUVIAINnn1Za nkbAY2dzStGzrN9VYZQPPpuIaN+6LyKCqqNUX1nPOzDEjqe3Ixp1n1CiOt1cYTl6XhP+ /5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Sr5D3Vmy2L4zBjOZJ4kwZ5hGeIC3RIyoZkA5ktLyrSY=; b=iRljDkxAN+mTgRTtjWHHsHD1GcRiiRcMaS605U8y5DqdIo4tCPiL/7RzLtKnJ+V6+u QEjLyCGq2XLBeeo46MpPdA+0tihXPJpYuiWGxt3WKLKuiTzHjcYTyFylvdiNa/JHW7D8 dJRueRtvGpvtdttoikGRo+ChmiAZzxSP1fW3+giHMmQdJwKr4ugAZzlytwgP+bX853T7 QZJWI7YVduClzQK1e6AuEmU0bQodCkwzoE7nRosaC2Pr2UNgcX8RgcCHc+XOzviMXro1 a+tCVXYHiqhjjW3yl01xOnxm5Iab0lanGTGVwXc/ufAYAFjLo5nyo0Gx9ticzce+6KS4 GfOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CnNUH7zA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si9432636oix.48.2020.01.15.13.33.39; Wed, 15 Jan 2020 13:33:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CnNUH7zA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729982AbgAOVTG (ORCPT + 99 others); Wed, 15 Jan 2020 16:19:06 -0500 Received: from mail-pj1-f68.google.com ([209.85.216.68]:39600 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729950AbgAOVTF (ORCPT ); Wed, 15 Jan 2020 16:19:05 -0500 Received: by mail-pj1-f68.google.com with SMTP id e11so504404pjt.4; Wed, 15 Jan 2020 13:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Sr5D3Vmy2L4zBjOZJ4kwZ5hGeIC3RIyoZkA5ktLyrSY=; b=CnNUH7zAw+/bJk6LxlmjXA0sLWhAkxwwNLCsne1NlHcoEkQygRFgZH9U10USJfcOhR 8T5/jg7Ly270/Aq9oDjdpfz3wA9dMAuzncMMQ+c20kO4AONHvQJq/GiFrXkVXoIlDEab ITSwIntxIptfuIf3sXD3Kf+jCx5QIqGDw62NAhl1WX6uzHWEA7EynysNBzzmxNg9Qwe2 rWlocg/cEOxu5vjpbtyuQbf+k6s92MkR0O7atrXOfgppJMfBqn16k72wtPfvMw1vFCNh h4kSp03F4vvF/ymOCVf/u5qNxHUFQ1rRH+hLvIJ9SNmFW0IE8Q5JQtf0vH1StRCRqyru Ievg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Sr5D3Vmy2L4zBjOZJ4kwZ5hGeIC3RIyoZkA5ktLyrSY=; b=MiNwOi5Fp/TbRIK0vyBF71FU0CK3Gwvzdhj1ZcDdQNwRVi6C4XoJydigZeQRBkuoX+ fdx2mLbAFm3hz0k5aTa+RTQCW6OQKmjvsvN9jQ0mIi8GCW4EFZnSiIPWeWgmdNoXqtiE lqtp6i+nhwo6Quf/MaCaLF/4I/sZyWWgeF/C3Rb/1DfMzsB4d+0h2OilU5yUABZBIwWt go7tGqfCQlM6L/VG/QgcqTZuBsnKHL2wl4yq1uoQYK/BPGoTep2Ca/qegIwgvUBW5bso o4mWnFYVZzyCY1UzTVwwErdLNU29+0Lq0QyGlBECYEfUDMcuxYv1+d7m42W/KtZVxlkX Q/9Q== X-Gm-Message-State: APjAAAWFi07P7Mtgj/VEc/MXISs/P6e0DJE3PcXdYP6mWeX2G+OaA9WM IH3ojD32IW/7byoxr4R6O1I= X-Received: by 2002:a17:902:9003:: with SMTP id a3mr28071089plp.224.1579123144650; Wed, 15 Jan 2020 13:19:04 -0800 (PST) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::3:e760]) by smtp.gmail.com with ESMTPSA id x65sm24047764pfb.171.2020.01.15.13.19.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 13:19:03 -0800 (PST) Date: Wed, 15 Jan 2020 13:19:02 -0800 From: Alexei Starovoitov To: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH bpf-next v2 00/10] tools: Use consistent libbpf include paths everywhere Message-ID: <20200115211900.h44pvhe57szzzymc@ast-mbp.dhcp.thefacebook.com> References: <157909756858.1192265.6657542187065456112.stgit@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <157909756858.1192265.6657542187065456112.stgit@toke.dk> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 03:12:48PM +0100, Toke H?iland-J?rgensen wrote: > The recent commit 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are > taken from selftests dir") broke compilation against libbpf if it is installed > on the system, and $INCLUDEDIR/bpf is not in the include path. > > Since having the bpf/ subdir of $INCLUDEDIR in the include path has never been a > requirement for building against libbpf before, this needs to be fixed. One > option is to just revert the offending commit and figure out a different way to > achieve what it aims for. However, this series takes a different approach: > Changing all in-tree users of libbpf to consistently use a bpf/ prefix in > #include directives for header files from libbpf. I don't think such approach will work in all cases. Consider the user installing libbpf headers into /home/somebody/include/bpf/, passing that path to -I and trying to build bpf progs that do #include "bpf_helpers.h"... In the current shape of libbpf everything will compile fine, but after patch 8 of this series the compiler will not find bpf/bpf_helper_defs.h. So I think we have no choice, but to revert that part of Andrii's patch. Note that doing #include "" for additional library headers is a common practice. There was nothing wrong about #include "bpf_helper_defs.h" in bpf_helpers.h.