[PATCH net-next 5/6] net/mlx5: HWS, Handle timeout draining the send queue for FW STEs
From: Tariq Toukan
Date: Tue Sep 15 2026 - 07:36:02 EST
From: Yevgeny Kliteynik <kliteyn@xxxxxxxxxx>
Handle a case in mlx5hws_send_stes_fw where
draining a queue fails with timeout.
Signed-off-by: Yevgeny Kliteynik <kliteyn@xxxxxxxxxx>
Reviewed-by: Erez Shitrit <erezsh@xxxxxxxxxx>
Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
---
.../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;
--
2.44.0