mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
fd4f227dea
commit
9d1b66b8ae
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue