Skip to content

Commit

Permalink
net: fec: turn on XDP features
Browse files Browse the repository at this point in the history
The XDP features are supported since the commit 66c0e13
("drivers: net: turn on XDP features"). Currently, the fec
driver supports NETDEV_XDP_ACT_BASIC, NETDEV_XDP_ACT_REDIRECT
and NETDEV_XDP_ACT_NDO_XMIT. So turn on these XDP features
for fec driver.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Fang authored and David S. Miller committed May 22, 2023
1 parent dcbe4ea commit e4ac7cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4030,6 +4030,11 @@ static int fec_enet_init(struct net_device *ndev)

ndev->hw_features = ndev->features;

if (!(fep->quirks & FEC_QUIRK_SWAP_FRAME))
ndev->xdp_features = NETDEV_XDP_ACT_BASIC |
NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_NDO_XMIT;

fec_restart(ndev);

if (fep->quirks & FEC_QUIRK_MIB_CLEAR)
Expand Down

0 comments on commit e4ac7cc

Please sign in to comment.