Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp294924ybl; Wed, 4 Dec 2019 02:58:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzRGuVScfk80Mllw55c/Obn6GvUv6YxFgDHIxhYH4l+RuzsFjqGyN2HsW0bv8aEP4vEdD1z X-Received: by 2002:aca:1103:: with SMTP id 3mr2038216oir.171.1575457131597; Wed, 04 Dec 2019 02:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575457131; cv=none; d=google.com; s=arc-20160816; b=G0XtLWL1xAyrEe7Ps+yCE7i85wPTXxpWqc2yUPEIyIXMzR5Uvl2HeiSyRCDj5AkLwi GoseoDsTUSEpzbnHUAZ2C9i5LdL9Vl1z9agtkvDk7InaAomHdn+z5phmzAtJIw3SSrDb rXeZJEqeS6K0Y6m+gTEPWpNeS4p6BMi7VNbaYj+PjeMOi6fBc/nCJwIAC2LfiWjMjF2W TV62ZAb09PMYxgpMPiBtM0uzVE7vYHHMqW1nvcy5n///UjIk2HNGTFhQNKwjwZse6l0p ne1KwDl+YpjTUDuIjyCtsJwBdVZenyZ2C+M78BwIVOxinyFOCXo0mMoVJqZ2Dhpy2vV9 M90g== 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=3gDaTecph8Rh/JPKwYat9tHBvAWnUrZz+amifETT1mc=; b=TojraQLZihs9WDl7I+eadq9U+vw2UjPIsvane05LzKYdVdwGDS9DcvlzflMc+e6hMK X37kbwt/Mt2Zaml1h1jZcfOWiPZyEoMzTE6dGMXtDOcKBLuJHrdRWjAUzfT8mOlmzCqC otS0E9EcsbjI43ZmYgQDxpwxnjSQDjp+UnDEu/4TAHNvjt5tJBvmm071onS2m9QMZ1oM a6dEp3+VBJ0ffiLLFJk2ddsLPtSN1nq0LC91wvsAiwCVUGD2ZSrPyZGiJQlYHr0cXvJ0 qnWg/yupJgDi4P2w9QxuBlm//uCIitQ6j5GjvyxtHkvs9xczIlp02/QDGkhjU/sBkxu1 W9GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Y9y/UgQP"; 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 x131si1824669oig.124.2019.12.04.02.58.39; Wed, 04 Dec 2019 02:58:51 -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="Y9y/UgQP"; 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 S1727589AbfLDK6E (ORCPT + 99 others); Wed, 4 Dec 2019 05:58:04 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:26576 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727268AbfLDK6E (ORCPT ); Wed, 4 Dec 2019 05:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575457083; 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=3gDaTecph8Rh/JPKwYat9tHBvAWnUrZz+amifETT1mc=; b=Y9y/UgQPscYx3WRbYw1/UznfJJ3lfd5OqToJ1Ihejd+/GPQflcNtTzvNNkcacuxhf+fnPK 5ahNtrjlDIwsyGfpgWI7fbkTExAmAponLE0W+xzyoDGIJwrdXL/geHbYETo1ivQpN8Sp7D XPCgZfDclkRAtPT1OkRP5zooJEupoL0= 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-104-6aMZrit_NrG4vAUastoutQ-1; Wed, 04 Dec 2019 05:58:02 -0500 Received: by mail-lj1-f197.google.com with SMTP id l10so851558ljb.15 for ; Wed, 04 Dec 2019 02:58:02 -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=KcON+ZnXbOaneQXDnO49ePrfIssRevwFNRCOp04UDIY=; b=C0mciZe1hRNjabM+ZwxnvgySdIiALMOD6vBP+sBII1np51LATFnzKLRD/yK/Cv9jtN qYDk2jHiS8Rx92bV3LQpX/uggo5peWs/lD7uT2Atmgk9NkVjwvMu8z0j/6mlzzMum+qG WW5W+a62MguEo9ZsBi1xp/ItcxvM9URwW/ka/tSPb/eJ9CKr9GmQXsXUGuBA7VWYEUK1 ihmkp/6657YdC7/zIyh3ggn5b/TaK7lyy3U3GlwdVfm1xW0BZv5tnjoFsLy11OvVR8Tp D/IMQwX2la3Z9I8HNHccu4CruC+0kVTbYEzX3qH6GGw06eZi8fhi0LYvPQuPsRvyKZaB MWXA== X-Gm-Message-State: APjAAAXLlF+tBBrJOcu3+I7Sy1S9VWSevytxs7MBTUCCrSWqN75Rydjr mdLtqu+i1E2+tgb8AefM8Ln2XcsNNlE4DlxHouFZsPx9YcaejY6aP53o8x45U3Ac0LU11iiYcao 0zAnEXKRjZqgPiUozNCfS0ieb X-Received: by 2002:a19:3f16:: with SMTP id m22mr1657991lfa.116.1575457081272; Wed, 04 Dec 2019 02:58:01 -0800 (PST) X-Received: by 2002:a19:3f16:: with SMTP id m22mr1657976lfa.116.1575457081085; Wed, 04 Dec 2019 02:58:01 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id c12sm2938420ljk.77.2019.12.04.02.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 02:58:00 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 5BD7118193A; Wed, 4 Dec 2019 11:57:58 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Andrii Nakryiko , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Networking , bpf , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Jesper Dangaard Brouer , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet Subject: Re: [PATCHv4 0/6] perf/bpftool: Allow to link libbpf dynamically In-Reply-To: References: <20191202131847.30837-1-jolsa@kernel.org> <87wobepgy0.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 04 Dec 2019 11:57:58 +0100 Message-ID: <877e3cpdc9.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: 6aMZrit_NrG4vAUastoutQ-1 X-Mimecast-Spam-Score: 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 Mon, Dec 2, 2019 at 1:15 PM Toke H=C3=B8iland-J=C3=B8rgensen 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 extensio= n > 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 =3D=3D 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... -Toke