[dpdk-stable] patch 'common/mlx5/linux: add glue function to query WQ' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 17:59:32 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fba807cae93d7b42aa0bdae5e92d1bb9f604d376

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From fba807cae93d7b42aa0bdae5e92d1bb9f604d376 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at nvidia.com>
Date: Thu, 25 Feb 2021 10:44:58 +0000
Subject: [PATCH] common/mlx5/linux: add glue function to query WQ
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 75a9a73ddbdd3e7581078752aadb1c980617e739 ]

When Rx queue is created by VERBS API ibv_create_wq there is a dedicated
rdma-core API to query an information about this WQ(Work Queue).

VERBS WQ querying is needed for PMD cases which combine VERBS objects
with DevX objects.

Next feature to use this glue function is the HW queue counters.

Signed-off-by: Matan Azrad <matan at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_glue.c | 18 ++++++++++++++++++
 drivers/common/mlx5/linux/mlx5_glue.h |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 8146c79287..964f7e74ef 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -1067,6 +1067,23 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
 #endif
 }
 
+static int
+mlx5_glue_devx_wq_query(struct ibv_wq *wq, const void *in, size_t inlen,
+			void *out, size_t outlen)
+{
+#ifdef HAVE_IBV_DEVX_QP
+	return mlx5dv_devx_wq_query(wq, in, inlen, out, outlen);
+#else
+	(void)wq;
+	(void)in;
+	(void)inlen;
+	(void)out;
+	(void)outlen;
+	errno = ENOTSUP;
+	return errno;
+#endif
+}
+
 static int
 mlx5_glue_devx_port_query(struct ibv_context *ctx,
 			  uint32_t port_num,
@@ -1403,6 +1420,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
 	.devx_umem_reg = mlx5_glue_devx_umem_reg,
 	.devx_umem_dereg = mlx5_glue_devx_umem_dereg,
 	.devx_qp_query = mlx5_glue_devx_qp_query,
+	.devx_wq_query = mlx5_glue_devx_wq_query,
 	.devx_port_query = mlx5_glue_devx_port_query,
 	.dr_dump_domain = mlx5_glue_dr_dump_domain,
 	.dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index 8be446a902..9e385be957 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -307,6 +307,8 @@ struct mlx5_glue {
 	int (*devx_qp_query)(struct ibv_qp *qp,
 			     const void *in, size_t inlen,
 			     void *out, size_t outlen);
+	int (*devx_wq_query)(struct ibv_wq *wq, const void *in, size_t inlen,
+			     void *out, size_t outlen);
 	int (*devx_port_query)(struct ibv_context *ctx,
 			       uint32_t port_num,
 			       struct mlx5dv_devx_port *mlx5_devx_port);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.308924500 +0800
+++ 0024-common-mlx5-linux-add-glue-function-to-query-WQ.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 75a9a73ddbdd3e7581078752aadb1c980617e739 Mon Sep 17 00:00:00 2001
+From fba807cae93d7b42aa0bdae5e92d1bb9f604d376 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 75a9a73ddbdd3e7581078752aadb1c980617e739 ]
@@ -13,2 +15,0 @@
-
-Cc: stable at dpdk.org


More information about the stable mailing list