[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdd16b2e-13eb-46de-99bf-68a500c960c0@gmail.com>
Date: Tue, 8 Apr 2025 20:06:08 +0300
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Cosmin Ratiu <cratiu@...dia.com>, netdev@...r.kernel.org
Cc: Hangbin Liu <liuhangbin@...il.com>, Jay Vosburgh <jv@...sburgh.net>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Nikolay Aleksandrov <razor@...ckwall.org>, Simon Horman <horms@...nel.org>,
Saeed Mahameed <saeedm@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
Jianbo Liu <jianbol@...dia.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ayush Sawal <ayush.sawal@...lsio.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Sunil Goutham <sgoutham@...vell.com>, Geetha sowjanya <gakula@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>, hariprasad <hkelam@...vell.com>,
Bharat Bhushan <bbhushan2@...vell.com>,
Louis Peens <louis.peens@...igine.com>, Leon Romanovsky <leonro@...dia.com>,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 1/6] net/mlx5: Avoid using xso.real_dev
unnecessarily
On 07/04/2025 16:35, Cosmin Ratiu wrote:
> xso.real_dev is the active device of an offloaded xfrm state and is
> managed by bonding. As such, it's subject to change when states are
> migrated to a new device. Using it in places other than
> offloading/unoffloading the states is risky.
>
> This commit saves the device into the driver-specific struct
> mlx5e_ipsec_sa_entry and switches mlx5e_ipsec_init_macs() and
> mlx5e_ipsec_netevent_event() to make use of it.
>
> Additionally, mlx5e_xfrm_update_stats() used xso.real_dev to validate
> that correct net locks are held. But in a bonding config, the net of the
> master device is the same as the underlying devices, and the net is
> already a local var, so use that instead.
>
> The only remaining references to xso.real_dev are now in the
> .xdo_dev_state_add() / .xdo_dev_state_delete() path.
>
> Signed-off-by: Cosmin Ratiu <cratiu@...dia.com>
> Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Acked-by: Tariq Toukan <tariqt@...dia.com>
Thanks.
Powered by blists - more mailing lists