lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAXqURbn2R+x8tiO@lore-desk>
Date:   Mon, 6 Mar 2023 14:27:45 +0100
From:   Lorenzo Bianconi <lorenzo@...nel.org>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
        kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
        hawk@...nel.org, toke@...hat.com, memxor@...il.com,
        alardam@...il.com, lorenzo.bianconi@...hat.com
Subject: Re: [RFC net-next] ethtool: provide XDP information with
 XDP_FEATURES_GET

> 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@...a.com>
> > Co-developed-by: Marek Majtyka <alardam@...il.com>
> > Signed-off-by: Marek Majtyka <alardam@...il.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.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' -> '@...e'

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
> >   */
> 
> ...

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ