summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Luick <dean.luick@cornelisnetworks.com>2026-03-09 23:44:54 +0300
committerLeon Romanovsky <leon@kernel.org>2026-03-11 22:17:28 +0300
commit0fed679e0862b3abd706041be3cc7620318fbee8 (patch)
treef3d6f34397fbb5cdfb1791830783694c16b82dac
parent679eb25de4ee537f209c6d81f7808ad65b03bbbc (diff)
downloadlinux-0fed679e0862b3abd706041be3cc7620318fbee8.tar.xz
RDMA/rdmavt: Correct multi-port QP iteration
When finding special QPs, the iterator makes an incorrect port index calculation. Fix the calculation. Signed-off-by: Dean Luick <dean.luick@cornelisnetworks.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com> Link: https://patch.msgid.link/177308909468.1279894.5073405674644246445.stgit@awdrv-04.cornelisnetworks.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index c1199ea5d41f..b519d9d0e429 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -2707,7 +2707,7 @@ int rvt_qp_iter_next(struct rvt_qp_iter *iter)
struct rvt_ibport *rvp;
int pidx;
- pidx = n % rdi->ibdev.phys_port_cnt;
+ pidx = n / 2; /* QP0 and QP1 */
rvp = rdi->ports[pidx];
qp = rcu_dereference(rvp->qp[n & 1]);
} else {