All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raja Zidane <rzidane@nvidia.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH V5 2/5] common/mlx5: add MMO configuration for the DevX QP
Date: Thu, 30 Sep 2021 05:44:35 +0000	[thread overview]
Message-ID: <20210930054438.5960-3-rzidane@nvidia.com> (raw)
In-Reply-To: <20210930054438.5960-1-rzidane@nvidia.com>

A new configuration MMO was added to QP Context.
If set, MMO WQEs are supported on this QP.
For DMA MMO, supported only when dma_mmo_qp==1.
For REGEXP MMO, supported only when regexp_mmo_qp==1.
For COMPRESS MMO, supported only when compress_mmo_qp==1.
For DECOMPRESS MMO, supported only when decompress_mmo_qp==1.
Add support to DevX interface to set MMO bit.

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c |  7 +++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  1 +
 drivers/common/mlx5/mlx5_prm.h       | 28 +++++++++++++++++++++++++++-
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 00c78b1288..eefb869b7d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -2032,6 +2032,13 @@ mlx5_devx_cmd_create_qp(void *ctx,
 	MLX5_SET(qpc, qpc, ts_format, attr->ts_format);
 	MLX5_SET(qpc, qpc, user_index, attr->user_index);
 	if (attr->uar_index) {
+		if (attr->mmo) {
+			void *qpc_ext_and_pas_list = MLX5_ADDR_OF(create_qp_in,
+				in, qpc_extension_and_pas_list);
+			void *qpc_ext = MLX5_ADDR_OF(qpc_extension_and_pas_list,
+				qpc_ext_and_pas_list, qpc_data_extension);
+			MLX5_SET(qpc_extension, qpc_ext, mmo, 1);
+		}
 		MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
 		MLX5_SET(qpc, qpc, uar_page, attr->uar_index);
 		if (attr->log_page_size > MLX5_ADAPTER_PAGE_SHIFT)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index b21df0fd9b..e149f8b4f5 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -403,6 +403,7 @@ struct mlx5_devx_qp_attr {
 	uint32_t wq_umem_id;
 	uint64_t wq_umem_offset;
 	uint32_t user_index:24;
+	uint32_t mmo:1;
 };
 
 struct mlx5_devx_virtio_q_couners_attr {
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index ec5f871c61..54e62aa153 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -3243,6 +3243,28 @@ struct mlx5_ifc_create_qp_out_bits {
 	u8 reserved_at_60[0x20];
 };
 
+struct mlx5_ifc_qpc_extension_bits {
+	u8 reserved_at_0[0x2];
+	u8 mmo[0x1];
+	u8 reserved_at_3[0x5fd];
+};
+
+#ifdef PEDANTIC
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+struct mlx5_ifc_qpc_pas_list_bits {
+	u8 pas[0][0x40];
+};
+
+#ifdef PEDANTIC
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+struct mlx5_ifc_qpc_extension_and_pas_list_bits {
+	struct mlx5_ifc_qpc_extension_bits qpc_data_extension;
+	u8 pas[0][0x40];
+};
+
+
 #ifdef PEDANTIC
 #pragma GCC diagnostic ignored "-Wpedantic"
 #endif
@@ -3260,7 +3282,11 @@ struct mlx5_ifc_create_qp_in_bits {
 	u8 wq_umem_id[0x20];
 	u8 wq_umem_valid[0x1];
 	u8 reserved_at_861[0x1f];
-	u8 pas[0][0x40];
+	union {
+		struct mlx5_ifc_qpc_pas_list_bits qpc_pas_list;
+		struct mlx5_ifc_qpc_extension_and_pas_list_bits
+					qpc_extension_and_pas_list;
+	};
 };
 #ifdef PEDANTIC
 #pragma GCC diagnostic error "-Wpedantic"
-- 
2.17.1


  parent reply	other threads:[~2021-09-30  5:45 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:21 [dpdk-dev] [PATCH 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-09-03 14:21 ` [dpdk-dev] [PATCH 1/5] common/mlx5: share DevX QP operations Raja Zidane
2021-09-12 16:36   ` [dpdk-dev] [PATCH V2 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-09-12 16:36     ` [dpdk-dev] [PATCH V2 1/5] common/mlx5: share DevX QP operations Raja Zidane
2021-09-15  0:04       ` [dpdk-dev] [PATCH V3 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-09-15  0:05         ` [dpdk-dev] [PATCH V3 1/5] common/mlx5: share DevX QP operations Raja Zidane
2021-09-15  0:05         ` [dpdk-dev] [PATCH V3 2/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-09-22 19:48           ` Thomas Monjalon
2021-09-15  0:05         ` [dpdk-dev] [PATCH V3 3/5] common/mlx5: add MMO configuration for the DevX QP Raja Zidane
2021-09-15  0:05         ` [dpdk-dev] [PATCH V3 4/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-09-15  0:05         ` [dpdk-dev] [PATCH V3 5/5] regex/mlx5: refactor HW queue objects Raja Zidane
2021-09-28 12:16         ` [dpdk-dev] [PATCH V4 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-09-28 12:16           ` [dpdk-dev] [PATCH V4 1/5] common/mlx5: share DevX QP operations Raja Zidane
2021-09-28 12:16           ` [dpdk-dev] [PATCH V4 2/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-09-28 12:16           ` [dpdk-dev] [PATCH V4 3/5] common/mlx5: add MMO configuration for the DevX QP Raja Zidane
2021-09-28 12:16           ` [dpdk-dev] [PATCH V4 4/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-09-28 12:16           ` [dpdk-dev] [PATCH V4 5/5] regex/mlx5: refactor HW queue objects Raja Zidane
2021-09-30  5:44           ` [dpdk-dev] [PATCH V5 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-09-30  5:44             ` [dpdk-dev] [PATCH V5 1/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-09-30  5:44             ` Raja Zidane [this message]
2021-09-30  5:44             ` [dpdk-dev] [PATCH V5 3/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-09-30  5:44             ` [dpdk-dev] [PATCH V5 4/5] regex/mlx5: refactor HW queue objects Raja Zidane
2021-09-30  5:44             ` [dpdk-dev] [PATCH V5 5/5] compress/mlx5: allow partial transformations support Raja Zidane
2021-10-05 12:27             ` [dpdk-dev] [PATCH V6 0/5] mlx5: replaced hardware queue object Raja Zidane
2021-10-05 12:27               ` [dpdk-dev] [PATCH V6 1/5] common/mlx5: share DevX QP operations Raja Zidane
2021-10-05 12:27               ` [dpdk-dev] [PATCH V6 2/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-10-05 12:27               ` [dpdk-dev] [PATCH V6 3/5] common/mlx5: add MMO configuration for the DevX QP Raja Zidane
2021-10-05 12:27               ` [dpdk-dev] [PATCH V6 4/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-10-05 12:27               ` [dpdk-dev] [PATCH V6 5/5] regex/mlx5: refactor HW queue objects Raja Zidane
2021-10-05 16:18               ` [dpdk-dev] [PATCH V6 0/5] mlx5: replaced hardware queue object Thomas Monjalon
2021-09-12 16:36     ` [dpdk-dev] [PATCH V2 2/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-09-12 16:36     ` [dpdk-dev] [PATCH V2 3/5] common/mlx5: add MMO configuration for the DevX QP Raja Zidane
2021-09-12 16:36     ` [dpdk-dev] [PATCH V2 4/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-09-12 16:36     ` [dpdk-dev] [PATCH V2 5/5] regex/mlx5: refactor HW queue objects Raja Zidane
2021-09-03 14:21 ` [dpdk-dev] [PATCH 2/5] common/mlx5: update new MMO HCA capabilities Raja Zidane
2021-09-03 14:21 ` [dpdk-dev] [PATCH 3/5] common/mlx5: add MMO configuration for the DevX QP Raja Zidane
2021-09-03 14:21 ` [dpdk-dev] [PATCH 4/5] compress/mlx5: refactor queue HW object Raja Zidane
2021-09-03 14:21 ` [dpdk-dev] [PATCH 5/5] regex/mlx5: refactor HW queue objects Raja Zidane

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=20210930054438.5960-3-rzidane@nvidia.com \
    --to=rzidane@nvidia.com \
    --cc=dev@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.