linux-stable/include/linux/mlx5
Mark Bloch 617f5db1a6 RDMA/mlx5: Fix affinity assignment
The cited commit aimed to ensure that Virtual Functions (VFs) assign a
queue affinity to a Queue Pair (QP) to distribute traffic when
the LAG master creates a hardware LAG. If the affinity was set while
the hardware was not in LAG, the firmware would ignore the affinity value.

However, this commit unintentionally assigned an affinity to QPs on the LAG
master's VPORT even if the RDMA device was not marked as LAG-enabled.
In most cases, this was not an issue because when the hardware entered
hardware LAG configuration, the RDMA device of the LAG master would be
destroyed and a new one would be created, marked as LAG-enabled.

The problem arises when a user configures Equal-Cost Multipath (ECMP).
In ECMP mode, traffic can be directed to different physical ports based on
the queue affinity, which is intended for use by VPORTS other than the
E-Switch manager. ECMP mode is supported only if both E-Switch managers are
in switchdev mode and the appropriate route is configured via IP. In this
configuration, the RDMA device is not destroyed, and we retain the RDMA
device that is not marked as LAG-enabled.

To ensure correct behavior, Send Queues (SQs) opened by the E-Switch
manager through verbs should be assigned strict affinity. This means they
will only be able to communicate through the native physical port
associated with the E-Switch manager. This will prevent the firmware from
assigning affinity and will not allow the SQs to be remapped in case of
failover.

Fixes: 802dcc7fc5 ("RDMA/mlx5: Support TX port affinity for VF drivers in LAG mode")
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://lore.kernel.org/r/425b05f4da840bc684b0f7e8ebf61aeb5cef09b0.1685960567.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-06-11 11:27:17 +03:00
..
cq.h
device.h mlx5-updates-2023-04-11 2023-04-13 22:28:03 -07:00
doorbell.h
driver.h RDMA/mlx5: Fix affinity assignment 2023-06-11 11:27:17 +03:00
eq.h
eswitch.h
fs.h Merge branch 'mlx5-next' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2023-02-16 11:36:14 -08:00
fs_helpers.h
mlx5_ifc.h v6.4 merge window RDMA pull request 2023-04-29 17:21:24 -07:00
mlx5_ifc_fpga.h net/mlx5: Remove from FPGA IFC file not-needed definitions 2022-09-27 12:50:27 -07:00
mlx5_ifc_vdpa.h
mpfs.h
port.h net/mlx5: Move needed PTYS functions to core layer 2023-03-15 22:12:08 -07:00
qp.h net/mlx5: Add new WQE for updating flow table 2023-04-11 20:57:37 -07:00
rsc_dump.h
transobj.h
vport.h net/mlx5: Add generic getters for other functions caps 2022-12-07 20:09:18 -08:00