Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7091311ybl; Wed, 15 Jan 2020 15:29:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzS3Fz7yzPf9OvUva66GjpHzVwCquB+XlhLnH2xvxqA2H/Xzlr66xmAhZFj6zQiP4bS0mkF X-Received: by 2002:a05:6808:291:: with SMTP id z17mr1950726oic.94.1579130992241; Wed, 15 Jan 2020 15:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579130992; cv=none; d=google.com; s=arc-20160816; b=iMnRIKs2haKWYaFX+mOahEf7igCkTme7BKAhRunljdQcDeGxgi5DEXuib+aVZPw0hm N/YYKwZ8ltR3UqwiZxwbQJyj2q82K+ov7D6wt9l2N82FnJe/x5w3LlkylW0EHyFpOg4q pSkSg2bMZ/D/eUXzfuWiH4e/Hj4Sb/uyh9ADKjG8wHnxQucKlWBLbyMLsO72HlHDFl+9 IihqzZu2sQFXBf/soBV4B0oOSv7WWItlTQ8p4zT8UBe7n9KvgRoKUXYOVsNog6OuVoub YdTVe6yJIBYgbzApMZ+psGbp0HesbI4sAvBGVTQrtHHoBLCXm5Z7715Enn7YmcyQij3w ewGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=6gHyBZ8+XeG4963OEjkw03c1ZgmrL31FuTlHZYv52rM=; b=rdvexXehVgoDNBu8fQ3fiu7sqm3Z6MBA2OYFHgBphRvqmHDgPx3WDEBPHjhe2HWbcV yHiNUtKFPyiYRG0gxZn93NQE7Xp0Hnipk4g91/smUbRFGxcu9MS2NOxoswDr7ZX92/82 WWBc9PqBT4QS4+X9UNW4FISFgCL3AOzqVxuD5ooD9Z6xD4iVJYZjJGY20tTFtbfnflL8 RwTHXawuUCJ/G1nISxySVZJ2kwJ+L4Lf9LUAzYPnLNGesUUpT3LbwKTX5w6konntt9a5 L0GfOd8+w4SC7BgWSEXTVbtRi80KwIitLvAV6iXxzIyhLG6V/a2udz+mMbp44ZJTCuMq YW8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HJE2D3ZQ; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si11651296otp.131.2020.01.15.15.29.40; Wed, 15 Jan 2020 15:29: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=@redhat.com header.s=mimecast20190719 header.b=HJE2D3ZQ; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730196AbgAOWJ6 (ORCPT + 99 others); Wed, 15 Jan 2020 17:09:58 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38094 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729203AbgAOWJu (ORCPT ); Wed, 15 Jan 2020 17:09:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579126190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6gHyBZ8+XeG4963OEjkw03c1ZgmrL31FuTlHZYv52rM=; b=HJE2D3ZQRZBpK/IBIFWjmkHodBWv+TtKxgAkDWQGKWG7k2870qF9BRtCt3VnGswss1+V6/ Jxj/6SWNXG5sHeAZDqbxlMghOyECK3gDUHOMjnEdzl6eU/DpGvY9kw7Sf8ofoq4Z5ARh4V xc39oBlTpFqJZz5cRXrvxlxcXBj2BDE= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-HlcYD_VRNtmQrQu97Ts63A-1; Wed, 15 Jan 2020 17:09:48 -0500 X-MC-Unique: HlcYD_VRNtmQrQu97Ts63A-1 Received: by mail-lj1-f199.google.com with SMTP id z17so4454464ljz.2 for ; Wed, 15 Jan 2020 14:09:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=6gHyBZ8+XeG4963OEjkw03c1ZgmrL31FuTlHZYv52rM=; b=bdREPIq00xGpucf70Do7Ntww9mHnLZSWtOgF7palpAr3/V06Figh97ZgnO05Au4p8s i4QrbsVOHJH1+oUmthkxfK5vJPO7FBOhiViX1XRINWfMu4JLuL2xQCyfXBTisVbAIjTu lDH0R8LcML9d+ErUkyR9M5CCwJLtfVYeVkHCuMNGYINUXjEZL9fbrajlAz2tLl4S1wnv 8Kkg+XE7DgGtAnk1kwt2l34QE3+FHkYfIun2rrScMpDB1N29fPyWkLydCPIFMBEBVQJj ihktsk9d284aHucl6/HHCfB3fQTIJy2IAG7zpzROwaeuSD3sbXBJ+kzDbbcYpMoKbhFI VVaw== X-Gm-Message-State: APjAAAX7ZiOYrOq7272DcWE788/L7A4Ukvdhbk27rfk86phh4YxX/Jl7 L8LvZpkVmHviZESTQtmWiZC3hD+q867m3YlQQScKvmt1SlUHrLy3CKrW0+vHPRNTww0+uPp+vqd TD87LZ510skz0brt7sS8mX/uG X-Received: by 2002:a2e:8804:: with SMTP id x4mr309078ljh.187.1579126186246; Wed, 15 Jan 2020 14:09:46 -0800 (PST) X-Received: by 2002:a2e:8804:: with SMTP id x4mr309055ljh.187.1579126186024; Wed, 15 Jan 2020 14:09:46 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id r20sm9450459lfi.91.2020.01.15.14.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 14:09:45 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 970D01804D6; Wed, 15 Jan 2020 23:09:44 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov 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 In-Reply-To: <20200115211900.h44pvhe57szzzymc@ast-mbp.dhcp.thefacebook.com> References: <157909756858.1192265.6657542187065456112.stgit@toke.dk> <20200115211900.h44pvhe57szzzymc@ast-mbp.dhcp.thefacebook.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 15 Jan 2020 23:09:44 +0100 Message-ID: <87r200tlqv.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexei Starovoitov writes: > On Wed, Jan 15, 2020 at 03:12:48PM +0100, Toke H=C3=B8iland-J=C3=B8rgense= n wrote: >> The recent commit 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h= are >> taken from selftests dir") broke compilation against libbpf if it is ins= talled >> on the system, and $INCLUDEDIR/bpf is not in the include path. >>=20 >> Since having the bpf/ subdir of $INCLUDEDIR in the include path has neve= r 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 approac= h: >> 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/b= pf/, > 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_helpe= r_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 pr= actice. > There was nothing wrong about #include "bpf_helper_defs.h" in bpf_helpers= .h. OK, I'll take another look at that bit and see if I can get it to work with #include "bpf_helper_defs.h" and still function with the read-only tree (and avoid stale headers). -Toke