android_kernel_samsung_sm8650/include/linux/mlx5
Mark Bloch 1def2a94f4 RDMA/mlx5: Fix affinity assignment
[ Upstream commit 617f5db1a626f18d5cbb7c7faf7bf8f9ea12be78 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 16:01:00 +02:00
..
cq.h net/mlx5: Use mlx5_cmd_do() in core create_{cq,dct} 2022-02-23 15:21:59 -08:00
device.h net/mlx5: E-Switch, properly handle ingress tagged packets on VST 2023-01-12 12:02:09 +01:00
doorbell.h
driver.h RDMA/mlx5: Fix affinity assignment 2023-06-21 16:01:00 +02:00
eq.h net/mlx5: Introduce API for bulk request and release of IRQs 2022-01-06 16:22:52 -08:00
eswitch.h net/mlx5: E-switch, Remove dependency between sriov and eswitch mode 2022-07-02 11:58:26 -07:00
fs_helpers.h net/mlx5: Remove unused functions 2022-09-27 12:50:27 -07:00
fs.h net/mlx5: Add MACsec Rx tables support to fs_core 2022-09-07 14:02:08 +01: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 vdpa/mlx5: Implement susupend virtqueue callback 2022-08-11 04:26:08 -04:00
mlx5_ifc.h net/mlx5: DR, Check force-loopback RC QP capability independently from RoCE 2023-05-30 14:03:33 +01:00
mpfs.h {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table 2021-05-18 23:01:48 -07:00
port.h IB/mlx5: Fix undefined behavior due to shift overflowing the constant 2022-04-06 10:15:03 +03:00
qp.h net/mlx5e: xsk: Use KSM for unaligned XSK 2022-09-30 07:55:46 -07:00
rsc_dump.h
transobj.h net/mlx5e: Fix page reclaim for dead peer hairpin 2021-06-09 17:20:03 -07:00
vport.h net/mlx5: E-Switch, Prepare to return total vports from eswitch struct 2021-04-24 00:58:43 -07:00