[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee18ca51-fe6a-456b-9466-39e81d484e66@intel.com>
Date: Mon, 13 Jan 2025 11:07:03 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Eric
Dumazet" <edumazet@...gle.com>, Andrew Lunn <andrew+netdev@...n.ch>
CC: <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Mark Bloch
<mbloch@...dia.com>, Moshe Shemesh <moshe@...dia.com>
Subject: Re: [PATCH net 6/8] net/mlx5e: Properly match IPsec subnet addresses
On 1/13/2025 7:40 AM, Tariq Toukan wrote:
> +static void addr4_to_mask(__be32 *addr, __be32 *mask)
> +{
> + int i;
> +
> + *mask = 0;
> + for (i = 0; i < 4; i++)
> + *mask |= ((*addr >> 8 * i) & 0xFF) ? (0xFF << 8 * i) : 0;
> +}
> +
I'm surprised this isn't already a common helper function.
Powered by blists - more mailing lists