* [dpdk-dev] [PATCH] common/mlx5: fix relaxed ordering optimization performance
@ 2020-04-19 11:05 Shiri Kuzin
0 siblings, 0 replies; only message in thread
From: Shiri Kuzin @ 2020-04-19 11:05 UTC (permalink / raw)
To: dev; +Cc: matan, rasland, viacheslavo, asafp
Relaxed Ordering is a PCI optimization that allows reordering
of reads/writes in order to improve performance.
in order to support devices that don't enable this
optimization we define IBV_ACCESS_RELAXED_ORDERING as 0.
currently the optimization wasn't activated since
we always defined IBV_ACCESS_RELAXED_ORDERING as 0.
this issue is fixed by only setting IBV_ACCESS_RELAXED_ORDERING
as 0 when the optimization is unsupported
Fixes: 2c4a59c5789a ("net/mlx5: create relaxed ordering memory regions")
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Reviewed-by: Asaf Penso <asafp@mellanox.com>
---
drivers/common/mlx5/Makefile | 5 +++++
drivers/common/mlx5/meson.build | 2 ++
drivers/common/mlx5/mlx5_glue.h | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile
index 26267c9..a5c9ed2 100644
--- a/drivers/common/mlx5/Makefile
+++ b/drivers/common/mlx5/Makefile
@@ -68,6 +68,11 @@ mlx5_autoconf.h.new: FORCE
mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
$Q $(RM) -f -- '$@'
$Q sh -- '$<' '$@' \
+ HAVE_IBV_RELAXED_ORDERING \
+ infiniband/verbs.h \
+ enum IBV_ACCESS_RELAXED_ORDERING \
+ $(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT \
infiniband/mlx5dv.h \
enum MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX \
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 347d282..2ac159a 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -94,6 +94,8 @@ has_member_args = [
# [ "MACRO to define if found", "header for the search",
# "symbol to search" ]
has_sym_args = [
+ [ 'HAVE_IBV_RELAXED_ORDERING', 'infiniband/verbs.h',
+ 'IBV_ACCESS_RELAXED_ORDERING ' ],
[ 'HAVE_IBV_DEVICE_STRIDING_RQ_SUPPORT', 'infiniband/mlx5dv.h',
'MLX5DV_CQE_RES_FORMAT_CSUM_STRIDX' ],
[ 'HAVE_IBV_DEVICE_TUNNEL_SUPPORT', 'infiniband/mlx5dv.h',
diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h
index 184c410..81d6a22 100644
--- a/drivers/common/mlx5/mlx5_glue.h
+++ b/drivers/common/mlx5/mlx5_glue.h
@@ -98,7 +98,7 @@
uint64_t comp_mask; };
#endif
-#ifndef IBV_ACCESS_RELAXED_ORDERING
+#ifndef HAVE_IBV_RELAXED_ORDERING
#define IBV_ACCESS_RELAXED_ORDERING 0
#endif
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-19 11:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19 11:05 [dpdk-dev] [PATCH] common/mlx5: fix relaxed ordering optimization performance Shiri Kuzin
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).