[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHX5Lu6Ef4/gLwDS@mev-dev.igk.intel.com>
Date: Tue, 15 Jul 2025 08:46:06 +0200
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Jianbo Liu <jianbol@...dia.com>
Cc: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Tariq Toukan <tariqt@...dia.com>,
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>,
Saeed Mahameed <saeed@...nel.org>, Gal Pressman <gal@...dia.com>,
Leon Romanovsky <leon@...nel.org>,
Saeed Mahameed <saeedm@...dia.com>, Mark Bloch <mbloch@...dia.com>,
netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, Lama Kayal <lkayal@...dia.com>
Subject: Re: [PATCH net-next 1/6] net/mlx5: HWS, Enable IPSec hardware
offload in legacy mode
On Mon, Jul 14, 2025 at 11:04:54PM +0800, Jianbo Liu wrote:
>
>
> On 7/14/2025 2:43 PM, Michal Swiatkowski wrote:
> > On Mon, Jul 14, 2025 at 08:39:40AM +0300, Tariq Toukan wrote:
> > > From: Lama Kayal <lkayal@...dia.com>
> > >
> > > IPSec hardware offload in legacy mode should not be affected by the
> > > steering mode, hence it should also work properly with hmfs mode.
> >
> > What about dmfs mode? I am not sure, if you didn't remove it because it
> > is still needed or just forgot about removing it.
> >
>
> It is still needed.
> We support packet offload for all steering modes in legacy, and only dmfs in
> switchdev. This is the logic we added before:
>
> dmfs smfs
> legacy Y Y
> switchdev Y N
>
> Now we support hmfs. It is the same as smfs. So the table becomes:
> dmfs smfs hmfs
> legacy Y Y Y
> switchdev Y N N
>
> Instead of adding "mdev->priv.steering->mode ==
> MLX5_FLOW_STEERING_MODE_HMFS", We removed "mdev->priv.steering->mode ==
> MLX5_FLOW_STEERING_MODE_SMFS", and the code is simpler and clean.
>
Ok, got it, thanks.
>
> > In case it is ok as it is:
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> >
>
> Yes, it's ok. Thanks for the review.
>
> Jianbo
>
> > Thanks
> >
> > >
> > > Remove steering mode validation when calculating the cap for packet
> > > offload, this will also enable the missing cap MLX5_IPSEC_CAP_PRIO
> > > needed for crypto offload.
> > >
> > > Signed-off-by: Lama Kayal <lkayal@...dia.com>
> > > Reviewed-by: Jianbo Liu <jianbol@...dia.com>
> > > Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> > > ---
> > > .../net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
> > > index 820debf3fbbf..ef7322d381af 100644
> > > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
> > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_offload.c
> > > @@ -42,8 +42,7 @@ u32 mlx5_ipsec_device_caps(struct mlx5_core_dev *mdev)
> > > if (MLX5_CAP_IPSEC(mdev, ipsec_full_offload) &&
> > > (mdev->priv.steering->mode == MLX5_FLOW_STEERING_MODE_DMFS ||
> > > - (mdev->priv.steering->mode == MLX5_FLOW_STEERING_MODE_SMFS &&
> > > - is_mdev_legacy_mode(mdev)))) {
> > > + is_mdev_legacy_mode(mdev))) {
> > > if (MLX5_CAP_FLOWTABLE_NIC_TX(mdev,
> > > reformat_add_esp_trasport) &&
> > > MLX5_CAP_FLOWTABLE_NIC_RX(mdev,
> > > --
> > > 2.40.1
> > >
> >
>
Powered by blists - more mailing lists