mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 10:56:40 +00:00
nfp: bpf: reject TC offload if XDP loaded
Recent TC changes dropped the check protecting us from trying
to offload a TC program if XDP programs are already loaded.
Fixes: 90d97315b3
("nfp: bpf: Convert ndo_setup_tc offloads to block callbacks")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dc4646a950
commit
f449657f83
@ -130,6 +130,9 @@ static int nfp_bpf_setup_tc_block_cb(enum tc_setup_type type,
|
||||
cls_bpf->common.protocol != htons(ETH_P_ALL) ||
|
||||
cls_bpf->common.chain_index)
|
||||
return -EOPNOTSUPP;
|
||||
if (nn->dp.bpf_offload_xdp)
|
||||
return -EBUSY;
|
||||
|
||||
return nfp_net_bpf_offload(nn, cls_bpf);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
|
Loading…
Reference in New Issue
Block a user