From: Magnus Karlsson <magnus.karlsson@xxxxxxxxx> Do not report the XDP capability NETDEV_XDP_ACT_XSK_ZEROCOPY as the bonding driver does not support XDP and AF_XDP in zero-copy mode even if the real NIC drivers do. Fixes: cb9e6e584d58 ("bonding: add xdp_features support") Reported-by: Prashant Batra <prbatra.mail@xxxxxxxxx> Link: https://lore.kernel.org/all/CAJ8uoz2ieZCopgqTvQ9ZY6xQgTbujmC6XkMTamhp68O-h_-rLg@xxxxxxxxxxxxxx/T/ Signed-off-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx> --- drivers/net/bonding/bond_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4e0600c7b050..79a37bed097b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1819,6 +1819,8 @@ void bond_xdp_set_features(struct net_device *bond_dev) bond_for_each_slave(bond, slave, iter) val &= slave->dev->xdp_features; + val &= ~NETDEV_XDP_ACT_XSK_ZEROCOPY; + xdp_set_features_flag(bond_dev, val); } @@ -5910,8 +5912,10 @@ void bond_setup(struct net_device *bond_dev) bond_dev->features |= BOND_XFRM_FEATURES; #endif /* CONFIG_XFRM_OFFLOAD */ - if (bond_xdp_check(bond)) + if (bond_xdp_check(bond)) { bond_dev->xdp_features = NETDEV_XDP_ACT_MASK; + bond_dev->xdp_features &= ~NETDEV_XDP_ACT_XSK_ZEROCOPY; + } } /* Destroy a bonding device. base-commit: fdeba0b57d61b40a708de361294fde3e1495588d -- 2.42.0