numam-dpdk/drivers
Viacheslav Ovsiienko d0cf77e8c2 common/mlx5: use new port query API if available
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 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 <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-08 22:09:37 +02:00
..
baseband log: register with standardized names 2021-05-11 15:17:55 +02:00
bus bus/pci: fix leak for unbound devices 2021-07-06 11:27:55 +02:00
common common/mlx5: use new port query API if available 2021-07-08 22:09:37 +02:00
compress log: register with standardized names 2021-05-11 15:17:55 +02:00
crypto crypto/octeontx2: clear session data upon destroy 2021-07-07 21:28:39 +02:00
event crypto/octeontx: add crypto adapter data path 2021-07-07 21:28:39 +02:00
mempool mempool/octeontx2: fix shift calculation 2021-06-30 18:42:54 +02:00
net common/mlx5: use new port query API if available 2021-07-08 22:09:37 +02:00
raw raw/cnxk_bphy: support BPHY self test 2021-07-05 23:08:48 +02:00
regex log: register with standardized names 2021-05-11 15:17:55 +02:00
vdpa vdpa/mlx5: fix TSO offload without checksum 2021-06-30 13:39:23 +02:00
meson.build log: register with standardized names 2021-05-11 15:17:55 +02:00