Date: Tue, 28 Oct 2014 23:47:29 -0700 From: Anthony Cornehl <accornehl@fastmail.fm> To: Navdeep Parhar <np@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r273811 - head/contrib/ofed/librdmacm/examples Message-ID: <2773FEBA-554C-4035-A27B-0F1DEBB98ED3@fastmail.fm> In-Reply-To: <20141029063729.GA7077@ox> References: <201410290624.s9T6OD1a038594@svn.freebsd.org> <DBE32087-CBC1-4E69-A0C3-941DA6B7D081@fastmail.fm> <20141029063729.GA7077@ox>
next in thread | previous in thread | raw e-mail | index | archive | help
On October 28, 2014 11:38:01 PM PDT, Navdeep Parhar <np@FreeBSD.org> wrote: >On Tue, Oct 28, 2014 at 11:34:11PM -0700, Anthony Cornehl wrote: >> On October 28, 2014 11:24:13 PM PDT, Navdeep Parhar <np@FreeBSD.org> >wrote: >> >Author: np >> >Date: Wed Oct 29 06:24:12 2014 >> >New Revision: 273811 >> >URL: https://svnweb.freebsd.org/changeset/base/273811 >> > >> >Log: >> > rping: make sure that the CQ event thread can never poll a CQ after >it >> > has been destroyed. >> > >> > Submitted by: Hariprasad at Chelsio dot com >> > Sponsored by: Chelsio Communications >> > >> >> Is this change present upstream? We really should be tracking the >originating >> repositories when making changes in OFED packages, but the kernel and >> userspace is several years out of date from what OFED is tracking >currently. > >The patch was submitted upstream. I'm sure it'll get there eventually. > >Navdeep > Awesome! Thanks for fixing this. >> >> [1] http://git.openfabrics.org/?p=~shefty/librdmacm.git;a=summary >> >> >Modified: >> > head/contrib/ofed/librdmacm/examples/rping.c >> > >> >Modified: head/contrib/ofed/librdmacm/examples/rping.c >> >>============================================================================== >> >--- head/contrib/ofed/librdmacm/examples/rping.c Wed Oct 29 04:32:46 >> >2014 (r273810) >> >+++ head/contrib/ofed/librdmacm/examples/rping.c Wed Oct 29 06:24:12 >> >2014 (r273811) >> >@@ -40,7 +40,6 @@ >> > #include <netinet/in.h> >> > #include <sys/socket.h> >> > #include <netdb.h> >> >-#include <byteswap.h> >> > #include <semaphore.h> >> > #include <arpa/inet.h> >> > #include <pthread.h> >> >@@ -280,10 +279,10 @@ static int rping_cq_event_handler(struct >> > ret = 0; >> > >> > if (wc.status) { >> >- fprintf(stderr, "cq completion failed status %d\n", >> >- wc.status); >> > if (wc.status != IBV_WC_WR_FLUSH_ERR) >> >- ret = -1; >> >+ fprintf(stderr, "cq completion failed status %d\n", >> >+ wc.status); >> >+ ret = -1; >> > goto error; >> > } >> > >> >@@ -800,10 +799,9 @@ static void *rping_persistent_server_thr >> > >> > 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,6 +886,7 @@ static int rping_run_server(struct rping >> > >> > 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); >> >@@ -1053,9 +1052,16 @@ static int rping_run_client(struct rping >> > goto err2; >> > } >> > >> >- rping_test_client(cb); >> >+ ret = rping_test_client(cb); >> >+ if (ret) { >> >+ fprintf(stderr, "rping client failed: %d\n", ret); >> >+ goto err3; >> >+ } >> >+ ret = 0; >> >+err3: >> > rdma_disconnect(cb->cm_id); >> > err2: >> >+ pthread_join(cb->cqthread, NULL); >> > rping_free_buffers(cb); >> > err1: >> > rping_free_qp(cb); >> >_______________________________________________ >> >svn-src-head@freebsd.org mailing list >> >http://lists.freebsd.org/mailman/listinfo/svn-src-head >> >To unsubscribe, send any mail to >"svn-src-head-unsubscribe@freebsd.org" >> >> >>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2773FEBA-554C-4035-A27B-0F1DEBB98ED3>