[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250915191356.GW224143@horms.kernel.org>
Date: Mon, 15 Sep 2025 20:13:56 +0100
From: Simon Horman <horms@...nel.org>
To: Carolina Jubran <cjubran@...dia.com>
Cc: Tariq Toukan <tariqt@...dia.com>, Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Mark Bloch <mbloch@...dia.com>,
Sabrina Dubroca <sd@...asysnail.net>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
Gal Pressman <gal@...dia.com>, Dragos Tatulea <dtatulea@...dia.com>,
Jianbo Liu <jianbol@...dia.com>
Subject: Re: [PATCH mlx5-next 2/3] net/mlx5: Refactor MACsec WQE metadata
shifts
On Mon, Sep 15, 2025 at 09:23:04AM +0300, Carolina Jubran wrote:
>
> On 12/09/2025 18:49, Simon Horman wrote:
> > On Thu, Sep 11, 2025 at 10:10:18AM +0300, Tariq Toukan wrote:
> > > From: Carolina Jubran <cjubran@...dia.com>
...
> Hi Simon,
>
> Thanks for the suggestion!
>
> The goal with this patch was to clearly show which bits are used for
> each feature in the metadata field, rather than compressing everything
> under a single mask. That’s why we chose to explicitly define MACsec,
> FS_ID_MASK, and the shift separately. This way, its easy to see at a
> glance that MACsec uses bit 1, and bits 2–5 are reserved for the fs_id.
>
> Using FIELD_PREP can work, but it hides the bit layout behind one
> mask, which makes it harder to reason about when multiple features
> share the same 32-bit field. We wanted to keep things more readable
> and maintainable by showing the bit assignments explicitly.
>
> Carolina
Hi Carolina.
Thanks for your response.
If this is a deliberate choice then I'm happy with the current approach.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists