From: Thomas Monjalon <thomas@monjalon.net>
To: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: dev@dpdk.org, rasland@nvidia.com, matan@nvidia.com,
david.marchand@redhat.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 1/2] common/mlx5: add provider query port support to glue library
Date: Tue, 06 Jul 2021 15:44:23 +0200 [thread overview]
Message-ID: <1667547.2qPZxae6db@thomas> (raw)
In-Reply-To: <20210701071552.3339-1-viacheslavo@nvidia.com>
01/07/2021 09:15, Viacheslav Ovsiienko:
> In order to get E-Switch vport identifiers the mlx5 PMD relies
> on two approaches:
> - use port query API if it is provided by rdma-core library
> - otherwise, deduce vport ids from the related VF index
> The latter is not reliable and may not work with newer kernel
> driver versions and in some configurations (LAG), causing
> the E-Switch malfunction. Hence, engaging the port query API
> is highly desirable.
>
> The port attributes query API was supported by vendor rdma-core
> versions only (in OFED). In Upstream, the rdma-core mlx5 provider
> introduced the port attributes query API since version v35.0 - the
> mlx5dv_query_port routine, that differs from vendor API. In order
> to support this change in the rdma-core the conditional compilation
> flag HAVE_MLX5DV_DR_DEVX_PORT_V35 is introduced by the this patch.
>
> In the OFED rdma-core version the new compatible mlx5dv_query_port
> routine was introduced as well, replacing the existing proprietary
> mlx5dv_query_devx_port routine. The proprietary routine is still
> controlled in PMD code with HAVE_MLX5DV_DR_DEVX_PORT conditional
> flag.
>
> Currently, the OFED rdma-core library contains both versions of
> port query API. And this version is a transitional one, there are
"this version" of what?
> the plans to remove the proprietary mlx5dv_query_devx_port routine
> and the HAVE_MLX5DV_DR_DEVX_PORT flag in PMD will not work anymore.
>
> With this patch applied the mlx5 PMD can be compiled and operates
> over all rdma-core versions:
> - Upstream rdma-core before v35 (deduces vport id from VF name)
> (* E-Switch may not operate correctly)
> - Upstream rdma-core v35 and above (uses common port query API)
> - rdma-core OFED before 5.5 (uses proprietary port query API)
> - rdma-core OFED 5.5 and above (uses common port query API)
This is the kind of explanation which should come first,
with exact function and flag names, before and after.
> Despite this patch is not a bugfix (it follows the introduced API
> variation in underlying library), it covers the major compatibility
> issue and is highly desired to be ported to DPDK LTS.
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
[...]
> --- a/drivers/common/mlx5/linux/meson.build
> +++ b/drivers/common/mlx5/linux/meson.build
> @@ -93,6 +93,8 @@ has_sym_args = [
> 'IBV_WQ_FLAG_RX_END_PADDING' ],
> [ 'HAVE_MLX5DV_DR_DEVX_PORT', 'infiniband/mlx5dv.h',
> 'mlx5dv_query_devx_port' ],
> + [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
> + 'mlx5dv_query_port' ],
It seems there is an indentation issue.
> [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
> 'mlx5dv_devx_obj_create' ],
> [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
[...]
> + * pf0vf2, we can deduce the VF number as 2, and set vport index
> + * as 3 (2+1). This assigning schema should be changed if the
> + * multiple E-Switch instances per PF configurations or/and PCI
> + * subfunctions are added.
I don't understand this last sentence.
next prev parent reply other threads:[~2021-07-06 13:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 12:48 [dpdk-dev] [PATCH v2] " Viacheslav Ovsiienko
2021-06-20 8:25 ` Raslan Darawsheh
2021-06-23 10:42 ` David Marchand
2021-06-23 11:27 ` Slava Ovsiienko
2021-06-23 13:51 ` David Marchand
2021-06-23 15:39 ` Slava Ovsiienko
2021-06-24 10:10 ` Slava Ovsiienko
2021-07-01 7:15 ` [dpdk-dev] [PATCH v3 1/2] " Viacheslav Ovsiienko
2021-07-01 7:15 ` [dpdk-dev] [PATCH v3 2/2] common/mlx5: fix compilation flag on port query API Viacheslav Ovsiienko
2021-07-06 13:49 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-07-06 13:44 ` Thomas Monjalon [this message]
2021-07-07 15:54 ` [dpdk-dev] [PATCH v4 1/2] common/mlx5: add provider query port support to glue library Viacheslav Ovsiienko
2021-07-07 15:54 ` [dpdk-dev] [PATCH v4 2/2] common/mlx5: fix compilation flag on port query API Viacheslav Ovsiienko
2021-07-07 17:39 ` Thomas Monjalon
2021-07-07 17:12 ` [dpdk-dev] [PATCH v4 1/2] common/mlx5: add provider query port support to glue library Thomas Monjalon
2021-07-08 16:07 ` 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=1667547.2qPZxae6db@thomas \
--to=thomas@monjalon.net \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--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).