Files
android_kernel_xiaomi_sm8450/drivers/infiniband/core
Håkon Bugge a16f02187d RDMA/core: Fix corrupted SL on passive side
[ Upstream commit 194f64a3cad3ab9e381e996a13089de3215d1887 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:32 +02:00
..
2021-04-14 08:42:12 +02:00
2015-06-12 14:49:18 -04:00
2020-01-25 15:11:37 -04:00
2021-01-09 13:46:24 +01:00
2020-03-04 14:28:25 -04:00
2018-12-12 07:40:16 -07:00
2016-03-03 10:20:25 -05:00
2021-01-09 13:46:24 +01:00
2018-12-12 07:40:16 -07:00
2020-07-06 14:54:46 -03:00