diff options
author | 2025-03-11 10:28:20 +0100 | |
---|---|---|
committer | 2025-03-12 13:39:59 -0700 | |
commit | e016cf5f39e9c53e274a7b7122a949d8839b8782 (patch) | |
tree | 721ff5a965b65854b6d9bc99bc581ff5a24431d2 /drivers/net/netdevsim/netdev.c | |
parent | Merge branch 'net-remove-rtnl_lock-from-the-callers-of-queue-apis' (diff) | |
download | wireguard-linux-e016cf5f39e9c53e274a7b7122a949d8839b8782.tar.xz wireguard-linux-e016cf5f39e9c53e274a7b7122a949d8839b8782.zip |
netdevsim: 'support' multi-buf XDP
Don't error out on large MTU if XDP is multi-buf.
The ping test now tests ping with XDP and high MTU.
netdevsim doesn't actually run the prog (yet?) so
it doesn't matter if the prog was multi-buf..
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://patch.msgid.link/20250311092820.542148-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/netdevsim/netdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index e3152ebe98a2..b67af4651185 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -116,7 +116,8 @@ static int nsim_change_mtu(struct net_device *dev, int new_mtu) { struct netdevsim *ns = netdev_priv(dev); - if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU) + if (ns->xdp.prog && !ns->xdp.prog->aux->xdp_has_frags && + new_mtu > NSIM_XDP_MAX_MTU) return -EBUSY; WRITE_ONCE(dev->mtu, new_mtu); |