mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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>
This commit is contained in:
parent
679eb25de4
commit
0fed679e08
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user