Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp765538ybl; Wed, 4 Dec 2019 10:28:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzEAnF/5NmFI+H40/S5l54sslGswLhqgA4TtsUmD5suRvI0KFYP3IYNyIabCWeCkk8sIknw X-Received: by 2002:a9d:39b5:: with SMTP id y50mr3690432otb.162.1575484139538; Wed, 04 Dec 2019 10:28:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575484139; cv=none; d=google.com; s=arc-20160816; b=l1QzBt84vnuGiZPXGSiaGiwjAspTIHLru7EzmG7ZfXIGtjkfueFYH+o2bI3Jm9Zcpn A5lA1AKkYRQZMaYUUKtKDsJN1/3TSafQnzf5MnShSB1zG1lx7Hfe/7HjjKZP5wKpmknW dth6bMdrZMV/FRFmJIC8fn+lCvXKI03FurQpPmYTyIE5zwfj/nol+Bi1R58eSrIizBHI JR8rIhN2dJiRJ5A9ireO/urSHOfTI9oi/qUNz446IgwayZy9xzKNkgdN4iaduoO2lJzU HYvKrl6JxRSYL6oOCmj+SCGWCZ0WhksyboS2afv9/4qoL5aC1Bi2mLh9Rq7DgE6BYHQf hNQg== 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; bh=pURpbRBMQaN9FTRcacmCoSvWQeaIfLJZnSgluX0R1iM=; b=U644Nv97zX80nXlGX3b63x2Y/yrZ4vfuhmQsfor06dQBcsnSAFiUtYYJWougeAkd10 gwlCOIeLRkRkra+zqmiyr0gcYjiRMpJx+2d2gTANFwkLBNjA5WvCoxf/Zns2fwON6ubq HEwNxSysqTNZ0KFeyoHS/2G9KTJDi3oZvfyx1znx66xEAfkcFr9tfDfHkV5QP1h2/iV7 1gfij2ccwWEAE06fpjp6WuyIV1VfqlSm0bTLseLHe5AStat2q7S8RZyNJTEnw9W7hHP3 WIx97AOLuimmYXBkw80lB+KJgAx5d28D2ijBraiyaRs295u8PTAvmoaQ9PxWuaukUW4K jNRw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si3653865oih.186.2019.12.04.10.28.47; Wed, 04 Dec 2019 10:28:59 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729248AbfLDS1l (ORCPT + 99 others); Wed, 4 Dec 2019 13:27:41 -0500 Received: from www62.your-server.de ([213.133.104.62]:40604 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729345AbfLDS1k (ORCPT ); Wed, 4 Dec 2019 13:27:40 -0500 Received: from [194.230.159.159] (helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1icZN2-0004rF-GG; Wed, 04 Dec 2019 19:27:28 +0100 Date: Wed, 4 Dec 2019 19:27:27 +0100 From: Daniel Borkmann To: Alexei Starovoitov Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Andrii Nakryiko , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Networking , bpf , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Jesper Dangaard Brouer , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet Subject: Re: [PATCHv4 0/6] perf/bpftool: Allow to link libbpf dynamically Message-ID: <20191204182727.GA29780@localhost.localdomain> References: <20191202131847.30837-1-jolsa@kernel.org> <87wobepgy0.fsf@toke.dk> <877e3cpdc9.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25653/Wed Dec 4 10:46:42 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 04, 2019 at 09:39:59AM -0800, Alexei Starovoitov wrote: > On Wed, Dec 4, 2019 at 2:58 AM Toke H?iland-J?rgensen wrote: > > Alexei Starovoitov writes: > > > On Mon, Dec 2, 2019 at 1:15 PM Toke H?iland-J?rgensen wrote: > > >> > > >> Ah, that is my mistake: I was getting dynamic libbpf symbols with this > > >> approach, but that was because I had the version of libbpf.so in my > > >> $LIBDIR that had the patch to expose the netlink APIs as versioned > > >> symbols; so it was just pulling in everything from the shared library. > > >> > > >> So what I was going for was exactly what you described above; but it > > >> seems that doesn't actually work. Too bad, and sorry for wasting your > > >> time on this :/ > > > > > > bpftool is currently tightly coupled with libbpf and very likely > > > in the future the dependency will be even tighter. > > > In that sense bpftool is an extension of libbpf and libbpf is an extension > > > of bpftool. > > > Andrii is working on set of patches to generate user space .c code > > > from bpf program. > > > bpftool will be generating the code that is specific for the version > > > bpftool and for > > > the version of libbpf. There will be compatibility layers as usual. > > > But in general the situation where a bug in libbpf is so criticial > > > that bpftool needs to repackaged is imo less likely than a bug in > > > bpftool that will require re-packaging of libbpf. > > > bpftool is quite special. It's not a typical user of libbpf. > > > The other way around is more correct. libbpf is a user of the code > > > that bpftool generates and both depend on each other. > > > perf on the other side is what typical user space app that uses > > > libbpf will look like. > > > I think keeping bpftool in the kernel while packaging libbpf > > > out of github was an oversight. > > > I think we need to mirror bpftool into github/libbpf as well > > > and make sure they stay together. The version of libbpf == version of bpftool. > > > Both should come from the same package and so on. > > > May be they can be two different packages but > > > upgrading one should trigger upgrade of another and vice versa. > > > I think one package would be easier though. > > > Thoughts? > > > > Yup, making bpftool explicitly the "libbpf command line interface" makes > > sense and would help clarify the relationship between the two. As Jiri > > said, we are already moving in that direction packaging-wise... > > Awesome. Let's figure out the logistics. > Should we do: > git mv tools/bpf/bpftool/ tools/lib/bpf/ > and appropriate adjustment to Makefiles ? > or keep it where it is and only add to > https://github.com/libbpf/libbpf/blob/master/scripts/sync-kernel.sh ? I'd be in preference of the latter aka keeping where it is. Thanks, Daniel