summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/bpf/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/bpf/main.c')
-rw-r--r--drivers/net/ethernet/netronome/nfp/bpf/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/main.c b/drivers/net/ethernet/netronome/nfp/bpf/main.c
index f15a186f6c87..04424db24b80 100644
--- a/drivers/net/ethernet/netronome/nfp/bpf/main.c
+++ b/drivers/net/ethernet/netronome/nfp/bpf/main.c
@@ -121,6 +121,9 @@ static int nfp_bpf_setup_tc_block_cb(enum tc_setup_type type,
struct tc_cls_bpf_offload *cls_bpf = type_data;
struct nfp_net *nn = cb_priv;
+ if (!tc_can_offload(nn->dp.netdev))
+ return -EOPNOTSUPP;
+
switch (type) {
case TC_SETUP_CLSBPF:
if (!nfp_net_ebpf_capable(nn) ||
OpenPOWER on IntegriCloud