From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: stable@dpdk.org, Matan Azrad <matan@mellanox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Viacheslav Ovsiienko <viacheslavo@mellanox.com>,
Dekel Peled <dekelp@mellanox.com>
Subject: [dpdk-dev] [PATCH] common/mlx5: fix build with rdma-core 21
Date: Thu, 16 Apr 2020 17:59:04 +0200 [thread overview]
Message-ID: <20200416155904.2723690-1-thomas@monjalon.net> (raw)
drivers/common/mlx5/mlx5_glue.c: In function 'mlx5_glue_devx_qp_query':
drivers/common/mlx5/mlx5_glue.c:1010:9: error:
implicit declaration of function 'mlx5dv_devx_qp_query'
The function mlx5dv_devx_qp_query() was added in rdma-core 22.
This function is compiled only if HAVE_IBV_DEVX_OBJ,
which is true if the function mlx5dv_devx_obj_create is found.
Unfortunately mlx5dv_devx_obj_create() was introduced in rdma-core 21,
when mlx5dv_devx_qp_query() did not exist yet.
A new flag HAVE_IBV_DEVX_QP is added when mlx5dv_devx_qp_query()
is found.
Fixes: 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/common/mlx5/Makefile | 5 +++++
drivers/common/mlx5/meson.build | 2 ++
drivers/common/mlx5/mlx5_glue.c | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile
index f32933d592..22dc4b2eb4 100644
--- a/drivers/common/mlx5/Makefile
+++ b/drivers/common/mlx5/Makefile
@@ -150,6 +150,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
infiniband/mlx5dv.h \
func mlx5dv_devx_obj_query_async \
$(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
+ HAVE_IBV_DEVX_QP \
+ infiniband/mlx5dv.h \
+ func mlx5dv_devx_qp_query \
+ $(AUTOCONF_OUTPUT)
$Q sh -- '$<' '$@' \
HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR \
infiniband/mlx5dv.h \
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index ac2cfa6236..6f007eea1b 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -118,6 +118,8 @@ has_sym_args = [
'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ],
[ 'HAVE_IBV_DEVX_ASYNC', 'infiniband/mlx5dv.h',
'mlx5dv_devx_obj_query_async' ],
+ [ 'HAVE_IBV_DEVX_QP', 'infiniband/mlx5dv.h',
+ 'mlx5dv_devx_qp_query' ],
[ 'HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR', 'infiniband/mlx5dv.h',
'mlx5dv_dr_action_create_dest_devx_tir' ],
[ 'HAVE_IBV_DEVX_EVENT', 'infiniband/mlx5dv.h',
diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c
index 0af0b86677..e2d3beb9cc 100644
--- a/drivers/common/mlx5/mlx5_glue.c
+++ b/drivers/common/mlx5/mlx5_glue.c
@@ -1006,7 +1006,7 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
const void *in, size_t inlen,
void *out, size_t outlen)
{
-#ifdef HAVE_IBV_DEVX_OBJ
+#ifdef HAVE_IBV_DEVX_QP
return mlx5dv_devx_qp_query(qp, in, inlen, out, outlen);
#else
(void)qp;
--
2.26.0
next reply other threads:[~2020-04-16 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 15:59 Thomas Monjalon [this message]
2020-04-21 7:43 ` Slava Ovsiienko
2020-04-21 13:28 ` 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=20200416155904.2723690-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dekelp@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=shahafs@mellanox.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.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).