From: Matan Azrad <matan@nvidia.com>
To: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>
Subject: [dpdk-dev] [PATCH v3 0/5] mlx5: workaround MR issues
Date: Tue, 9 Nov 2021 14:36:07 +0200 [thread overview]
Message-ID: <20211109123612.2301442-1-matan@nvidia.com> (raw)
In-Reply-To: <20211108172113.2241853-1-matan@nvidia.com>
The mlx5 PMD uses the kernel mlx5 driver to map physical memory to the
HW.
Using the Verbs API ibv_reg_mr, a mkey can be created for that.
In this case, the mkey is signed on the user ID of the kernel driver.
Using the DevX API, a mkey also can be created, but it should point an
umem object (represents the specific buffer mapping) created by the
kernel. In this case, the mkey is signed on the user ID of the process
DevX context.
In FW DevX control commands which get mkey as a parameter, there is
a security check on the user ID and Verbs mkeys are rejected.
Unfortunately, also when using DevX mkey, there is an error in the FW
command on umem validation because the umem is not designed to be used
for any mkey parameters.
As a workaround to the kernel driver/FW issue, it is needed to use a
wrapped MR, which is an indirect mkey(created by the DevX API) pointing to
direct mkey created by the kernel for any DevX command uses an MR.
Add an API to create and destroy this wrapped MR.
Use this logic in flow counter query management and in LM.
V3:
Fix issue in 32bit compilation.
V2:
Fix missing implementation for Windows.
Improve logs.
Matan Azrad (2):
common/mlx5: add wrapped MR create API
vdpa/mlx5: workaround dirty bitmap MR creation
Michael Baum (3):
common/mlx5: glue MR registration with IOVA
vdpa/mlx5: workaround guest MR registrations
net/mlx5: workaround MR creation for flow counter
drivers/common/mlx5/linux/meson.build | 2 +
drivers/common/mlx5/linux/mlx5_common_os.c | 56 ++++++++++++++++++++
drivers/common/mlx5/linux/mlx5_glue.c | 18 +++++++
drivers/common/mlx5/linux/mlx5_glue.h | 3 ++
drivers/common/mlx5/mlx5_common.h | 18 +++++++
drivers/common/mlx5/version.map | 3 ++
drivers/common/mlx5/windows/mlx5_common_os.c | 40 ++++++++++++++
drivers/net/mlx5/mlx5.c | 8 +--
drivers/net/mlx5/mlx5.h | 5 +-
drivers/net/mlx5/mlx5_flow.c | 25 +++------
drivers/vdpa/mlx5/mlx5_vdpa.h | 9 ++--
drivers/vdpa/mlx5/mlx5_vdpa_lm.c | 38 +++----------
drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 43 +++++----------
13 files changed, 175 insertions(+), 93 deletions(-)
--
2.25.1
next prev parent reply other threads:[~2021-11-09 12:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 15:29 [dpdk-dev] [PATCH 0/5] mlx5: workaround MR issues in FW\kernel Matan Azrad
2021-11-07 15:29 ` [dpdk-dev] [PATCH 1/5] common/mlx5: glue MR registration with IOVA Matan Azrad
2021-11-07 15:29 ` [dpdk-dev] [PATCH 2/5] common/mlx5: add wrapped MR create API Matan Azrad
2021-11-07 15:29 ` [dpdk-dev] [PATCH 3/5] vdpa/mlx5: workaround dirty bitmap MR creation Matan Azrad
2021-11-07 15:29 ` [dpdk-dev] [PATCH 4/5] vdpa/mlx5: workaround guest MR registrations Matan Azrad
2021-11-07 15:29 ` [dpdk-dev] [PATCH 5/5] net/mlx5: workaround counter memory region creation Matan Azrad
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 0/5] mlx5: workaround MR issues Matan Azrad
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 1/5] common/mlx5: glue MR registration with IOVA Matan Azrad
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 2/5] common/mlx5: add wrapped MR create API Matan Azrad
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 3/5] vdpa/mlx5: workaround dirty bitmap MR creation Matan Azrad
2021-11-08 19:38 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 4/5] vdpa/mlx5: workaround guest MR registrations Matan Azrad
2021-11-08 17:21 ` [dpdk-dev] [PATCH v2 5/5] net/mlx5: workaround MR creation for flow counter Matan Azrad
2021-11-09 12:23 ` [dpdk-dev] [PATCH v3 0/5] mlx5: workaround MR issues Matan Azrad
2021-11-09 12:36 ` Matan Azrad [this message]
2021-11-09 12:36 ` [dpdk-dev] [PATCH v3 1/5] common/mlx5: glue MR registration with IOVA Matan Azrad
2021-11-09 12:36 ` [dpdk-dev] [PATCH v3 2/5] common/mlx5: add wrapped MR create API Matan Azrad
2021-11-09 12:36 ` [dpdk-dev] [PATCH v3 3/5] vdpa/mlx5: workaround dirty bitmap MR creation Matan Azrad
2021-11-09 12:36 ` [dpdk-dev] [PATCH v3 4/5] vdpa/mlx5: workaround guest MR registrations Matan Azrad
2021-11-09 12:36 ` [dpdk-dev] [PATCH v3 5/5] net/mlx5: workaround MR creation for flow counter Matan Azrad
2021-11-10 14:55 ` [dpdk-dev] [PATCH v3 0/5] mlx5: workaround MR issues Thomas Monjalon
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=20211109123612.2301442-1-matan@nvidia.com \
--to=matan@nvidia.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).