From: Sean Hefty Date: Wed, 16 Feb 2011 02:06:24 +0000 (-0800) Subject: rping: revert commit 93635fa33b41d356fa096242fec4ce788194b42f X-Git-Tag: v1.0.14.1~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=44dcf1a4e1d68566ab7edb11eda7637943359a02;p=~shefty%2Flibrdmacm.git rping: revert commit 93635fa33b41d356fa096242fec4ce788194b42f From Steve Wise: The changes I added to rping to fix problems I was seeing when running rping over the upstream iw_cxgb3 have been included in OFED-1.5.3. That change, however breaks rping over iw_cxgb3 in 1.5.3. It causes a hang at the end of the rping run. The problem is not with rping, but with the down-level iw_cxgb3 code. The upstream change to fix iw_cxgb3, however, isn't trivial and it bumps the cxgb3 uverbs ABI. To fix this for OFED 1.5.3, we revert the corresponding commit and release an updated package. Signed-off-by: Sean Hefty --- diff --git a/examples/rping.c b/examples/rping.c index ee292eca..2d4c2de1 100644 --- a/examples/rping.c +++ b/examples/rping.c @@ -280,11 +280,12 @@ static int rping_cq_event_handler(struct rping_cb *cb) ret = 0; if (wc.status) { - if (wc.status != IBV_WC_WR_FLUSH_ERR) + if (wc.status != IBV_WC_WR_FLUSH_ERR) { fprintf(stderr, "cq completion failed status %d\n", wc.status); - ret = -1; + ret = -1; + } goto error; } @@ -801,9 +802,10 @@ static void *rping_persistent_server_thread(void *arg) rping_test_server(cb); rdma_disconnect(cb->child_cm_id); - pthread_join(cb->cqthread, NULL); rping_free_buffers(cb); rping_free_qp(cb); + pthread_cancel(cb->cqthread); + pthread_join(cb->cqthread, NULL); rdma_destroy_id(cb->child_cm_id); free_cb(cb); return NULL; @@ -888,7 +890,6 @@ static int rping_run_server(struct rping_cb *cb) rping_test_server(cb); rdma_disconnect(cb->child_cm_id); - pthread_join(cb->cqthread, NULL); rdma_destroy_id(cb->child_cm_id); err2: rping_free_buffers(cb); @@ -1056,7 +1057,6 @@ static int rping_run_client(struct rping_cb *cb) rping_test_client(cb); rdma_disconnect(cb->cm_id); - pthread_join(cb->cqthread, NULL); err2: rping_free_buffers(cb); err1: