Skip to content

Commit

Permalink
util/pingpong: close mr after ep close
Browse files Browse the repository at this point in the history
pingpong doesn't support FI_MR_ENDPOINT today,
so the mr is associated with domain instead of ep.
It is unsafe to close mr before closing ep because
it can cause an EBUSY error when there are outstanding
recvs of the mr posted to the ep/qp. This patch fixes
this issue by moving the mr close after the ep close.

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Dec 17, 2024
1 parent ebca5ec commit 17d9cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/pingpong.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,12 +1875,12 @@ static void pp_free_res(struct ct_pingpong *ct)
{
PP_DEBUG("Freeing resources of test suite\n");

if (ct->mr != &(ct->no_mr))
PP_CLOSE_FID(ct->mr);
PP_CLOSE_FID(ct->ep);
PP_CLOSE_FID(ct->pep);
PP_CLOSE_FID(ct->rxcq);
PP_CLOSE_FID(ct->txcq);
if (ct->mr != &(ct->no_mr))
PP_CLOSE_FID(ct->mr);
PP_CLOSE_FID(ct->av);
PP_CLOSE_FID(ct->eq);
PP_CLOSE_FID(ct->domain);
Expand Down

0 comments on commit 17d9cf2

Please sign in to comment.