diff options
| author | Jakub Kicinski <[email protected]> | 2025-03-11 09:28:20 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-12 20:39:59 +0000 |
| 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 | kernel-e016cf5f39e9c53e274a7b7122a949d8839b8782.tar.gz kernel-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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
| -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); |
