Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8790446ybl; Fri, 17 Jan 2020 00:59:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwQ2koVaxiH1rqj4AMHKwqmqkuOr9Uvyknlft0/ixB7jbi69FHABRuiA8cO/3mHhNxqcKZ1 X-Received: by 2002:a05:6830:138b:: with SMTP id d11mr5105048otq.38.1579251551119; Fri, 17 Jan 2020 00:59:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579251551; cv=none; d=google.com; s=arc-20160816; b=J9wmxfVukMWh97bp0BPz47hDuciUwZjpjC5anfY/XN+0KHy+boHS56NnDLQxKWoARH uG3/5HSB2U7QaAU03BLY3O9Xc1M6VjxedrFWubkJqUFfuj5eOgZ+xAJ7292Bd03aNxso g6u+ZMr/7fIsgWlPEDtYjTSXEP9fY4Fu4pQl9EOK/L/RhxXtvL3nirhiNzHOWUscpK5c C5IlGePHscyaajmd0frfeqMJ003Fs19s/eDuphIMDG+P4lBP+nDiQ7X+WWY3fA0GPnKV htv2BuhTUyDG7x2aQzE9gOEV8o2AtC/yIiRoAlg8bHKUPajjlgwK2wf/h7tzVHKdFXdm N0Xg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=5wGVm7vGifojmQs18rmKxAMnZ1ofaqDbsZAnJ2KgVM8=; b=SxuEp/1N7L9PMDHWJ/HGNGu7qZWX7C/MH1+dm4PJ+eVNxJSE9s+kNpSHc6jWHi/sfo ykGUaMhWr7B0YWlbXw9mVF7np7MWVxzjw26Yn0XX6Ue7AcWzqWjM/9+oMyknPcM200lO vUJDC9m31iayRAj6e+DERmX+woZrMD7U7RV1YFBdqPC55ZcCHmtFyePWQCNBxHEx2jHV UvnSkHAtsfsJCpRl77qeS5SVIJCot+ypC2w4Dg6Xn1X866s3AAGPN1N+nI26HLacPs8f NMisKvZUP4RHAKOrLw76jcm8qNHOf2jgXy8HblNxK7cNn7rc4ayPZBDy7AT6BVOv9idE 3B8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z8gRccMg; 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 c7si15671465oto.305.2020.01.17.00.58.58; Fri, 17 Jan 2020 00:59:11 -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=Z8gRccMg; 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 S1729347AbgAQI5q (ORCPT + 99 others); Fri, 17 Jan 2020 03:57:46 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49070 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726897AbgAQI5o (ORCPT ); Fri, 17 Jan 2020 03:57:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579251461; 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=5wGVm7vGifojmQs18rmKxAMnZ1ofaqDbsZAnJ2KgVM8=; b=Z8gRccMgWKxmhcgATAsxjnPG7ZJeUjB36/8jg3uC3HTCZ629w2TCD05qOGKtAS4qTlf/b0 8sHV+nNAlBw7b58V8EzLDJsJaPKBrkXI58NvM/+P/FJ86jvjilwSU/6m7hTwKOVe2g7PXK w/b2MdlHYEh3ODfBiuW6Qn0FNzWchxo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-bAqU4dETMIa9LQgbw4bJAg-1; Fri, 17 Jan 2020 03:57:40 -0500 X-MC-Unique: bAqU4dETMIa9LQgbw4bJAg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F022BDB60; Fri, 17 Jan 2020 08:57:36 +0000 (UTC) Received: from carbon (ovpn-200-25.brq.redhat.com [10.40.200.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80A8219C5B; Fri, 17 Jan 2020 08:57:24 +0000 (UTC) Date: Fri, 17 Jan 2020 09:57:21 +0100 From: Jesper Dangaard Brouer To: Alexei Starovoitov Cc: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , 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, brouer@redhat.com Subject: Re: [PATCH bpf-next v3 00/11] tools: Use consistent libbpf include paths everywhere Message-ID: <20200117095721.0030f414@carbon> In-Reply-To: <20200117041431.h7vvc32fungenyhg@ast-mbp.dhcp.thefacebook.com> References: <157918093154.1357254.7616059374996162336.stgit@toke.dk> <20200117041431.h7vvc32fungenyhg@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Jan 2020 20:14:32 -0800 Alexei Starovoitov wrote: > On Thu, Jan 16, 2020 at 02:22:11PM +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 in= stalled > > 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 nev= er 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 differen= t way to > > achieve what it aims for. =20 >=20 > The offending commit has been in the tree for a week. So I applied Andrii= 's > revert of that change. It reintroduced the build dependency issue, but we= lived > with it for long time, so we can take time to fix it cleanly. > I suggest to focus on that build dependency first. >=20 > > 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. =20 >=20 > I'm not sure it's a good idea. It feels nice, but think of a message we're > sending to everyone. We will get spamed with question: does bpf community > require all libbpf users to use bpf/ prefix ? What should be our answer? The answer should be: Yes. When libbpf install the header files the are installed under bpf/ prefix. It is very confusing that samples and selftests can include libbpf.h without this prefix. Even worse including "bpf.h" pickup the libbpf version bpf/bpf.h, which have caused confusion. The only reason for the direct "libbpf.h" include is historical, as there used-to-be a local file for that. > Require or recommend? If require.. what for? It works as-is. If recommend= then > why suddenly we're changing all files in selftests and samples? > There is no good answer here. I think we should leave the things as-is. I strongly believe we should correct this. It doesn't make sense that someone copying out a sample or selftests, into a git-submodule libbpf (or distro installed libbpf-devel) have to understand that they have to update the include path for all the libbpf header files. --=20 Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer