From: Marcelo Ricardo Leitner <mleitner@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Cong Wang <xiyou.wangcong@gmail.com>, wenxu <wenxu@ucloud.cn>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net v4] net/sched: cls_flower: Reject invalid ct_state flags rules
Date: Mon, 8 Feb 2021 16:03:51 -0300 [thread overview]
Message-ID: <20210208190351.GF2953@horizon.localdomain> (raw)
In-Reply-To: <20210208104759.77c247c6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Mon, Feb 08, 2021 at 10:47:59AM -0800, Jakub Kicinski wrote:
> On Mon, 8 Feb 2021 10:41:35 -0800 Cong Wang wrote:
> > On Sat, Feb 6, 2021 at 9:26 PM <wenxu@ucloud.cn> wrote:
> > > + if (state && !(state & TCA_FLOWER_KEY_CT_FLAGS_TRACKED)) {
> > > + NL_SET_ERR_MSG_ATTR(extack, tb,
> > > + "ct_state no trk, no other flag are set");
This one was imported from OvS but it's not accurate.
Should be more like: no trk, so no other flag can be set
or something like that.
Seems it doesn't need to explicitly mention "ct_state" in the msg,
btw. I can't check it right now but all other uses of
NL_SET_ERR_MSG_ATTR are not doing it, at least in cls_flower.c.
> > > + return -EINVAL;
> > > + }
> > > +
> > > + if (state & TCA_FLOWER_KEY_CT_FLAGS_NEW &&
> > > + state & TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED) {
> > > + NL_SET_ERR_MSG_ATTR(extack, tb,
> > > + "ct_state new and est are exclusive");
> >
> > Please spell out the full words, "trk" and "est" are not good abbreviations.
>
> It does match user space naming in OvS as well as iproute2:
I also think it makes sense as is.
>
> { "trk", TCA_FLOWER_KEY_CT_FLAGS_TRACKED },
> { "new", TCA_FLOWER_KEY_CT_FLAGS_NEW },
> { "est", TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED },
> { "inv", TCA_FLOWER_KEY_CT_FLAGS_INVALID },
> { "rpl", TCA_FLOWER_KEY_CT_FLAGS_REPLY },
>
> IDK about netfilter itself.
>
next prev parent reply other threads:[~2021-02-08 19:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 5:13 [PATCH net v4] net/sched: cls_flower: Reject invalid ct_state flags rules wenxu
2021-02-08 18:41 ` Cong Wang
2021-02-08 18:47 ` Jakub Kicinski
2021-02-08 19:03 ` Marcelo Ricardo Leitner [this message]
2021-02-09 5:36 ` Cong Wang
2021-02-08 18:57 ` Marcelo Ricardo Leitner
2021-02-08 19:21 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208190351.GF2953@horizon.localdomain \
--to=mleitner@redhat.com \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wenxu@ucloud.cn \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox