DPDK patches and discussions
 help / color / mirror / Atom feed
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: <dev@dpdk.org>
Cc: <orika@nvidia.com>, <rasland@nvidia.com>, <matan@nvidia.com>
Subject: [PATCH v4 3/5] common/mlx5: add cross port object sharing capability
Date: Mon, 13 Feb 2023 15:37:38 +0200	[thread overview]
Message-ID: <20230213133740.27005-4-viacheslavo@nvidia.com> (raw)
In-Reply-To: <20230213133740.27005-1-viacheslavo@nvidia.com>

Add query port capabilities to share steering objects
between multiple ports of the same physical NIC.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 13 +++++++++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index e3a4927d0f..17128035ec 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1047,6 +1047,19 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 		attr->flow_counter_bulk_log_granularity =
 			MLX5_GET(cmd_hca_cap_2, hcattr,
 				 flow_counter_bulk_log_granularity);
+		rc = MLX5_GET(cmd_hca_cap_2, hcattr,
+			      cross_vhca_object_to_object_supported);
+		attr->cross_vhca =
+			(rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_STC_TO_TIR) &&
+			(rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_STC_TO_FT) &&
+			(rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_FT_TO_FT) &&
+			(rc & MLX5_CROSS_VHCA_OBJ_TO_OBJ_TYPE_FT_TO_RTC);
+		rc = MLX5_GET(cmd_hca_cap_2, hcattr,
+			      allowed_object_for_other_vhca_access);
+		attr->cross_vhca = attr->cross_vhca &&
+			(rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_TIR) &&
+			(rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_FT) &&
+			(rc & MLX5_CROSS_VHCA_ALLOWED_OBJS_RTC);
 	}
 	if (attr->log_min_stride_wqe_sz == 0)
 		attr->log_min_stride_wqe_sz = MLX5_MPRQ_LOG_MIN_STRIDE_WQE_SIZE;
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index c94b9eac06..b65ba569bc 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -288,6 +288,7 @@ struct mlx5_hca_attr {
 	uint32_t alloc_flow_counter_pd:1;
 	uint32_t flow_counter_access_aso:1;
 	uint32_t flow_access_aso_opc_mod:8;
+	uint32_t cross_vhca:1;
 };
 
 /* LAG Context. */
-- 
2.18.1


  parent reply	other threads:[~2023-02-13 13:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 16:54 [RFC] ethdev: sharing indirect actions between ports Viacheslav Ovsiienko
2023-01-08 14:20 ` Ori Kam
2023-01-18 12:07 ` Thomas Monjalon
2023-01-18 15:17   ` Ori Kam
2023-01-18 16:21     ` Thomas Monjalon
2023-01-18 16:37       ` Slava Ovsiienko
2023-01-20 12:22         ` Andrew Rybchenko
2023-01-26 15:15           ` Ori Kam
2023-02-06  9:52 ` [PATCH 1/9] " Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 2/9] net/mlx5/hws: Matcher, Free FT from RTC id before set the new value Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 3/9] net/mlx5/hws: fix disconnecting matcher Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 4/9] common/mlx5: add cross port object sharing capability Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 5/9] net/mlx5: add cross port shared mode for HW steering Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 6/9] net/mlx5: support counters in cross port shared mode Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 7/9] app/testpmd: add host port parameter into flow config Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 8/9] app/testpmd: add shared indirect action support Viacheslav Ovsiienko
2023-02-06  9:52   ` [PATCH 9/9] doc: update cross-port indirect shared action Viacheslav Ovsiienko
2023-02-07 14:01   ` [PATCH v2 1/9] ethdev: sharing indirect actions between ports Viacheslav Ovsiienko
2023-02-07 14:01     ` [PATCH v2 2/9] app/testpmd: add host port parameter into flow config Viacheslav Ovsiienko
2023-02-09 14:48       ` Ori Kam
2023-02-07 14:02     ` [PATCH v2 3/9] app/testpmd: add shared indirect action support Viacheslav Ovsiienko
2023-02-09 14:48       ` Ori Kam
2023-02-07 14:02     ` [PATCH v2 4/9] net/mlx5/hws: free FT from RTC id before set the new value Viacheslav Ovsiienko
2023-02-07 14:02     ` [PATCH v2 5/9] net/mlx5/hws: fix disconnecting matcher Viacheslav Ovsiienko
2023-02-07 14:02     ` [PATCH v2 6/9] common/mlx5: add cross port object sharing capability Viacheslav Ovsiienko
2023-02-07 14:02     ` [PATCH v2 7/9] net/mlx5: add cross port shared mode for HW steering Viacheslav Ovsiienko
2023-02-07 14:02     ` [PATCH v2 8/9] net/mlx5: support counters in cross port shared mode Viacheslav Ovsiienko
2023-02-07 14:02     ` [PATCH v2 9/9] doc: update cross-port indirect shared action Viacheslav Ovsiienko
2023-02-09 14:49       ` Ori Kam
2023-02-10 14:35       ` Ferruh Yigit
2023-02-08 12:21     ` [PATCH v2 1/9] ethdev: sharing indirect actions between ports Ori Kam
2023-02-09 14:47     ` Ori Kam
2023-02-10 14:34     ` Ferruh Yigit
2023-02-10 14:38       ` Slava Ovsiienko
2023-02-10 15:17   ` [PATCH v3 0/3] *ethdev: sharing indirect actions between port* Viacheslav Ovsiienko
2023-02-10 15:17     ` [PATCH v3 1/3] ethdev: sharing indirect actions between ports Viacheslav Ovsiienko
2023-02-10 15:17     ` [PATCH v3 2/3] app/testpmd: add host port parameter into flow config Viacheslav Ovsiienko
2023-02-10 15:17     ` [PATCH v3 3/3] app/testpmd: add shared indirect action support Viacheslav Ovsiienko
2023-02-10 23:02     ` [PATCH v3 0/3] *ethdev: sharing indirect actions between port* Ferruh Yigit
2023-02-13 13:37   ` [PATCH v4 0/5] net/mlx5: sharing indirect actions between port Viacheslav Ovsiienko
2023-02-13 13:37     ` [PATCH v4 1/5] net/mlx5/hws: free FT from RTC ID before set the new value Viacheslav Ovsiienko
2023-02-13 13:37     ` [PATCH v4 2/5] net/mlx5/hws: fix disconnecting matcher Viacheslav Ovsiienko
2023-02-13 13:37     ` Viacheslav Ovsiienko [this message]
2023-02-13 13:37     ` [PATCH v4 4/5] net/mlx5: add cross port shared mode for HW steering Viacheslav Ovsiienko
2023-02-13 13:37     ` [PATCH v4 5/5] net/mlx5: support counters in cross port shared mode Viacheslav Ovsiienko
2023-02-15 13:29     ` [PATCH v4 0/5] net/mlx5: sharing indirect actions between port 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=20230213133740.27005-4-viacheslavo@nvidia.com \
    --to=viacheslavo@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@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).