linux_dsm_epyc7002/drivers/infiniband/hw/mlx4
Jack Morgenstein fd10ed8e6f IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets
In MLX qp packets, the LRH (built by the driver) has both a VL field
and an SL field. When building a QP1 packet, the VL field should
reflect the SLtoVL mapping and not arbitrarily contain zero (as is
done now). This bug causes credit problems in IB switches at
high rates of QP1 packets.

The fix is to cache the SL to VL mapping in the driver, and look up
the VL mapped to the SL provided in the send request when sending
QP1 packets.

For FW versions which support generating a port_management_config_change
event with subtype sl-to-vl-table-change, the driver uses that event
to update its sl-to-vl mapping cache.  Otherwise, the driver snoops
incoming SMP mads to update the cache.

There remains the case where the FW is running in secure-host mode
(so no QP0 packets are delivered to the driver), and the FW does not
generate the sl2vl mapping change event. To support this case, the
driver updates (via querying the FW) its sl2vl mapping cache when
running in secure-host mode when it receives either a Port Up event
or a client-reregister event (where the port is still up, but there
may have been an opensm failover).
OpenSM modifies the sl2vl mapping before Port Up and Client-reregister
events occur, so if there is a mapping change the driver's cache will
be properly updated.

Fixes: 225c7b1fee ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-10-07 16:54:38 -04:00
..
ah.c IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs 2016-06-17 19:36:54 -04:00
alias_GUID.c IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue 2016-10-07 16:54:33 -04:00
cm.c IB/mlx4: In mlx4_ib_demux_cm, print out GUID in host-endian order 2015-02-17 22:11:40 -08:00
cq.c IB/mlx4: Move user vendor structures 2016-10-07 16:54:36 -04:00
doorbell.c IB: Refactor umem to use linear SG table 2014-03-04 10:34:28 -08:00
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
mad.c IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets 2016-10-07 16:54:38 -04:00
main.c IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets 2016-10-07 16:54:38 -04:00
Makefile IB/mlx4: Add iov directory in sysfs under the ib device 2012-09-30 20:33:39 -07:00
mcg.c IB/mlx4/mcg: Remove deprecated create_singlethread_workqueue 2016-10-07 16:54:31 -04:00
mlx4_ib.h IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets 2016-10-07 16:54:38 -04:00
mr.c IB/mlx4: Prevent cross page boundary allocation 2016-06-23 10:08:25 -04:00
qp.c IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets 2016-10-07 16:54:38 -04:00
srq.c IB/mlx4: Move user vendor structures 2016-10-07 16:54:36 -04:00
sysfs.c IB/mlx4: Forbid using sysfs to change RoCE pkeys 2015-08-30 18:12:22 -04:00