[openib-general] [PATCH] limrdmacm/cmatose: added a check to the return value of the post send requests
Dotan Barak
dotanb at mellanox.co.il
Mon Apr 3 06:54:09 PDT 2006
Added a check to the return value of the post send requests.
Signed-off-by: Dotan Barak <dotanb at mellanox.co.il>
Index: latest/src/userspace/librdmacm/examples/cmatose.c
===================================================================
--- latest.orig/src/userspace/librdmacm/examples/cmatose.c 2006-04-03 08:05:39.000000000 +0300
+++ latest/src/userspace/librdmacm/examples/cmatose.c 2006-04-03 16:47:24.000000000 +0300
@@ -204,9 +204,13 @@ static int post_sends(struct cmatest_nod
sge.lkey = node->mr->lkey;
sge.addr = (uintptr_t) node->mem;
- for (i = 0; i < message_count && !ret; i++)
+ for (i = 0; i < message_count && !ret; i++) {
ret = ibv_post_send(node->cma_id->qp, &send_wr, &bad_send_wr);
-
+ if (ret) {
+ printf("failed to post sends: %d\n", ret);
+ break;
+ }
+ }
return ret;
}
More information about the general
mailing list