nfp: bpf: allow program sharing within ASIC
Allow program sharing between netdevs of the same NFP ASIC. 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
9d1b66b8ae
commit
b5faa20d6f
@ -566,14 +566,8 @@ int nfp_net_bpf_offload(struct nfp_net *nn, struct bpf_prog *prog,
|
||||
{
|
||||
int err;
|
||||
|
||||
if (prog) {
|
||||
struct bpf_prog_offload *offload = prog->aux->offload;
|
||||
|
||||
if (!offload)
|
||||
return -EINVAL;
|
||||
if (offload->netdev != nn->dp.netdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (prog && !bpf_offload_dev_match(prog, nn->dp.netdev))
|
||||
return -EINVAL;
|
||||
|
||||
if (prog && old_prog) {
|
||||
u8 cap;
|
||||
|
Loading…
Reference in New Issue
Block a user