[SRU][N:linux-azure][PATCH 2/6] RDMA/mana_ib: Fix DSCP value in modify QP

John Cabaj john.cabaj at canonical.com
Thu Oct 16 21:15:50 UTC 2025


From: Shiraz Saleem <shirazsaleem at microsoft.com>

BugLink: https://bugs.launchpad.net/bugs/2128662

Convert the traffic_class in GRH to a DSCP value as required by the HW.

Fixes: e095405b45bb ("RDMA/mana_ib: Modify QP state")
Signed-off-by: Shiraz Saleem <shirazsaleem at microsoft.com>
Signed-off-by: Konstantin Taranov <kotaranov at microsoft.com>
Link: https://patch.msgid.link/1752143085-4169-1-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli at microsoft.com>
Signed-off-by: Leon Romanovsky <leon at kernel.org>
(cherry picked from commit 62de0e67328e9503459a24b9343c3358937cdeef)
Signed-off-by: John Cabaj <john.cabaj at canonical.com>
---
 drivers/infiniband/hw/mana/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mana/qp.c b/drivers/infiniband/hw/mana/qp.c
index dd08fd107558..b9207234e8ec 100644
--- a/drivers/infiniband/hw/mana/qp.c
+++ b/drivers/infiniband/hw/mana/qp.c
@@ -782,7 +782,7 @@ static int mana_ib_gd_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 		req.ah_attr.dest_port = ROCE_V2_UDP_DPORT;
 		req.ah_attr.src_port = rdma_get_udp_sport(attr->ah_attr.grh.flow_label,
 							  ibqp->qp_num, attr->dest_qp_num);
-		req.ah_attr.traffic_class = attr->ah_attr.grh.traffic_class;
+		req.ah_attr.traffic_class = attr->ah_attr.grh.traffic_class >> 2;
 		req.ah_attr.hop_limit = attr->ah_attr.grh.hop_limit;
 		req.ah_attr.flow_label = attr->ah_attr.grh.flow_label;
 	}
-- 
2.43.0




More information about the kernel-team mailing list