DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
To: <kliteyn@nvidia.com>, <viacheslavo@nvidia.com>,
	<thomas@monjalon.net>, <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>
Subject: [PATCH 2/4] net/mlx5/hws: read capabilities for Split/Linear tables
Date: Thu, 12 Jan 2023 15:49:10 +0200	[thread overview]
Message-ID: <20230112134913.2632849-2-kliteyn@nvidia.com> (raw)
In-Reply-To: <20230112134913.2632849-1-kliteyn@nvidia.com>

Read device capabilities that describe the support for
Hash Split table and Linear RTC table.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_cmd.c | 16 ++++++++++++++++
 drivers/net/mlx5/hws/mlx5dr_cmd.h |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c
index c64f127de8..32378673cf 100644
--- a/drivers/net/mlx5/hws/mlx5dr_cmd.c
+++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c
@@ -970,6 +970,22 @@ int mlx5dr_cmd_query_caps(struct ibv_context *ctx,
 		caps->stc_alloc_log_gran = MLX5_GET(query_hca_cap_out, out,
 						    capability.wqe_based_flow_table_cap.
 						    stc_alloc_log_granularity);
+
+		caps->rtc_hash_split_table = MLX5_GET(query_hca_cap_out, out,
+						      capability.wqe_based_flow_table_cap.
+						      rtc_hash_split_table);
+
+		caps->rtc_linear_lookup_table = MLX5_GET(query_hca_cap_out, out,
+							 capability.wqe_based_flow_table_cap.
+							 rtc_linear_lookup_table);
+
+		caps->access_index_mode = MLX5_GET(query_hca_cap_out, out,
+						   capability.wqe_based_flow_table_cap.
+						   access_index_mode);
+
+		caps->linear_match_definer = MLX5_GET(query_hca_cap_out, out,
+						      capability.wqe_based_flow_table_cap.
+						      linear_match_definer_reg_c3);
 	}
 
 	if (caps->eswitch_manager) {
diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.h b/drivers/net/mlx5/hws/mlx5dr_cmd.h
index 5d8d779708..468557ba16 100644
--- a/drivers/net/mlx5/hws/mlx5dr_cmd.h
+++ b/drivers/net/mlx5/hws/mlx5dr_cmd.h
@@ -170,7 +170,11 @@ struct mlx5dr_cmd_query_caps {
 	uint8_t format_select_gtpu_dw_1;
 	uint8_t format_select_gtpu_dw_2;
 	uint8_t format_select_gtpu_ext_dw_0;
+	uint32_t linear_match_definer;
+	uint8_t access_index_mode;
 	bool full_dw_jumbo_support;
+	bool rtc_hash_split_table;
+	bool rtc_linear_lookup_table;
 	struct mlx5dr_cmd_query_ft_caps nic_ft;
 	struct mlx5dr_cmd_query_ft_caps fdb_ft;
 	bool eswitch_manager;
-- 
2.27.0


  reply	other threads:[~2023-01-12 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 13:49 [PATCH 1/4] net/mlx5/hws: definitions for Hash Split/Linear Lookup tbls Yevgeny Kliteynik
2023-01-12 13:49 ` Yevgeny Kliteynik [this message]
2023-01-23 14:07   ` [PATCH 2/4] net/mlx5/hws: read capabilities for Split/Linear tables Slava Ovsiienko
2023-01-12 13:49 ` [PATCH 3/4] net/mlx5/hws: support insert/distribute RTC properties Yevgeny Kliteynik
2023-01-23 14:07   ` Slava Ovsiienko
2023-01-12 13:49 ` [PATCH 4/4] net/mlx5/hws: handle collision matcher for linear RTC Yevgeny Kliteynik
2023-01-23 14:07   ` Slava Ovsiienko
2023-01-19 12:58 ` [PATCH 1/4] net/mlx5/hws: definitions for Hash Split/Linear Lookup tbls Ali Alnubani
2023-01-23 14:06 ` Slava Ovsiienko
2023-01-25 17:19 ` 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=20230112134913.2632849-2-kliteyn@nvidia.com \
    --to=kliteyn@nvidia.com \
    --cc=dev@dpdk.org \
    --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).