]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5: HWS, add error message on failure to move rules
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 2 Jan 2025 18:14:04 +0000 (20:14 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Jan 2025 00:33:40 +0000 (16:33 -0800)
Add error message for failure to move rules from
old matcher to new one during rehash.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Itamar Gozlan <igozlan@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250102181415.1477316-6-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c

index baacf662c0ab898970140b552930320d326bb484..af8ab8750c703f436a210db87a63d3a864c388f4 100644 (file)
@@ -615,8 +615,12 @@ static int hws_bwc_matcher_move_all_simple(struct mlx5hws_bwc_matcher *bwc_match
 
                                ret = hws_bwc_queue_poll(ctx, rule_attr.queue_id,
                                                         &pending_rules[i], false);
-                               if (unlikely(ret))
+                               if (unlikely(ret)) {
+                                       mlx5hws_err(ctx,
+                                                   "Moving BWC rule failed during rehash (%d)\n",
+                                                   ret);
                                        goto free_bwc_rules;
+                               }
                        }
                }
        } while (!all_done);
@@ -629,8 +633,11 @@ static int hws_bwc_matcher_move_all_simple(struct mlx5hws_bwc_matcher *bwc_match
                        mlx5hws_send_engine_flush_queue(&ctx->send_queue[queue_id]);
                        ret = hws_bwc_queue_poll(ctx, queue_id,
                                                 &pending_rules[i], true);
-                       if (unlikely(ret))
+                       if (unlikely(ret)) {
+                               mlx5hws_err(ctx,
+                                           "Moving BWC rule failed during rehash (%d)\n", ret);
                                goto free_bwc_rules;
+                       }
                }
        }