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=-5.8 required=3.0 tests=BAYES_00,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 96AF8C433E0 for ; Tue, 16 Feb 2021 14:32:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 683C964E04 for ; Tue, 16 Feb 2021 14:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbhBPObn (ORCPT ); Tue, 16 Feb 2021 09:31:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39072 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbhBPObj (ORCPT ); Tue, 16 Feb 2021 09:31:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613485812; 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=nb9Kqw3jYRHWptfCeEgA2EWrWzfESD8aGU2YzYJvKpI=; b=Lt/1a0HvacWHd6Sd+l26Foei9TTYF58A4XF51/2Y8FX295idSsEVb4L7ZhIdY9D3KuBLxQ u8vyXzhJkWmhy9eSkTmU4U238uLlaZ5TEL47jGiVfVu+pwHSfFRehqW0GTxPCNVUWcsAyw 6JQldxLkoGraHvNPR2PwpbP/neGfReY= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-TM5hh0wDM5K_LtfBKnURkA-1; Tue, 16 Feb 2021 09:30:10 -0500 X-MC-Unique: TM5hh0wDM5K_LtfBKnURkA-1 Received: by mail-ej1-f70.google.com with SMTP id yc4so6304187ejb.2 for ; Tue, 16 Feb 2021 06:30:10 -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; bh=nb9Kqw3jYRHWptfCeEgA2EWrWzfESD8aGU2YzYJvKpI=; b=PZHk08jtVig05TCME3K6V5lvlSIh1bIEAsfZTP4CXz9+ZcrM4TRS8bHYwkPSSohEKV EHB9L4Gg8Vzd8ZlDlk5Cp9+ICK9dD7Yu7VrI4miKHh8DElnDCph/giJedqQGutEKdb1U brFN7xJZp3aD3Pn6sUFIbfXJn6ouoecswD0asHMNyDXL+KI2PcqGwLlGAE3SfDxVJmUp BSnbY0/6wsZtJ+kUnzeOmvfbRBcDIN9voQr04HM4iOVlLiQ6RSjBk8y0BfLf1HkUuFOa KAxwRpExspKZgMzSPRchKy8PsOExguSV+9BVdpu0UrpFF7PZlHC6TDtPb+2bePb51+x7 jczA== X-Gm-Message-State: AOAM530oY81BDx0l22M812unI8lmZ5B9P4N75rguKWwzjzoQ/EOIoACA g9vFbd45xHfisg2HF9c5ckvLl+cC3i5CCNyLKlodS1GInhsRHROL6YbunoSCoOPj8wskt81mYDS g1VXOI3dAsHjA X-Received: by 2002:aa7:cd8d:: with SMTP id x13mr20747698edv.286.1613485809054; Tue, 16 Feb 2021 06:30:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPnIbI5zNEUJMUQGdvUemv2Bdqe23PVRQQVPIj0wJyHJ00fcgoDHNUcRSpuNnhIw8rtDHhkg== X-Received: by 2002:aa7:cd8d:: with SMTP id x13mr20747652edv.286.1613485808745; Tue, 16 Feb 2021 06:30:08 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id hr3sm12875181ejc.41.2021.02.16.06.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 06:30:08 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id BDCAE1805FA; Tue, 16 Feb 2021 15:30:07 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Marek Majtyka , Alexei Starovoitov Cc: Jakub Kicinski , Saeed Mahameed , David Ahern , Maciej Fijalkowski , John Fastabend , Jesper Dangaard Brouer , Daniel Borkmann , Maciej Fijalkowski , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Andrii Nakryiko , Jonathan Lemon , Alexei Starovoitov , Network Development , "David S. Miller" , Jesper Dangaard Brouer , bpf , intel-wired-lan , "Karlsson, Magnus" , Jeff Kirsher Subject: Re: [PATCH v2 bpf 1/5] net: ethtool: add xdp properties flag set In-Reply-To: References: <20201204102901.109709-1-marekx.majtyka@intel.com> <20201209125223.49096d50@carbon> <1e5e044c8382a68a8a547a1892b48fb21d53dbb9.camel@kernel.org> <6f8c23d4ac60525830399754b4891c12943b63ac.camel@kernel.org> <87h7mvsr0e.fsf@toke.dk> <87bld2smi9.fsf@toke.dk> <20210202113456.30cfe21e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210203090232.4a259958@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <874kikry66.fsf@toke.dk> <20210210103135.38921f85@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <87czx7r0w8.fsf@toke.dk> <20210211172603.17d6a8f6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 16 Feb 2021 15:30:07 +0100 Message-ID: <8735xwaxw0.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Marek Majtyka writes: > On Fri, Feb 12, 2021 at 3:05 AM Alexei Starovoitov > wrote: >> >> On Thu, Feb 11, 2021 at 5:26 PM Jakub Kicinski wrote: >> > >> > Perhaps I had seen one too many vendor incompatibility to trust that >> > adding a driver API without a validation suite will result in something >> > usable in production settings. >> >> I agree with Jakub. I don't see how extra ethtool reporting will help. >> Anyone who wants to know whether eth0 supports XDP_REDIRECT can already do so: >> ethtool -S eth0 | grep xdp_redirect > > Doing things right can never be treated as an addition. It is the > other way around. Option -S is for statistics and additionally it can > show something (AFAIR there wasn't such counter xdp_redirect, it must > be something new, thanks for the info). But nevertheless it cannot > cover all needs IMO. > > Some questions worth to consider: > Is this extra reporting function of statistics clearly documented in > ethtool? Is this going to be clearly documented? Would it be easier > for users/admins to find it? > What about zero copy? Can it be available via statistics, too? > What about drivers XDP transmit locking flag (latest request from Jesper)? There is no way the statistics is enough. And saying "just grep for xdp_redirect in ethtool -S" is bordering on active hostility towards users. We need drivers to export explicit features so we can do things like: - Explicitly reject attaching a program that tries to do xdp_redirect on an interface that doesn't support it. - Prevent devices that don't implement ndo_xdp_xmit() from being inserted into a devmap (oh, and this is on thing you can't know at all from the statistics, BTW). - Expose the features in a machine-readable format (like the ethtool flags in your patch) so applications can discover in a reliable way what is available and do proper fallback if features are missing. I can accept that we need some kind of conformance test to define what each flag means (which would be kinda like a selftest for the feature flags), but we definitely need the feature flags themselves! -Toke From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toke =?unknown-8bit?q?H=C3=B8iland-J=C3=B8rgensen?= Date: Tue, 16 Feb 2021 15:30:07 +0100 Subject: [Intel-wired-lan] [PATCH v2 bpf 1/5] net: ethtool: add xdp properties flag set In-Reply-To: References: <20201204102901.109709-1-marekx.majtyka@intel.com> <20201209125223.49096d50@carbon> <1e5e044c8382a68a8a547a1892b48fb21d53dbb9.camel@kernel.org> <6f8c23d4ac60525830399754b4891c12943b63ac.camel@kernel.org> <87h7mvsr0e.fsf@toke.dk> <87bld2smi9.fsf@toke.dk> <20210202113456.30cfe21e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210203090232.4a259958@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <874kikry66.fsf@toke.dk> <20210210103135.38921f85@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <87czx7r0w8.fsf@toke.dk> <20210211172603.17d6a8f6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Message-ID: <8735xwaxw0.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: Marek Majtyka writes: > On Fri, Feb 12, 2021 at 3:05 AM Alexei Starovoitov > wrote: >> >> On Thu, Feb 11, 2021 at 5:26 PM Jakub Kicinski wrote: >> > >> > Perhaps I had seen one too many vendor incompatibility to trust that >> > adding a driver API without a validation suite will result in something >> > usable in production settings. >> >> I agree with Jakub. I don't see how extra ethtool reporting will help. >> Anyone who wants to know whether eth0 supports XDP_REDIRECT can already do so: >> ethtool -S eth0 | grep xdp_redirect > > Doing things right can never be treated as an addition. It is the > other way around. Option -S is for statistics and additionally it can > show something (AFAIR there wasn't such counter xdp_redirect, it must > be something new, thanks for the info). But nevertheless it cannot > cover all needs IMO. > > Some questions worth to consider: > Is this extra reporting function of statistics clearly documented in > ethtool? Is this going to be clearly documented? Would it be easier > for users/admins to find it? > What about zero copy? Can it be available via statistics, too? > What about drivers XDP transmit locking flag (latest request from Jesper)? There is no way the statistics is enough. And saying "just grep for xdp_redirect in ethtool -S" is bordering on active hostility towards users. We need drivers to export explicit features so we can do things like: - Explicitly reject attaching a program that tries to do xdp_redirect on an interface that doesn't support it. - Prevent devices that don't implement ndo_xdp_xmit() from being inserted into a devmap (oh, and this is on thing you can't know at all from the statistics, BTW). - Expose the features in a machine-readable format (like the ethtool flags in your patch) so applications can discover in a reliable way what is available and do proper fallback if features are missing. I can accept that we need some kind of conformance test to define what each flag means (which would be kinda like a selftest for the feature flags), but we definitely need the feature flags themselves! -Toke