common/mlx5: fix build with rdma-core 21
PATCH 1/1 common/mlx5: fix build with rdma-core 21
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.
--- 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(-)
drivers/common/mlx5/Makefile +5 -0
@@ -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 \
drivers/common/mlx5/meson.build +2 -0
@@ -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',
drivers/common/mlx5/mlx5_glue.c +1 -1
@@ -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;
Signature · 1 line
2.26.0
Quoted 19 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, April 16, 2020 18:59
To: [email protected]
Cc: [email protected]; Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>
Subject: [PATCH] common/mlx5: fix build with rdma-core 21
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 ifHAVE_IBV_DEVX_OBJ, which is true if the functionmlx5dv_devx_obj_createis found.
Unfortunatelymlx5dv_devx_obj_create()was introduced in rdma-core 21, whenmlx5dv_devx_qp_query()did not exist yet.
Quoted 7 lines
A new flag
HAVE_IBV_DEVX_QPis added whenmlx5dv_devx_qp_query()is found.Fixes 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")Signed-off-by Thomas Monjalon <[email protected]>
Quoted 51 lines
--- 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(-)(quoted diff) +0
-0b/drivers/common/mlx5/Makefile index
f32933d592..22dc4b2eb4100644drivers/common/mlx5/Makefile +0
-0@@ -150,6 +150,11 @@ mlx5_autoconf.h.new:$(RTE_SDK)/buildtools/auto-config-h.sh
drivers/common/mlx5/Makefile +5
-0infiniband/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 \(quoted diff) +0
-0b/drivers/common/mlx5/meson.build index
ac2cfa6236..6f007eea1b100644drivers/common/mlx5/meson.build +2
-0@@ -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 --gita/drivers/common/mlx5/mlx5_glue.cb/drivers/common/mlx5/mlx5_glue.cindex0af0b86677..e2d3beb9cc100644drivers/common/mlx5/mlx5_glue.c +1
-2@@ -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
Hi,
Quoted 81 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Thursday, April 16, 2020 6:59 PM
To: [email protected]
Cc: [email protected]; Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Dekel Peled <[email protected]>
Subject: [dpdk-dev] [PATCH] common/mlx5: fix build with rdma-core 21
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 ifHAVE_IBV_DEVX_OBJ,
which is true if the functionmlx5dv_devx_obj_createis found. Unfortunatelymlx5dv_devx_obj_create()was introduced in rdma-core 21, whenmlx5dv_devx_qp_query()did not exist yet.A new flag
HAVE_IBV_DEVX_QPis added whenmlx5dv_devx_qp_query()is found.Fixes 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")Signed-off-by Thomas Monjalon <[email protected]>--- 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(-)drivers/common/mlx5/Makefile +0
-0@@ -150,6 +150,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-
config-h.shdrivers/common/mlx5/Makefile +5
-0infiniband/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 \drivers/common/mlx5/meson.build +2
-0@@ -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' ],drivers/common/mlx5/meson.build +0
-0[ 'HAVE_IBV_DEVX_EVENT', 'infiniband/mlx5dv.h',drivers/common/mlx5/mlx5_glue.c +1
-2@@ -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; --
Quoted 1 line
2.26.0
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh