Skip to content

Commit 1c93e48

Browse files
LorenzoBianconiPaolo Abeni
authored andcommitted
net: dpaa2-eth: do not always set xsk support in xdp_features flag
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 <[email protected]> Reviewed-by: Larysa Zaremba <[email protected]> Link: https://lore.kernel.org/r/3dba6ea42dc343a9f2d7d1a6a6a6c173235e1ebf.1676471386.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni <[email protected]>
1 parent 675f176 commit 1c93e48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4598,8 +4598,10 @@ static int dpaa2_eth_netdev_init(struct net_device *net_dev)
45984598
net_dev->hw_features = net_dev->features;
45994599
net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
46004600
NETDEV_XDP_ACT_REDIRECT |
4601-
NETDEV_XDP_ACT_XSK_ZEROCOPY |
46024601
NETDEV_XDP_ACT_NDO_XMIT;
4602+
if (priv->dpni_attrs.wriop_version >= DPAA2_WRIOP_VERSION(3, 0, 0) &&
4603+
priv->dpni_attrs.num_queues <= 8)
4604+
net_dev->xdp_features |= NETDEV_XDP_ACT_XSK_ZEROCOPY;
46034605

46044606
if (priv->dpni_attrs.vlan_filter_entries)
46054607
net_dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;

0 commit comments

Comments
 (0)