[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2PWiNKaCHz3yOJ8@shredder>
Date: Thu, 19 Dec 2024 10:17:12 +0200
From: Ido Schimmel <idosch@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
edumazet@...gle.com, dsahern@...nel.org, donald.hunter@...il.com,
horms@...nel.org, gnault@...hat.com, rostedt@...dmis.org,
mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
petrm@...dia.com
Subject: Re: [PATCH net-next 3/9] ipv6: fib_rules: Add flow label support
On Wed, Dec 18, 2024 at 07:05:09PM -0800, Jakub Kicinski wrote:
> On Mon, 16 Dec 2024 19:11:55 +0200 Ido Schimmel wrote:
> > + if (flowlabel_mask & ~IPV6_FLOWLABEL_MASK) {
> > + NL_SET_ERR_MSG_ATTR(extack, tb[FRA_FLOWLABEL_MASK],
> > + "Invalid flow label mask");
> > + return -EINVAL;
> > + }
>
> Have you considered NLA_POLICY_MASK() ?
> Technically it does support be32, but we'd need to bswap ~IPV6_FLOWLABEL_MASK
> and you need the helper anyway... so up to you.
I did consider it, but I preferred to have all the checks at the same
place in the IPv6 code instead of having it split between IPv6 and core
>
> > + if (flowlabel & ~flowlabel_mask) {
> > + NL_SET_ERR_MSG(extack, "Flow label and mask do not match");
> > + return -EINVAL;
> > + }
Powered by blists - more mailing lists