Skip to content

Commit a71a60c

Browse files
Hakon-Buggejfvogel
authored andcommitted
rds: ib: Remove incorrect update of the path record sl and qos_class fields
The commit 954d51e ("net/rds: remove the RDS specific path record caching") incorrectly overwrites the path record's SL value when an RDMA_CM_EVENT_ROUTE_RESOLVED event is received. The SL value is set by the SA and returned in the SA SubnAdmGetResp(PathRecord) MAD packet. Almost similar, the path record's qos_class is set in cma_query_ib_route() and as such, it shall not be set when an RDMA_CM_EVENT_ROUTE_RESOLVED event is received. Orabug: 37617864 Fixes: 954d51e ("net/rds: remove the RDS specific path record caching") Signed-off-by: Håkon Bugge <[email protected]> Reviewed-by: Gerd Rausch <[email protected]> Tested-by: Alexis Silva <[email protected]>
1 parent 7a2963c commit a71a60c

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

net/rds/rdma_transport.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2021 Oracle and/or its affiliates.
2+
* Copyright (c) 2009, 2025, Oracle and/or its affiliates.
33
*
44
* This software is available to you under a choice of one of two
55
* licenses. You may choose to be licensed under the terms of the GNU
@@ -246,17 +246,6 @@ static void rds_rdma_cm_event_handler_cmn(struct rdma_cm_id *cm_id,
246246
break;
247247

248248
case RDMA_CM_EVENT_ROUTE_RESOLVED:
249-
/* Connection could have been dropped so make sure the
250-
* cm_id is valid before proceeding */
251-
252-
/* ibacm caches the path record without considering the tos/sl.
253-
* It is considered a match if the <src,dest> matches the
254-
* cache. In order to create qp with the correct sl/vl, RDS
255-
* needs to update the sl manually. As for now, RDS is assuming
256-
* that it is a 1:1 in tos to sl mapping.
257-
*/
258-
cm_id->route.path_rec[0].sl = TOS_TO_SL(conn->c_tos);
259-
cm_id->route.path_rec[0].qos_class = conn->c_tos;
260249
ret = trans->cm_initiate_connect(cm_id, isv6);
261250
if (ret)
262251
reason = "initiate connect failed";

net/rds/rdma_transport.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
extern struct mutex cm_id_map_lock;
99
extern struct idr cm_id_map;
1010

11-
/* Per IB specification 7.7.3, service level is a 4-bit field. */
12-
#define TOS_TO_SL(tos) ((tos) & 0xF)
13-
1411
int rds_rdma_conn_connect(struct rds_connection *conn);
1512
int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
1613
struct rdma_cm_event *event);

0 commit comments

Comments
 (0)