summaryrefslogtreecommitdiffstats
path: root/net/sched/act_mirred.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2022-04-07 10:35:24 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-08 13:45:43 +0100
commit4dcaa50d02927f045c8653ba992aadc7c94ee71a (patch)
tree1a1f04e0475dae80f4633793ea5ef2c5f6c118a6 /net/sched/act_mirred.c
parent69642c2ab2f553fd8c4c121fcdf3b3054c727e86 (diff)
downloadlinux-4dcaa50d02927f045c8653ba992aadc7c94ee71a.tar.bz2
net/sched: act_mirred: Add extack message for offload failure
For better error reporting to user space, add an extack message when mirred action offload fails. Currently, the failure cannot be triggered, but add a message in case the action is extended in the future to support more than ingress/egress mirror/redirect. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_mirred.c')
-rw-r--r--net/sched/act_mirred.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 70a6a4447e6b..ebb92fb072ab 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -479,6 +479,7 @@ static int tcf_mirred_offload_act_setup(struct tc_action *act, void *entry_data,
entry->id = FLOW_ACTION_MIRRED_INGRESS;
tcf_offload_mirred_get_dev(entry, act);
} else {
+ NL_SET_ERR_MSG_MOD(extack, "Unsupported mirred offload");
return -EOPNOTSUPP;
}
*index_inc = 1;