From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Simon Horman <simon.horman@corigine.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, edumazet@google.com,
hawk@kernel.org, toke@redhat.com, memxor@gmail.com,
alardam@gmail.com, lorenzo.bianconi@redhat.com
Subject: Re: [RFC net-next] ethtool: provide XDP information with XDP_FEATURES_GET
Date: Mon, 6 Mar 2023 14:27:45 +0100 [thread overview]
Message-ID: <ZAXqURbn2R+x8tiO@lore-desk> (raw)
In-Reply-To: <ZAXoik8Y4OboNRAT@corigine.com>
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
> On Mon, Mar 06, 2023 at 11:26:10AM +0100, Lorenzo Bianconi wrote:
> > Implement XDP_FEATURES_GET request to get network device information
> > about supported xdp functionalities through ethtool.
> >
> > Tested-by: Matteo Croce <teknoraver@meta.com>
> > Co-developed-by: Marek Majtyka <alardam@gmail.com>
> > Signed-off-by: Marek Majtyka <alardam@gmail.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>
> ...
>
> > @@ -1429,6 +1431,18 @@ struct ethtool_sfeatures {
> > struct ethtool_set_features_block features[];
> > };
> >
> > +/**
> > + * struct ethtool_xdp_gfeatures - command to get supported XDP features
> > + * @cmd: command number = %ETHTOOL_XDP_GFEATURES
> > + * size: array size of the features[] array
>
> nit: 'size' -> '@size'
ack, I will fix it.
>
> > + * @features: XDP feature masks
> > + */
> > +struct ethtool_xdp_gfeatures {
> > + __u32 cmd;
> > + __u32 size;
> > + __u32 features[];
> > +};
> > +
> > /**
> > * struct ethtool_ts_info - holds a device's timestamping and PHC association
> > * @cmd: command number = %ETHTOOL_GET_TS_INFO
>
> ...
>
> > diff --git a/net/ethtool/common.c b/net/ethtool/common.c
> > index 5fb19050991e..2be672c601ad 100644
> > --- a/net/ethtool/common.c
> > +++ b/net/ethtool/common.c
> > @@ -465,6 +465,17 @@ const char udp_tunnel_type_names[][ETH_GSTRING_LEN] = {
> > static_assert(ARRAY_SIZE(udp_tunnel_type_names) ==
> > __ETHTOOL_UDP_TUNNEL_TYPE_CNT);
> >
> > +const char xdp_features_strings[][ETH_GSTRING_LEN] = {
> > + [NETDEV_XDP_ACT_BIT_BASIC_BIT] = "xdp-basic",
> > + [NETDEV_XDP_ACT_BIT_REDIRECT_BIT] = "xdp-redirect",
> > + [NETDEV_XDP_ACT_BIT_NDO_XMIT_BIT] = "xdp-ndo-xmit",
> > + [NETDEV_XDP_ACT_BIT_XSK_ZEROCOPY_BIT] = "xdp-xsk-zerocopy",
> > + [NETDEV_XDP_ACT_BIT_HW_OFFLOAD_BIT] = "xdp-hw-offload",
> > + [NETDEV_XDP_ACT_BIT_RX_SG_BIT] = "xdp-rx-sg",
> > + [NETDEV_XDP_ACT_BIT_NDO_XMIT_SG_BIT] = "xdp-ndo-xmit-sg",
> > +};
>
> nit: blank line here
ack, I will fix it.
Regards,
Lorenzo
>
> > +static_assert(ARRAY_SIZE(xdp_features_strings) == __NETDEV_XDP_ACT_BIT_MAX);
> > +
> > /* return false if legacy contained non-0 deprecated fields
> > * maxtxpkt/maxrxpkt. rest of ksettings always updated
> > */
>
> ...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-03-06 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 10:26 [RFC net-next] ethtool: provide XDP information with XDP_FEATURES_GET Lorenzo Bianconi
2023-03-06 13:20 ` Simon Horman
2023-03-06 13:27 ` Lorenzo Bianconi [this message]
2023-03-06 18:21 ` Jakub Kicinski
2023-03-06 18:32 ` Lorenzo Bianconi
2023-03-06 19:32 ` Jakub Kicinski
2023-03-07 0:15 ` Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAXqURbn2R+x8tiO@lore-desk \
--to=lorenzo@kernel.org \
--cc=alardam@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.