[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240227193458.38a79c56@kernel.org>
Date: Tue, 27 Feb 2024 19:34:58 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
<netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>, "David Ahern"
<dsahern@...nel.org>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 2/7] net: nexthop: Add NHA_OP_FLAGS
On Tue, 27 Feb 2024 19:17:27 +0100 Petr Machata wrote:
> + /* bitfield32; operation-specific flags */
> + NHA_OP_FLAGS,
> static const struct nla_policy rtm_nh_policy_get[] = {
> [NHA_ID] = { .type = NLA_U32 },
> + [NHA_OP_FLAGS] = NLA_POLICY_BITFIELD32(0),
Why bitfiled? You never use the mask.
bitfield gives you the ability to do RMW "atomically" on object fields.
For op flags I don't think it makes much sense.
Powered by blists - more mailing lists