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]
Date:   Wed, 15 Feb 2023 15:27:35 +0100
From:   Larysa Zaremba <larysa.zaremba@...el.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>
CC:     <netdev@...r.kernel.org>, <lorenzo.bianconi@...hat.com>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <ioana.ciornei@....com>,
        <vladimir.oltean@....com>, <robert-ionut.alexa@....com>,
        <radu-andrei.bulie@....com>
Subject: Re: [PATCH net-next] net: dpaa2-eth: do not always set xsk support
 in xdp_features flag

On Wed, Feb 15, 2023 at 03:32:57PM +0100, Lorenzo Bianconi wrote:
> Do not always add NETDEV_XDP_ACT_XSK_ZEROCOPY bit in xdp_features flag
> but check if the NIC really supports it.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Larysa Zaremba <larysa.zaremba@...el.com>

> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> index 746ccfde7255..a62cffaf6ff1 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> @@ -4598,8 +4598,10 @@ static int dpaa2_eth_netdev_init(struct net_device *net_dev)
>  	net_dev->hw_features = net_dev->features;
>  	net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
>  				NETDEV_XDP_ACT_REDIRECT |
> -				NETDEV_XDP_ACT_XSK_ZEROCOPY |
>  				NETDEV_XDP_ACT_NDO_XMIT;
> +	if (priv->dpni_attrs.wriop_version >= DPAA2_WRIOP_VERSION(3, 0, 0) &&
> +	    priv->dpni_attrs.num_queues <= 8)
> +		net_dev->xdp_features |= NETDEV_XDP_ACT_XSK_ZEROCOPY;
>  
>  	if (priv->dpni_attrs.vlan_filter_entries)
>  		net_dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
> -- 
> 2.39.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ