From 03d41926d03a4a4000a5e002c570545c12cd78a8 Mon Sep 17 00:00:00 2001 From: Yevgeny Kliteynik Date: Tue, 15 Sep 2026 14:19:11 +0300 Subject: [PATCH] net/mlx5: HWS, Handle timeout draining the send queue for FW STEs Handle a case in mlx5hws_send_stes_fw where draining a queue fails with timeout. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Signed-off-by: Tariq Toukan Link: https://patch.msgid.link/20260915111912.3926585-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski --- .../ethernet/mellanox/mlx5/core/steering/hws/send.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c index 9ff109fc8230..bddac018b44b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c @@ -1335,10 +1335,14 @@ void mlx5hws_send_stes_fw(struct mlx5hws_context *ctx, pdn = ctx->pd_num; /* Writing through FW can't HW fence, therefore we drain the queue */ - if (send_attr->fence) - mlx5hws_send_queue_action(ctx, - queue_id, - MLX5HWS_SEND_QUEUE_ACTION_DRAIN_SYNC); + if (send_attr->fence) { + enum mlx5hws_send_queue_actions drain = + MLX5HWS_SEND_QUEUE_ACTION_DRAIN_SYNC; + + ret = mlx5hws_send_queue_action(ctx, queue_id, drain); + if (ret) + goto fail_rule; + } if (ste_attr->rtc_1) { send_attr->id = ste_attr->rtc_1;