summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2022-04-07 09:35:24 +0200
committerDavid S. Miller <davem@davemloft.net>2022-04-08 14:45:43 +0200
commit4dcaa50d02927f045c8653ba992aadc7c94ee71a (patch)
tree1a1f04e0475dae80f4633793ea5ef2c5f6c118a6 /net/sched
parentnet/sched: act_gact: Add extack messages for offload failure (diff)
downloadlinux-4dcaa50d02927f045c8653ba992aadc7c94ee71a.tar.xz
linux-4dcaa50d02927f045c8653ba992aadc7c94ee71a.zip
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')
-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;