On Fri, Sep 16, 2016 at 02:01:57PM -0400, Doug Ledford wrote: > On 9/12/2016 12:16 PM, Leon Romanovsky wrote: > > From: Jack Morgenstein <jackm@xxxxxxxxxxxxxxxxxx> > > > > 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: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") > > Signed-off-by: Jack Morgenstein <jackm@xxxxxxxxxxxxxxxxxx> > > Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx> > > --- > > drivers/infiniband/hw/mlx4/mad.c | 64 ++++++++++++++++++- > > drivers/infiniband/hw/mlx4/main.c | 110 +++++++++++++++++++++++++++++++- > > drivers/infiniband/hw/mlx4/mlx4_ib.h | 7 ++ > > drivers/infiniband/hw/mlx4/qp.c | 23 ++++++- > > drivers/net/ethernet/mellanox/mlx4/fw.c | 13 ++-- > > include/linux/mlx4/device.h | 13 +++- > > 6 files changed, 220 insertions(+), 10 deletions(-) > > That's a lot more code churn than I would like to see in a late RC. I'm > going to drop this patch and move it to 4.9 instead. If this fixed an > oops or something like that, I would be more open to taking it now, but > the problem being resolved is credits on a switch. That isn't the sort > of showstopper issue that would justify this large of a patch this late > in the cycle. No problem, Thanks. > > > -- > Doug Ledford <dledford@xxxxxxxxxx> > GPG Key ID: 0E572FDD >
Attachment:
signature.asc
Description: PGP signature