summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-07-17 10:53:27 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-07-18 15:10:34 +0200
commit9d1b66b8ae95a0b7c6a12e9d138d41f55e911fde (patch)
treecb64f1ac99ed70745d744ab84fd0b327684fab83 /drivers/net/netdevsim
parentfd4f227dea0f24d89f52f7c4eb3207f84ddcbcbd (diff)
downloadlinux-9d1b66b8ae95a0b7c6a12e9d138d41f55e911fde.tar.gz
linux-9d1b66b8ae95a0b7c6a12e9d138d41f55e911fde.tar.bz2
linux-9d1b66b8ae95a0b7c6a12e9d138d41f55e911fde.zip
netdevsim: allow program sharing between devices
Allow program sharing between devices which were linked together. 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')
-rw-r--r--drivers/net/netdevsim/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c
index 9eab29f67a0e..81444208b216 100644
--- a/drivers/net/netdevsim/bpf.c
+++ b/drivers/net/netdevsim/bpf.c
@@ -294,7 +294,7 @@ nsim_setup_prog_hw_checks(struct netdevsim *ns, struct netdev_bpf *bpf)
NSIM_EA(bpf->extack, "xdpoffload of non-bound program");
return -EINVAL;
}
- if (bpf->prog->aux->offload->netdev != ns->netdev) {
+ if (!bpf_offload_dev_match(bpf->prog, ns->netdev)) {
NSIM_EA(bpf->extack, "program bound to different dev");
return -EINVAL;
}