提交 d922a99b 编写于 作者: B Baowen Zheng 提交者: Jakub Kicinski

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: NBaowen Zheng <baowen.zheng@corigine.com>
Reviewed-by: NRoi Dayan <roid@nvidia.com>
Link: https://lore.kernel.org/r/1646191769-17761-1-git-send-email-baowen.zheng@corigine.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 2102a27e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册