File perftest-fix-deallocate-pd.patch of Package perftest.17260
commit 1d056d7127e9c5706192ca5513d4b795562b9244
Author: yuvalbason <36700752+yuvalbason@users.noreply.github.com>
Date: Thu Feb 13 11:29:33 2020 +0200
Bug fix - Failed to deallocate PD - Device or resource busy #52
Root cause - The code calls ibv_dealloc_pd without deregistering
all MR’s associated with that PD. send_destroy_ctx calls destroy_ctx
which doesn’t deregister the credit mr if rdma_cm is OFF.
However, rdma_cm is set to off before calling send_destroy_ctx.
Fix: Remove the line that sets the rdma_cm to OFF.
The code deregisters the MR used for the CM.
Signed-off-by: Yuval Bason <ybason@marvell.com>
diff --git src/send_bw.c src/send_bw.c
index 10f7acd43656..80d63fc718ff 100755
--- src/send_bw.c
+++ src/send_bw.c
@@ -541,7 +541,7 @@ int main(int argc, char *argv[])
fprintf(stderr," Failed to close connection between server and client\n");
fprintf(stderr," Trying to close this side resources\n");
}
- user_param.work_rdma_cm = OFF;
+
/* Destroy all test resources, including Mcast if exists */
if (send_destroy_ctx(&ctx,&user_param,&mcg_params)) {
fprintf(stderr,"Couldn't destroy all SEND resources\n");