Skip to content

Commit 074f315

Browse files
Junxian Huangjgunthorpe
authored andcommitted
RDMA/hns: Bugfix for the missing assignment for dip_idx
When the dgid-dip_idx mapping relationship exists, dip should be assigned. Fixes: f91696f ("RDMA/hns: Support congestion control type selection according to the FW") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Junxian Huang <[email protected]> Signed-off-by: Wenpeng Liang <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 4303e61 commit 074f315

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4508,8 +4508,10 @@ static int get_dip_ctx_idx(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
45084508
spin_lock_irqsave(&hr_dev->dip_list_lock, flags);
45094509

45104510
list_for_each_entry(hr_dip, &hr_dev->dip_list, node) {
4511-
if (!memcmp(grh->dgid.raw, hr_dip->dgid, 16))
4511+
if (!memcmp(grh->dgid.raw, hr_dip->dgid, 16)) {
4512+
*dip_idx = hr_dip->dip_idx;
45124513
goto out;
4514+
}
45134515
}
45144516

45154517
/* If no dgid is found, a new dip and a mapping between dgid and

0 commit comments

Comments
 (0)