[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220301175553.55274863@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date: Tue, 1 Mar 2022 17:55:53 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Baowen Zheng <baowen.zheng@...igine.com>
Cc: davem@...emloft.net, xiyou.wangcong@...il.com, jhs@...atatu.com,
netdev@...r.kernel.org, roid@...dia.com, oss-drivers@...igine.com,
simon.horman@...igine.com
Subject: Re: [PATCH net-next v1] flow_offload: improve extack msg for user
when adding invalid filter
On Mon, 28 Feb 2022 18:44:15 +0800 Baowen Zheng wrote:
> 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@...igine.com>
> ---
> net/sched/act_api.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index ca03e72..eb0d7bd 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,
> + "Conflict occurs for TC action and filter flags");
Good improvement but I think we can reword a little, how about:
"Mismatch between action and filter offload flags" ?
> err = -EINVAL;
> goto err;
> }
Powered by blists - more mailing lists