summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2022-04-07 09:35:26 +0200
committerDavid S. Miller <davem@davemloft.net>2022-04-08 14:45:43 +0200
commitbf3b99e4f9ce52e8da6158894be5679d1217082b (patch)
treee6f26bd452a90c98a015d8a49c1054718fa934a3
parentnet/sched: act_mpls: Add extack messages for offload failure (diff)
downloadlinux-bf3b99e4f9ce52e8da6158894be5679d1217082b.tar.xz
linux-bf3b99e4f9ce52e8da6158894be5679d1217082b.zip
net/sched: act_pedit: Add extack message for offload failure
For better error reporting to user space, add an extack message when pedit 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 set/add commands. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/act_pedit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index dc12d502c4fe..e01ef7f109f4 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -504,6 +504,7 @@ static int tcf_pedit_offload_act_setup(struct tc_action *act, void *entry_data,
entry->id = FLOW_ACTION_ADD;
break;
default:
+ NL_SET_ERR_MSG_MOD(extack, "Unsupported pedit command offload");
return -EOPNOTSUPP;
}
entry->mangle.htype = tcf_pedit_htype(act, k);