Skip to content

Commit 9854b24

Browse files
gal-pressmankuba-moo
authored andcommitted
net/mlx5e: MACsec, add ASO poll loop in macsec_aso_set_arm_event
The macsec_aso_set_arm_event function calls mlx5_aso_poll_cq once without a retry loop. If the CQE is not immediately available after posting the WQE, the function fails unnecessarily. Use read_poll_timeout() to poll 3-10 usecs for CQE, consistent with other ASO polling code paths in the driver. Fixes: 739cfa3 ("net/mlx5: Make ASO poll CQ usable in atomic context") Signed-off-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Jianbo Liu <jianbol@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Jacob Keller <Jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260218072904.1764634-5-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d451994 commit 9854b24

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,8 @@ static int macsec_aso_set_arm_event(struct mlx5_core_dev *mdev, struct mlx5e_mac
13861386
MLX5_ACCESS_ASO_OPC_MOD_MACSEC);
13871387
macsec_aso_build_ctrl(aso, &aso_wqe->aso_ctrl, in);
13881388
mlx5_aso_post_wqe(maso, false, &aso_wqe->ctrl);
1389-
err = mlx5_aso_poll_cq(maso, false);
1389+
read_poll_timeout(mlx5_aso_poll_cq, err, !err, 10, 10 * USEC_PER_MSEC,
1390+
false, maso, false);
13901391
mutex_unlock(&aso->aso_lock);
13911392

13921393
return err;

0 commit comments

Comments
 (0)