Skip to content

Commit 3ba9050

Browse files
Wei Lin Guayvijay-suman
authored andcommitted
net/rds: Assign the correct service level
Commit 2bbf615 ("net/rds: remove the RDS specific path record caching") has changed the service level (SL) to TOS mapping to be 1:1. Nevertheless, it has assigned the SL to be a 8-bit value even though IB specification section 7.7.3 mentioned that the SL is only a 4-bit field. Thus, this patch assigns the SL correctly. Orabug: 27607211 Signed-off-by: Wei Lin Guay <[email protected]> Reported-by: Håkon Bugge <[email protected]> Reviewed-by: Yuval Shaia <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> Orabug: 33590097 UEK6 => UEK7 (cherry picked from commit 42eca82) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]> Orabug: 33590087 UEK7 => LUCI (cherry picked from commit 31d0359) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]>
1 parent 75eecde commit 3ba9050

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

net/rds/rdma_transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int rds_rdma_cm_event_handler_cmn(struct rdma_cm_id *cm_id,
162162
* needs to update the sl manually. As for now, RDS is assuming
163163
* that it is a 1:1 in tos to sl mapping.
164164
*/
165-
cm_id->route.path_rec[0].sl = conn->c_tos;
165+
cm_id->route.path_rec[0].sl = TOS_TO_SL(conn->c_tos);
166166
cm_id->route.path_rec[0].qos_class = conn->c_tos;
167167
ret = trans->cm_initiate_connect(cm_id, isv6);
168168
} else {

net/rds/rdma_transport.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
#define RDS_RDMA_RESOLVE_TIMEOUT_MS 5000
99

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

0 commit comments

Comments
 (0)