Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2326400pxf; Sat, 27 Mar 2021 08:20:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGnMq4NSO4dsOa1DckX9HqXDDdgbl/snl1XrfsrLqv8f4ppevl2cBSiiEOFwB0KGmq2bu2 X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr20617390edu.241.1616858455077; Sat, 27 Mar 2021 08:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616858455; cv=none; d=google.com; s=arc-20160816; b=jSWyCmigrOhBJTblF89Pb+gEOxIU3eaqbsi6ZmFwSoCUF4IMREX2dYUHYBLeMofnCJ pNIahd1ZtH2Muk6hXjUd7Qc94taWp1sxzSpiTZYGFwMYHRJJa8IsqDKcX+80/8vDoqqU RwQcNNgMVpzYMxqIyHXKXLlt7TMYxKyX5meK8sPGoRbHJkjJP3mvarpuhYMeaBq7Je3n 5e3k0+3daYRbxhYd3BlbHp7pi2jplxbmuimJ+/QaiYHv9UKog9i1goVr2CfMg4fLU7qa vIMCcJls+ncy3omj9DZcqXJ39bYP9u99PnAL+41L0bR9TnypH5Li4nu3V78erO4rIWO/ TzxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=sWbU2NHEP/nHwdL8rp425gC++yCS11BbCfWAnc1DbmU=; b=Cu3FhfNxDzihdsysbh1NVUmWc8iLL2diasplhbElOpw6EQjb6329KeVMh06cpwVqXT kRb5i/9KeXQHKcMAvUOtUpw8ryv2oCdzYuqdPTdCW13H/tdFQ7WZOKQBY4K2nXWDhAyI UDQTygL0IG14veDcLGUTc95SWCbAxkHo0LpbBDwNPISUn06056h8wa0qAUBUn1Tf+HGy 5WHLW2cCh1IrkvlDiHygyn2F6Nde+a1CrWOkn3n+ilhLt8ioXs/YTdX3R346zdzSYwwf OCn+LF6hNU0TitzIRzQYYQ2ndTm7UQsTuR9ZsMGlKUX4/7xqiQe/pxLQlh0+Iu9ZwsT8 e0kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GbYVkBAy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id n1si8972804edd.229.2021.03.27.08.20.32; Sat, 27 Mar 2021 08:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GbYVkBAy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230170AbhC0PR3 (ORCPT + 99 others); Sat, 27 Mar 2021 11:17:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29286 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230187AbhC0PRZ (ORCPT ); Sat, 27 Mar 2021 11:17:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616858243; 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: in-reply-to:in-reply-to:references:references; bh=sWbU2NHEP/nHwdL8rp425gC++yCS11BbCfWAnc1DbmU=; b=GbYVkBAyNfvlkGfqiD4hHkWJTyrmuXLj/ZLmrsvfN9ZGcvT4wDtJH246WC/BVXs0N+eo7Q 2drtgw37KZQ0BYVSYCgIS8yGmfEL2cVpLfe1hTxTXhbLYGkpnoYPeGBr9M0++zuCoAwpjj 9so5yu+Gh73uRgPrzaRflvViBdoMvwA= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-bEze_LroOJqWAPFFT4ca4w-1; Sat, 27 Mar 2021 11:17:21 -0400 X-MC-Unique: bEze_LroOJqWAPFFT4ca4w-1 Received: by mail-ed1-f71.google.com with SMTP id y10so6115082edr.20 for ; Sat, 27 Mar 2021 08:17:20 -0700 (PDT) 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; bh=sWbU2NHEP/nHwdL8rp425gC++yCS11BbCfWAnc1DbmU=; b=h20hqtA9pRMbu4BW50X6ppDV56U1oWX7JCDOzwZTOuuhgmoV29Wge4q2ZQLWvNAHa2 FweVDPQGd/04DrqQ4l5WvON7Rp7Os5PrREvu9/LS6JUc0fcTd+KyEvqLP+g+jGd1IXMX T8PLaexqR5fFcePLfvaJoKvn/P1wghTaKl8evIf65q47UAsMf1XDiObm3CehgYPFs8NR i8z56RiQIUnvZnGM1eQei2fKAEjJR1N2WySWFJqlBuGVyAztOIi8gTxRFSZhFykqsngr xLFyLAmZq7ypNr5+QMjZv8f0kc5QRYC4x6Wzu7zyxBM6uj/kKsJxAjbmiBi/TmK8UORO T4qw== X-Gm-Message-State: AOAM5328a1BR8Z8/vVB9mUDnbTlxikU8iSb6V3WGqbwD9kyUwM5CPWhQ cfkf4DfOjOD18ADC+aEnnk4egT4uvGcaPRAs+Doj0U8R5GPa8ZvFt+JTKvBSaRCxPVBN5nNQoSC DvKa3F5wlK4I4tb4tzBf0p+/N X-Received: by 2002:a17:907:c08:: with SMTP id ga8mr8638256ejc.376.1616858239744; Sat, 27 Mar 2021 08:17:19 -0700 (PDT) X-Received: by 2002:a17:907:c08:: with SMTP id ga8mr8638215ejc.376.1616858239358; Sat, 27 Mar 2021 08:17:19 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id m14sm5978144edr.13.2021.03.27.08.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Mar 2021 08:17:18 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 7FDD31801A3; Sat, 27 Mar 2021 16:17:16 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov , Kumar Kartikeya Dwivedi Cc: bpf@vger.kernel.org, brouer@redhat.com, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Shuah Khan , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Peter Zijlstra , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH bpf-next 5/5] libbpf: add selftests for TC-BPF API In-Reply-To: <20210327021534.pjfjctcdczj7facs@ast-mbp> References: <20210325120020.236504-1-memxor@gmail.com> <20210325120020.236504-6-memxor@gmail.com> <20210327021534.pjfjctcdczj7facs@ast-mbp> X-Clacks-Overhead: GNU Terry Pratchett Date: Sat, 27 Mar 2021 16:17:16 +0100 Message-ID: <87h7kwaao3.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexei Starovoitov writes: > On Thu, Mar 25, 2021 at 05:30:03PM +0530, Kumar Kartikeya Dwivedi wrote: >> This adds some basic tests for the low level bpf_tc_* API and its >> bpf_program__attach_tc_* wrapper on top. > > *_block() apis from patch 3 and 4 are not covered by this selftest. > Why were they added ? And how were they tested? > > Pls trim your cc. bpf@vger and netdev@vger would have been enough. > > My main concern with this set is that it adds netlink apis to libbpf while > we already agreed to split xdp manipulation pieces out of libbpf. > It would be odd to add tc apis now only to split them later. We're not removing the ability to attach an XDP program via netlink from libxdp, though. This is the equivalent for TC: the minimum support to attach a program, and if you want to do more, you pull in another library or roll your own. I'm fine with cutting out more stuff and making this even more minimal (e.g., remove the block stuff and only support attach/detach on ifaces), but we figured we'd err on the side of including too much and getting some feedback from others on which bits are the essential ones to keep, and which can be dropped. > I think it's better to start with new library for tc/xdp and have > libbpf as a dependency on that new lib. > For example we can add it as subdir in tools/lib/bpf/. I agree for the higher-level stuff (though I'm not sure what that would be for TC), but right now TC programs are the only ones that cannot be attached by libbpf, which is annoying; that's what we're trying to fix. -Toke