linux-stable/drivers/infiniband
Håkon Bugge 194f64a3ca RDMA/core: Fix corrupted SL on passive side
On RoCE systems, a CM REQ contains a Primary Hop Limit > 1 and Primary
Subnet Local is zero.

In cm_req_handler(), the cm_process_routed_req() function is called. Since
the Primary Subnet Local value is zero in the request, and since this is
RoCE (Primary Local LID is permissive), the following statement will be
executed:

      IBA_SET(CM_REQ_PRIMARY_SL, req_msg, wc->sl);

This corrupts SL in req_msg if it was different from zero. In other words,
a request to setup a connection using an SL != zero, will not be honored,
and a connection using SL zero will be created instead.

Fixed by not calling cm_process_routed_req() on RoCE systems, the
cm_process_route_req() is only for IB anyhow.

Fixes: 3971c9f6db ("IB/cm: Add interim support for routed paths")
Link: https://lore.kernel.org/r/1616420132-31005-1-git-send-email-haakon.bugge@oracle.com
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-04-01 14:47:24 -03:00
..
core RDMA/core: Fix corrupted SL on passive side 2021-04-01 14:47:24 -03:00
hw RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock 2021-03-31 14:41:01 -03:00
sw RDMA/rxe: Remove rxe_dma_device declaration 2021-03-31 14:45:50 -03:00
ulp RDMA/iser: struct iscsi_iser_task is declared twice 2021-03-30 19:53:08 -03:00
Kconfig RDMA/umem: Support importing dma-buf as user memory region 2021-01-20 16:07:52 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00