[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62c233a0-a63d-beae-b027-d9449c4816a5@intel.com>
Date: Mon, 28 Nov 2022 15:43:04 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Saeed Mahameed <saeed@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>
CC: Saeed Mahameed <saeedm@...dia.com>, <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...dia.com>,
Raed Salem <raeds@...dia.com>, Emeel Hakim <ehakim@...dia.com>
Subject: Re: [net 14/15] net/mlx5e: MACsec, fix Tx SA active field update
On 11/24/2022 12:10 AM, Saeed Mahameed wrote:
> From: Raed Salem <raeds@...dia.com>
>
> Currently during update Tx security association (SA) flow, the Tx SA
> active state is updated only if the Tx SA in question is the same SA
> that the MACsec interface is using for Tx,in consequence when the
> MACsec interface chose to work with this Tx SA later, where this SA
> for example should have been updated to active state and it was not,
> the relevant Tx SA HW context won't be installed, hence the MACSec
> flow won't be offloaded.
>
> Fix by update Tx SA active state as part of update flow regardless
> whether the SA in question is the same Tx SA used by the MACsec
> interface.
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
>
> Fixes: 8ff0ac5be144 ("net/mlx5: Add MACsec offload Tx command support")
> Signed-off-by: Raed Salem <raeds@...dia.com>
> Reviewed-by: Emeel Hakim <ehakim@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> index 72f8be65fa90..137b34347de1 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> @@ -602,6 +602,7 @@ static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx)
> if (tx_sa->active == ctx_tx_sa->active)
> goto out;
>
> + tx_sa->active = ctx_tx_sa->active;
> if (tx_sa->assoc_num != tx_sc->encoding_sa)
> goto out;
>
> @@ -617,8 +618,6 @@ static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx)
>
> mlx5e_macsec_cleanup_sa(macsec, tx_sa, true);
> }
> -
> - tx_sa->active = ctx_tx_sa->active;
> out:
> mutex_unlock(&macsec->lock);
>
Powered by blists - more mailing lists