Skip to content

Commit

Permalink
librdmacm: Ack the pending event in sync UD connection
Browse files Browse the repository at this point in the history
When the server accepts a UD connection request in sync mode,
the event needs to be acked, otherwise destroying the
listening id would get stuck because there is a pending event.
For RC, the event is acked in ucma_complete().

Fixes: 332b203 ("librdmacm: Do not wait in rdma_accept for UD QPs")
Signed-off-by: Oren Sidi <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Reviewed-by: Sean Hefty <[email protected]>
Signed-off-by: Yishai Hadas <[email protected]>
  • Loading branch information
Oren Sidi authored and Yishai Hadas committed May 5, 2024
1 parent 3be5661 commit 9a0fc3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion librdmacm/cma.c
Expand Up @@ -1951,8 +1951,14 @@ int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
return (ret >= 0) ? ERR(ENODATA) : -1;
}

if (ucma_is_ud_qp(id->qp_type))
if (ucma_is_ud_qp(id->qp_type)) {
if (id_priv->sync && id_priv->id.event) {
rdma_ack_cm_event(id_priv->id.event);
id_priv->id.event = NULL;
}

return 0;
}

return ucma_complete(id);
}
Expand Down

0 comments on commit 9a0fc3a

Please sign in to comment.