Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1409809ybl; Thu, 5 Dec 2019 00:37:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwhcMF77k7e1hwicAvN+V5IPARoXqja6mR/k1bqBOBjaAQOK0oV9nXQkCobTl8aoHVbE4AL X-Received: by 2002:a9d:2073:: with SMTP id n106mr5715065ota.145.1575535051073; Thu, 05 Dec 2019 00:37:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575535051; cv=none; d=google.com; s=arc-20160816; b=D+wuXs9zE70uP4NUkokAGEFw46WeW7gTwBMYE/6SMFAsIeGs3O1sGmjo87sOIM+Xnv poxmghLh01mk7kH0k5UqEtTKtVEHAP93ceF1c1NO62vReNeDiH0Td4zDczBw+rMjTQDS E2SMWazn7UZE1H6yO6EOyQOG2cUAAFtjfKykF3ukasdgwlNUNI/9CFTLuy8UlHn+Gq8H +G5hYjcoWuI8SoIiLeR4znt6U0cquJasVThiNujEFonURGj0Tuk7lVXKcw/JWjZ+2IQB J0BJtPIV8EQ+Wh5fJV5Q08gMR5gG7xq/zMBAXA7Un4+PnTuYwzrBca5eYPkN6+6pq2gn ELeg== 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=unOsoMJ+PDB7YTVJj+V77yM295LedXddpTVeN1xxafA=; b=aH3dmVhhG2oOHySBq5lEmsc0uX6lak65SOzQShYVnOTp2d93LCjhXqxIWUD9Zk92HQ BzKkHOv92+UgBZ77Ws23eaudF/hGp0i9jNQSd9cbpwYW25F3q7o00QkcpQzoP7c50Gn7 2meovlxir/qeMOLhWpUybEobCxRDnEOw8SQ9YMrmcXTp738ScUxan8Axg/MZQLJx/kGm eND6zDc+y+x1FwMzy66jQTqXRCBgy1Av/HQnl5I8G3e7SyRN/Qc4FMnIvwpqEqXRfjip ZXHvHXuRynjAm7B1FwpYOlOiX86r2YXNdELV5WyIBYjO5oeYioUgcU6MP3aBc0gTl89l v+iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AXwzs1wH; 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 n23si4450456otf.265.2019.12.05.00.37.18; Thu, 05 Dec 2019 00:37:31 -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=AXwzs1wH; 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 S1729044AbfLEIgG (ORCPT + 99 others); Thu, 5 Dec 2019 03:36:06 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:43803 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729004AbfLEIgG (ORCPT ); Thu, 5 Dec 2019 03:36:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575534965; 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=unOsoMJ+PDB7YTVJj+V77yM295LedXddpTVeN1xxafA=; b=AXwzs1wHrcUpIU3bfzKqiWEMx1f1Dv97WM1FVwHw3wzN16qu7Q6VFxCgImuUZeTyqic7bE KceBnTKdi3Hd753pujLZ1FG2j6be8dNlip1S1isbqqq0UYddawlkPc2WxUAxLK30HvqcKu owL+tGvrGi0fmeM6Qrh+ayEmSwUU0f0= 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-421-k1QuIdDLNGS22CUrZdg5BA-1; Thu, 05 Dec 2019 03:36:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC9E664A7D; Thu, 5 Dec 2019 08:36:00 +0000 (UTC) Received: from carbon (ovpn-200-56.brq.redhat.com [10.40.200.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8388C5D6A5; Thu, 5 Dec 2019 08:35:49 +0000 (UTC) Date: Thu, 5 Dec 2019 09:35:48 +0100 From: Jesper Dangaard Brouer To: Alexei Starovoitov Cc: Jakub Kicinski , Andrii Nakryiko , Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Networking , bpf , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet , brouer@redhat.com, Laura Abbott Subject: Re: [PATCHv4 0/6] perf/bpftool: Allow to link libbpf dynamically Message-ID: <20191205093548.6eee1449@carbon> In-Reply-To: <20191204233948.opvlopjkxe5o66lr@ast-mbp.dhcp.thefacebook.com> References: <20191202131847.30837-1-jolsa@kernel.org> <87wobepgy0.fsf@toke.dk> <20191204135405.3ffb9ad6@cakuba.netronome.com> <20191204233948.opvlopjkxe5o66lr@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: k1QuIdDLNGS22CUrZdg5BA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Dec 2019 15:39:49 -0800 Alexei Starovoitov wrote: > On Wed, Dec 04, 2019 at 01:54:05PM -0800, Jakub Kicinski wrote: > > On Wed, 4 Dec 2019 13:16:13 -0800, Andrii Nakryiko wrote: > > > I wonder what big advantage having bpftool in libbpf's Github repo > > > brings, actually? The reason we need libbpf on github is to allow > > > other projects like pahole to be able to use libbpf from submodule. > > > There is no such need for bpftool. > > > > > > I agree about preference to release them in sync, but that could be > > > easily done by releasing based on corresponding commits in github's > > > libbpf repo and kernel repo. bpftool doesn't have to physically live > > > next to libbpf on Github, does it? > > > > +1 I don't see any advantage of having bpftool in libbpf's GitHub repo. As Jakub mention we have seen bpftool crash fixes, which would be painful/annoying to maintain fixes for in the libbpf GitHub repo. As Andrii also points out, it requires more work, as GitHub libbpf have to maintain a separate Makefile for bpftool. > > > Calling github repo a "mirror" is incorrect. It's not a 1:1 copy of > > > files. We have a completely separate Makefile for libbpf, and we have > > > a bunch of stuff we had to re-implement to detach libbpf code from > > > kernel's non-UAPI headers. Doing this for bpftool as well seems like > > > just more maintenance. Keeping github's Makefile in sync with kernel's > > > Makefile (for libbpf) is PITA, I'd rather avoid similar pains for > > > bpftool without a really good reason. > > > > Agreed. Having libbpf on GH is definitely useful today, but one can hope > > a day will come when distroes will get up to speed on packaging libbpf, > > and perhaps we can retire it? Maybe 2, 3 years from now? Putting > > bpftool in the same boat is just more baggage. > > Distros should be packaging libbpf and bpftool from single repo on github. > Kernel tree is for packaging kernel. I don't think that is a good idea. You are creating double work and wasting distro developers time. Let me explain: 1. First of all, GitHub libbpf does not have a stable branches (which makes sense, given this is a read-only clone of kernel tree). Thus, distro developers have to maintain that themselves, in their internal package tree (that is based on GitHub libbpf). 2. Kernel BPF changes usually require updates to libbpf, as selftests uses libbpf. Thus, the distro kernel backporter is already required to backport libbpf parts. This is double work, the code changes to libbpf are now maintained in two places for the distro. The disadvantage for distros to package libbpf (+ bpftool and perf) off their distro kernel tree is that a fix to libbpf, requires rolling a new kernel minor release. The solution to that is simply that distro package for libbpf have a separate (RPM) spec file, with own versioning, which sources points to distro kernel tree. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer