Re: [PATCH net-next 1/6] flow_offload: add flow_rule_no_unsupp_control_flags()

From: Louis Peens
Date: Wed Apr 10 2024 - 01:12:13 EST


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@xxxxxxxxxxx. 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