netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag
  2023-02-15 14:32 [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag Lorenzo Bianconi
@ 2023-02-15 14:27 ` Larysa Zaremba
  2023-02-20  7:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Larysa Zaremba @ 2023-02-15 14:27 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: netdev, lorenzo.bianconi, davem, edumazet, kuba, pabeni,
	ioana.ciornei, vladimir.oltean, robert-ionut.alexa,
	radu-andrei.bulie

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@kernel.org>
> ---
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag
@ 2023-02-15 14:32 Lorenzo Bianconi
  2023-02-15 14:27 ` Larysa Zaremba
  2023-02-20  7:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2023-02-15 14:32 UTC (permalink / raw)
  To: netdev
  Cc: lorenzo.bianconi, davem, edumazet, kuba, pabeni, ioana.ciornei,
	vladimir.oltean, robert-ionut.alexa, radu-andrei.bulie

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@kernel.org>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag
  2023-02-15 14:32 [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag Lorenzo Bianconi
  2023-02-15 14:27 ` Larysa Zaremba
@ 2023-02-20  7:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-20  7:10 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: netdev, lorenzo.bianconi, davem, edumazet, kuba, pabeni,
	ioana.ciornei, vladimir.oltean, robert-ionut.alexa,
	radu-andrei.bulie

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 15 Feb 2023 15:32:57 +0100 you 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@kernel.org>
> ---
>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag
    https://git.kernel.org/netdev/net-next/c/1c93e48cc391

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-20  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 14:32 [PATCH net-next] net: dpaa2-eth: do not always set xsk support in xdp_features flag Lorenzo Bianconi
2023-02-15 14:27 ` Larysa Zaremba
2023-02-20  7:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).