summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBaowen Zheng <baowen.zheng@corigine.com>2022-03-02 04:29:29 +0100
committerJakub Kicinski <kuba@kernel.org>2022-03-03 07:16:10 +0100
commitd922a99b96d0030f2e7e8128e98f29123172bd03 (patch)
tree746df94ebd64b98ca9deeb75339b06af1d6fb727 /net
parentMerge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/n... (diff)
downloadlinux-d922a99b96d0030f2e7e8128e98f29123172bd03.tar.xz
linux-d922a99b96d0030f2e7e8128e98f29123172bd03.zip
flow_offload: improve extack msg for user when adding invalid filter
Add extack message to return exact message to user when adding invalid filter with conflict flags for TC action. In previous implement we just return EINVAL which is confusing for user. Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Link: https://lore.kernel.org/r/1646191769-17761-1-git-send-email-baowen.zheng@corigine.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/sched/act_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index ca03e7284254..4f51094da9da 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1446,6 +1446,8 @@ int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
continue;
if (skip_sw != tc_act_skip_sw(act->tcfa_flags) ||
skip_hw != tc_act_skip_hw(act->tcfa_flags)) {
+ NL_SET_ERR_MSG(extack,
+ "Mismatch between action and filter offload flags");
err = -EINVAL;
goto err;
}