From: Itamar Gozlan <igozlan@nvidia.com>
To: <igozlan@nvidia.com>, <erezsh@nvidia.com>, <hamdani@nvidia.com>,
<kliteyn@nvidia.com>, <viacheslavo@nvidia.com>,
<thomas@monjalon.net>, <suanmingm@nvidia.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Ori Kam <orika@nvidia.com>, Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>
Subject: [v2 15/16] net/mlx5/hws: dump action ste arrays info
Date: Mon, 6 May 2024 14:44:18 +0300 [thread overview]
Message-ID: <20240506114419.966498-15-igozlan@nvidia.com> (raw)
In-Reply-To: <20240506114419.966498-1-igozlan@nvidia.com>
From: Hamdan Igbaria <hamdani@nvidia.com>
Dump action ste arrays info for resizing matchers.
Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_debug.c | 23 +++++++++++++++++++++++
drivers/net/mlx5/hws/mlx5dr_debug.h | 1 +
drivers/net/mlx5/hws/mlx5dr_matcher.c | 1 +
drivers/net/mlx5/hws/mlx5dr_matcher.h | 1 +
4 files changed, 26 insertions(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.c b/drivers/net/mlx5/hws/mlx5dr_debug.c
index 8f07c7fd66..5ad4ca2da5 100644
--- a/drivers/net/mlx5/hws/mlx5dr_debug.c
+++ b/drivers/net/mlx5/hws/mlx5dr_debug.c
@@ -206,6 +206,7 @@ static int mlx5dr_debug_dump_matcher(FILE *f, struct mlx5dr_matcher *matcher)
bool is_shared = mlx5dr_context_shared_gvmi_used(matcher->tbl->ctx);
bool is_root = matcher->tbl->level == MLX5DR_ROOT_LEVEL;
enum mlx5dr_table_type tbl_type = matcher->tbl->type;
+ struct mlx5dr_matcher_resize_data *resize_data;
struct mlx5dr_cmd_ft_query_attr ft_attr = {0};
struct mlx5dr_devx_obj *ste_0, *ste_1 = NULL;
struct mlx5dr_pool_chunk *ste;
@@ -288,6 +289,28 @@ static int mlx5dr_debug_dump_matcher(FILE *f, struct mlx5dr_matcher *matcher)
if (ret)
return ret;
+ LIST_FOREACH(resize_data, &matcher->resize_data, next) {
+ ste = &resize_data->ste;
+ ste_pool = resize_data->action_ste_pool;
+ if (ste_pool) {
+ ste_0 = mlx5dr_pool_chunk_get_base_devx_obj(ste_pool, ste);
+ if (tbl_type == MLX5DR_TABLE_TYPE_FDB)
+ ste_1 = mlx5dr_pool_chunk_get_base_devx_obj_mirror(ste_pool, ste);
+ } else {
+ ste_0 = NULL;
+ ste_1 = NULL;
+ }
+ ret = fprintf(f, "%d,0x%" PRIx64 ",%d,%d,%d,%d\n",
+ MLX5DR_DEBUG_RES_TYPE_MATCHER_RESIZABLE_ACTION_ARRAY,
+ (uint64_t)(uintptr_t)matcher,
+ resize_data->action_ste_rtc_0 ? resize_data->action_ste_rtc_0->id : 0,
+ ste_0 ? (int)ste_0->id : -1,
+ resize_data->action_ste_rtc_1 ? resize_data->action_ste_rtc_1->id : 0,
+ ste_1 ? (int)ste_1->id : -1);
+ if (ret < 0)
+ return ret;
+ }
+
return 0;
out_err:
diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.h b/drivers/net/mlx5/hws/mlx5dr_debug.h
index a89a6a0b1d..b69002b5cd 100644
--- a/drivers/net/mlx5/hws/mlx5dr_debug.h
+++ b/drivers/net/mlx5/hws/mlx5dr_debug.h
@@ -25,6 +25,7 @@ enum mlx5dr_debug_res_type {
MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_HASH_DEFINER = 4205,
MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_RANGE_DEFINER = 4206,
MLX5DR_DEBUG_RES_TYPE_MATCHER_TEMPLATE_COMPARE_MATCH_DEFINER = 4207,
+ MLX5DR_DEBUG_RES_TYPE_MATCHER_RESIZABLE_ACTION_ARRAY = 4208,
};
static inline uint64_t
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 78d525e578..8f1a202f81 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -724,6 +724,7 @@ mlx5dr_matcher_resize_init(struct mlx5dr_matcher *src_matcher)
return rte_errno;
}
+ resize_data->ste = src_matcher->action_ste.ste;
resize_data->stc = src_matcher->action_ste.stc;
resize_data->action_ste_rtc_0 = src_matcher->action_ste.rtc_0;
resize_data->action_ste_rtc_1 = src_matcher->action_ste.rtc_1;
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.h b/drivers/net/mlx5/hws/mlx5dr_matcher.h
index 6dc3bf4d0d..caff403a38 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.h
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.h
@@ -62,6 +62,7 @@ struct mlx5dr_matcher_action_ste {
};
struct mlx5dr_matcher_resize_data {
+ struct mlx5dr_pool_chunk ste;
struct mlx5dr_pool_chunk stc;
struct mlx5dr_devx_obj *action_ste_rtc_0;
struct mlx5dr_devx_obj *action_ste_rtc_1;
--
2.39.3
next prev parent reply other threads:[~2024-05-06 11:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 11:42 [PATCH 01/13] net/mlx5/hws: move warn into debug level when needed Itamar Gozlan
2024-03-14 11:42 ` [PATCH 02/13] common/mlx5: fix error in mlx5 prm structs Itamar Gozlan
2024-03-14 11:42 ` [PATCH 03/13] net/mlx5/hws: fix wrong comment in mlx5dr_send Itamar Gozlan
2024-03-14 11:42 ` [PATCH 04/13] net/mlx5/hws: remove unused capabilities and fields Itamar Gozlan
2024-03-14 11:42 ` [PATCH 05/13] net/mlx5/hws: return -rte_errno on rule creation failure Itamar Gozlan
2024-03-14 11:42 ` [PATCH 06/13] net/mlx5/hws: simplify send_queues_close code Itamar Gozlan
2024-03-14 11:42 ` [PATCH 07/13] net/mlx5/hws: fix error flow in mlx5dr_context_open Itamar Gozlan
2024-03-14 11:42 ` [PATCH 08/13] net/mlx5/hws: fix code analysis error in passing 0 enum val Itamar Gozlan
2024-03-14 11:42 ` [PATCH 09/13] net/mlx5/hws: simplify code for updating CQ doorbell record Itamar Gozlan
2024-03-14 11:42 ` [PATCH 10/13] net/mlx5/hws: fix rule is in resize check Itamar Gozlan
2024-03-14 11:42 ` [PATCH 11/13] net/mlx5/hws: drop at attach number of actions Itamar Gozlan
2024-03-14 11:42 ` [PATCH 12/13] net/mlx5/hws: extending tag saving for match and jumbo Itamar Gozlan
2024-03-14 11:42 ` [PATCH 13/13] net/mlx5/hws: fix port ID for root matcher and rule Itamar Gozlan
2024-03-18 12:56 ` [PATCH 01/13] net/mlx5/hws: move warn into debug level when needed Raslan Darawsheh
2024-03-18 14:48 ` Thomas Monjalon
2024-03-19 7:33 ` Raslan Darawsheh
2024-03-20 16:35 ` Yevgeny Kliteynik
2024-05-06 11:44 ` [v2 01/16] " Itamar Gozlan
2024-05-06 11:44 ` [v2 02/16] common/mlx5: fix error in mlx5 prm structs Itamar Gozlan
2024-05-06 11:44 ` [v2 03/16] net/mlx5/hws: fix wrong comment in mlx5dr send Itamar Gozlan
2024-05-06 11:44 ` [v2 04/16] net/mlx5/hws: remove unused capabilities and fields Itamar Gozlan
2024-05-06 11:44 ` [v2 05/16] net/mlx5/hws: negating rte errno on rule creation failure Itamar Gozlan
2024-05-06 11:44 ` [v2 06/16] net/mlx5/hws: simplify send queues close code Itamar Gozlan
2024-05-06 11:44 ` [v2 07/16] net/mlx5/hws: fix error flow in mlx5dr context open Itamar Gozlan
2024-05-06 11:44 ` [v2 08/16] net/mlx5/hws: fix code analysis error in passing 0 enum val Itamar Gozlan
2024-05-06 11:44 ` [v2 09/16] net/mlx5/hws: simplify code for updating CQ doorbell record Itamar Gozlan
2024-05-06 11:44 ` [v2 10/16] net/mlx5/hws: drop at attach number of actions Itamar Gozlan
2024-05-06 11:44 ` [v2 11/16] net/mlx5/hws: extending tag saving for match and jumbo Itamar Gozlan
2024-05-06 11:44 ` [v2 12/16] net/mlx5/hws: dw order optimization code enhancement Itamar Gozlan
2024-05-06 11:44 ` [v2 13/16] net/mlx5/hws: set default miss when replacing table Itamar Gozlan
2024-05-06 11:44 ` [v2 14/16] net/mlx5/hws: fix invalid memory access in decapl3 Itamar Gozlan
2024-05-06 11:44 ` Itamar Gozlan [this message]
2024-05-06 11:44 ` [v2 16/16] net/mlx5/hws: fix action template only term param dump print Itamar Gozlan
2024-05-20 10:50 ` [v2 01/16] net/mlx5/hws: move warn into debug level when needed Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240506114419.966498-15-igozlan@nvidia.com \
--to=igozlan@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=erezsh@nvidia.com \
--cc=hamdani@nvidia.com \
--cc=kliteyn@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).