Re: [dpdk-dev] [PATCH v4 1/2] common/mlx5: add provider query port support to glue library
From: Raslan Darawsheh <hidden>
Date: 2021-07-08 16:07:43
Hi,
-----Original Message-----
From: Slava Ovsiienko <redacted>
Sent: Wednesday, July 7, 2021 6:54 PM
To: dev@dpdk.org
Cc: Raslan Darawsheh <redacted>; Matan Azrad
[off-list ref]; NBU-Contact-Thomas Monjalon
[off-list ref]; david.marchand@redhat.com; stable@dpdk.org
Subject: [PATCH v4 1/2] common/mlx5: add provider query port support to
glue library
In order to get E-Switch vport identifiers the mlx5 PMD relies
on two approaches:
[a] use port query API if it is provided by rdma-core library
[b] otherwise, deduce vport ids from the related VF index
The latter is not reliable and may not work with newer kernel
drivers and in some configurations (LAG), causing E-Switch
malfunction. Hence, engaging the port query API is highly
desirable.
Depending on rdma-core version the port query API is:
- very old OFED versions have no query API (approach [b])
- rdma-core OFED < 5.5 provides mlx5dv_query_devx_port,
HAVE_MLX5DV_DR_DEVX_PORT flag is defined (approach [a])
- rdma-core OFED >= 5.5 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
- future OFED versions might remove mlx5dv_query_devx_port
and HAVE_MLX5DV_DR_DEVX_PORT will not be defined
- Upstream rdma-core < v35 has no port query API (approach [b])
- Upstream rdma-core >= v35 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
In order to support the new mlx5dv_query_port routine, the
conditional compilation flag HAVE_MLX5DV_DR_DEVX_PORT_V35
is introduced by the this patch. The flag HAVE_MLX5DV_DR_DEVX_PORT
is kept for compatibility with previous rdma-core versions.
Despite this patch is not a bugfix (it follows the introduced API
variation in underlying library), it resolves the compatibility
issue and is highly desired to be ported to DPDK LTS.
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <redacted>
Acked-by: Matan Azrad <redacted>Replaced older version and pushed to next-net-mlx, Kindest regards, Raslan Darawsheh