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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 02B97C32771 for ; Wed, 15 Jan 2020 22:10:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C4DEB2467E for ; Wed, 15 Jan 2020 22:10:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OaRv6SAk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730507AbgAOWKe (ORCPT ); Wed, 15 Jan 2020 17:10:34 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30401 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730479AbgAOWKe (ORCPT ); Wed, 15 Jan 2020 17:10:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579126232; 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=LWQgt+DnfJs1UobRSdbBwxSCnfmXDMiH/Jey6CvGz7s=; b=OaRv6SAkpYDpRFht+xtVrulUMxOjOfz/SZykAPzpw26kCEVr16fYkXJFbHrzcq9Rjui2T/ yGErWNoBEbKLOMs+scxO0gnkAtL1oOCiMt11glfJelV/QcQQkrx9J2OwguJL0cxXSJsEMI 8Yb2AjS58/fslAcOw9nbmufS6APtZGg= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-329-w4yb6qpaMqGO134YYB3BpA-1; Wed, 15 Jan 2020 17:10:31 -0500 X-MC-Unique: w4yb6qpaMqGO134YYB3BpA-1 Received: by mail-lj1-f197.google.com with SMTP id h23so4466546ljk.14 for ; Wed, 15 Jan 2020 14:10:31 -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=LWQgt+DnfJs1UobRSdbBwxSCnfmXDMiH/Jey6CvGz7s=; b=ec/iRthPqp8gZgmqVOQ2YWQx0ACxgo4imFj9vnk4JZkA5Pl8zSuKhdoiu/sDoNNVfJ S1VfR8G2LAUmH3ZFVO+IS0Y6C+yf1gSjbvu4UTneCyLN/b02alvU9Hz6b2OTuOlhuu6j d67hJzEJ6hZ3RwknOLbcmbGcAVzlZ2a5ZwsrhNNOIauJEU6fekpGL/RGBFjN0joHQIBV KGmyEL9/9ZylqpPYFcaFXdlceEb9z1fWkVHatRao5nKNqrB4oUeWdgxfuES4wySJxk8f N14enhWJJDVNDrhqcmHua+uUBNuqq+3MuBFRqtceD4TGiuppPrHy3l+KjbN6Gh0nf0F1 nMKQ== X-Gm-Message-State: APjAAAWWacU6V0Qdq+1lSl21OWrgMFn+SUMtOo/5knd8YdZ9us1seKFz 5yIjBOVGin39oQ3HKIWt76TOqFREijxF2Yrv86Stbe12/keeXsKqzpC9YFZzTocSOAjp83J7ZDA ORWRuZAjM1Ikcw0RnI4A6qQ== X-Received: by 2002:a05:651c:102c:: with SMTP id w12mr309527ljm.53.1579126230099; Wed, 15 Jan 2020 14:10:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwrMe2Yt2YfYiFKeLwwCIZhiM2ePXslA9DkgAL9gm4Pt7dVBs/ecmLwBp5r7JQsjiefGPMruw== X-Received: by 2002:a05:651c:102c:: with SMTP id w12mr309523ljm.53.1579126229909; Wed, 15 Jan 2020 14:10:29 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id y1sm9734405ljm.12.2020.01.15.14.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 14:10:29 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id A09761804D6; Wed, 15 Jan 2020 23:10:28 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Andrii Nakryiko 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 , Networking , bpf , open list , linux-rdma@vger.kernel.org, "open list\:KERNEL SELFTEST FRAMEWORK" , clang-built-linux@googlegroups.com Subject: Re: [PATCH bpf-next v2 00/10] tools: Use consistent libbpf include paths everywhere In-Reply-To: References: <157909756858.1192265.6657542187065456112.stgit@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 15 Jan 2020 23:10:28 +0100 Message-ID: <87o8v4tlpn.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Andrii Nakryiko writes: > On Wed, Jan 15, 2020 at 6:13 AM Toke H=C3=B8iland-J=C3=B8rgensen 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. >> >> 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. >> >> This turns out to be a somewhat invasive change in the number of files t= ouched; >> however, the actual changes to files are fairly trivial (most of them ar= e simply >> made with 'sed'). Also, this approach has the advantage that it makes ex= ternal >> and internal users consistent with each other, and ensures no future cha= nges >> breaks things in the same way as the commit referenced above. >> >> The series is split to make the change for one tool subdir at a time, wh= ile >> trying not to break the build along the way. It is structured like this: >> >> - Patch 1-2: Trivial fixes to Makefiles for issues I discovered while ch= anging >> the include paths. >> >> - Patch 3-7: Change the include directives to use the bpf/ prefix, and u= pdates >> Makefiles to make sure tools/lib/ is part of the include path, but wit= hout >> removing tools/lib/bpf >> >> - Patch 8: Change the bpf_helpers file in libbpf itself to use the bpf/ = prefix >> when including (the original source of breakage). >> >> - Patch 9-10: Remove tools/lib/bpf from include paths to make sure we do= n't >> inadvertently re-introduce includes without the bpf/ prefix. >> >> --- > > Thanks, Toke, for this clean up! I tested it locally for my set up: > runqslower, bpftool, libbpf, and selftests all build fine, so it looks > good. My only concern is with selftests/bpf Makefile, we shouldn't > build anything outside of selftests/bpf. Let's fix that. Thanks! Great, thanks for testing! I'll fix up your comments (and Alexei's) and submit another version tomorrow. -Toke