Skip to content

Commit 6380bca

Browse files
authored
UCT/GDAKI: Read updated qp pi on reserve wqe (#10927)
1 parent 8a7afc1 commit 6380bca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uct/ib/mlx5/gdaki/gdaki.cuh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ UCS_F_DEVICE uint64_t uct_rc_mlx5_gda_max_alloc_wqe_base(
9797
{
9898
/* TODO optimize by including sq_wqe_num in qp->sq_wqe_pi and updating it
9999
when processing a new completion */
100-
return ep->sq_wqe_pi + ep->sq_wqe_num - count;
100+
uint64_t pi = doca_gpu_dev_verbs_atomic_read<uint64_t,
101+
DOCA_GPUNETIO_VERBS_RESOURCE_SHARING_MODE_GPU>(&ep->sq_wqe_pi);
102+
return pi + ep->sq_wqe_num - count;
101103
}
102104

103105
UCS_F_DEVICE uint64_t uct_rc_mlx5_gda_reserv_wqe_thread(

0 commit comments

Comments
 (0)