[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210222121239.GA2960@horizon.localdomain>
Date: Mon, 22 Feb 2021 09:12:39 -0300
From: Marcelo Ricardo Leitner <mleitner@...hat.com>
To: wenxu@...oud.cn
Cc: kuba@...nel.org, mleitner@...hat.com, netdev@...r.kernel.org,
jhs@...atatu.com, Oz Shlomo <ozsh@...dia.com>,
Paul Blakey <paulb@...dia.com>
Subject: Re: [PATCH net-next] net/sched: cls_flower: validate ct_state for
invalid and reply flags
On Mon, Feb 22, 2021 at 02:09:50PM +0800, wenxu@...oud.cn wrote:
> From: wenxu <wenxu@...oud.cn>
>
> Add invalid and reply flags validate in the fl_validate_ct_state.
This makes the checking complete if compared to ovs'
validate_ct_state().
...
> + if (state & TCA_FLOWER_KEY_CT_FLAGS_INVALID &&
> + state & ~(TCA_FLOWER_KEY_CT_FLAGS_TRACKED |
> + TCA_FLOWER_KEY_CT_FLAGS_INVALID)) {
> + NL_SET_ERR_MSG_ATTR(extack, tb,
> + "when inv is set, only trk also be set");
The message is missing the verb:
+ "when inv is set, only trk may also be set");
Other than this, LGTM.
> + return -EINVAL;
> + }
> +
> + if (state & TCA_FLOWER_KEY_CT_FLAGS_NEW &&
> + state & TCA_FLOWER_KEY_CT_FLAGS_REPLY) {
> + NL_SET_ERR_MSG_ATTR(extack, tb,
> + "new and rpl are mutually exclusive");
> + return -EINVAL;
> + }
> +
> return 0;
> }
>
> --
> 1.8.3.1
>
Powered by blists - more mailing lists