[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZhYfU/KUBHIAZffi@LouisNoVo>
Date: Wed, 10 Apr 2024 07:10:43 +0200
From: Louis Peens <louis.peens@...igine.com>
To: Asbjørn Sloth Tønnesen <ast@...erby.net>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Taras Chornyi <taras.chornyi@...ision.eu>,
Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Yanguo Li <yanguo.li@...igine.com>,
oss-drivers@...igine.com, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Edward Cree <ecree.xilinx@...il.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next 1/6] flow_offload: add
flow_rule_no_unsupp_control_flags()
On Tue, Apr 09, 2024 at 11:13:22AM +0000, Asbjørn Sloth Tønnesen wrote:
> [Some people who received this message don't often get email from ast@...erby.net. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> > > +static inline bool flow_rule_no_unsupp_control_flags(const u32 supp_flags,
> > > + const u32 flags,
> > > + struct netlink_ext_ack *extack)
> > Thanks for the change Asbjørn, I like the series in general. I do have
> > some nitpicking with the naming of this function, the double negative
> > makes it a bit hard to read. Especially where it gets used, where it
> > then reads as:
> > 'if not no unsupported'
> >
> > I think something like:
> > 'if not supported'
> > or
> > 'if unsupported'
> >
> > will read much better - personally I think the first option is the best,
> > otherwise you might end up with 'if not unsupported', which is also
> > weird.
> >
> > Some possible suggestions I can think of:
> > flow_rule_control_flags_is_supp()
> > flow_rule_is_supp_control_flags()
> > flow_rule_check_supp_control_flags()
> >
> > or perhaps some even better variant of this. I hope it's not just me, if
> > that's the case please feel free to ignore.
> I agree, I will update the naming in v2:
>
> flow_rule_no_unsupp_control_flags => flow_rule_is_supp_control_flags
> flow_rule_no_control_flags + s/no/has/ => flow_rule_has_control_flags
> flow_rule_match_no_control_flags + s/no/has/ => flow_rule_match_has_control_flags
Hi Asbjørn. I like these, I think it will follow much easier, thanks.
Regards
Louis
>
> --
> Best regards
> Asbjørn Sloth Tønnesen
> Network Engineer
> Fiberby - AS42541
Powered by blists - more mailing lists