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=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 901E2C33CB2 for ; Wed, 15 Jan 2020 21:19:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64CDD24695 for ; Wed, 15 Jan 2020 21:19:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CnNUH7zA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729970AbgAOVTG (ORCPT ); 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-Google-Smtp-Source: APXvYqzTB/kQWcNCbH6qWL8ALjnNfda6sZfEu5yGyPZ46PNXpF3lLh5Pnl9X61gJaRhkzWLyOUbcvg== 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-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@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.