diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-07-11 20:36:42 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-07-13 20:26:35 +0200 |
commit | 799e173d7125155c00e9492c8212c5e41333049f (patch) | |
tree | 6bf24c8ba22ca0fbc35ae1d0c87cf82b2a615f8d /drivers/net/netdevsim/netdev.c | |
parent | a25717d2b604347d9af8da81deea7b08e8c94220 (diff) | |
download | linux-stable-799e173d7125155c00e9492c8212c5e41333049f.tar.gz linux-stable-799e173d7125155c00e9492c8212c5e41333049f.tar.bz2 linux-stable-799e173d7125155c00e9492c8212c5e41333049f.zip |
netdevsim: add support for simultaneous driver and hw XDP
Allow netdevsim to accept driver and offload attachment of XDP
BPF programs at the same time.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
-rw-r--r-- | drivers/net/netdevsim/netdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index b2f9d0df93b0..a7b179f0d954 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -228,8 +228,7 @@ static int nsim_change_mtu(struct net_device *dev, int new_mtu) { struct netdevsim *ns = netdev_priv(dev); - if (ns->xdp_prog_mode == XDP_ATTACHED_DRV && - new_mtu > NSIM_XDP_MAX_MTU) + if (ns->xdp.prog && new_mtu > NSIM_XDP_MAX_MTU) return -EBUSY; dev->mtu = new_mtu; |