From: Shiri Kuzin <shirik@mellanox.com>
To: dev@dpdk.org
Cc: matan@mellanox.com, viacheslavo@mellanox.com
Subject: [dpdk-dev] [PATCH 1/3] common/mlx5: fix relaxed ordering support detection
Date: Tue, 12 May 2020 15:21:44 +0300 [thread overview]
Message-ID: <1589286106-23411-2-git-send-email-shirik@mellanox.com> (raw)
In-Reply-To: <1589286106-23411-1-git-send-email-shirik@mellanox.com>
Relaxed ordering is a PCI optimization that allows reordering
of reads/writes in order to improve performance.
In order to enable this optimization only when relaxed ordering
is supported, it is checked if IBV_ACCESS_RELAXED_ORDERING is
defined in verbs.h.
Since IBV_ACCESS_RELAXED_ORDERING is an enum and not
defined relaxed ordering wasn't enabled even when supported.
This issue is fixed by using AUTOCONF to check if relaxed
ordering is supported and disabling only if it isn't.
Fixes: 53ac93f71ad1 ("net/mlx5: create relaxed ordering memory regions")
Signed-off-by: Shiri Kuzin <shirik@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 8b663ef..0d8cc1b 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 165aa25..5a802ba 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
next prev parent reply other threads:[~2020-05-12 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 12:21 [dpdk-dev] [PATCH 0/3] mlx5: relaxed ordering fixes Shiri Kuzin
2020-05-12 12:21 ` Shiri Kuzin [this message]
2020-05-12 12:21 ` [dpdk-dev] [PATCH 2/3] common/mlx5: fix relaxed ordering count object Shiri Kuzin
2020-05-12 12:21 ` [dpdk-dev] [PATCH 3/3] common/mlx5: disable relaxed ordering in unsuitable cpus Shiri Kuzin
2020-05-12 12:30 ` [dpdk-dev] [PATCH 0/3] mlx5: relaxed ordering fixes Matan Azrad
2020-05-13 10:36 ` 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=1589286106-23411-2-git-send-email-shirik@mellanox.com \
--to=shirik@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--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).