From owner-svn-src-head@FreeBSD.ORG Wed Oct 29 06:47:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 004E9247 for ; Wed, 29 Oct 2014 06:47:46 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE5F6909 for ; Wed, 29 Oct 2014 06:47:46 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id C7FA128CA for ; Wed, 29 Oct 2014 02:47:45 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 29 Oct 2014 02:47:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= x-sasl-enc:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; s=mesmtp; bh=xCjs35M3ryBbz8xpnLt2283NzCA=; b=OhC1ei lec2C+uSM4CtE+9Ok8Icmde4Cyx7Hnei0bYgEr8d0sFzjlcmJzW3HLKqo0nypzDj MiYwKSrXJJKHjSTuyBmMbNJyaoYbSZJJuUmvR9YJBqNJc27rdYwZ5I2EF9GtpyIN /UwmeBVRmwE01PcGOPYnUUrPoJlfdgycEQEmA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:in-reply-to:references :mime-version:content-transfer-encoding:content-type:subject :from:date:to:cc:message-id; s=smtpout; bh=xCjs35M3ryBbz8xpnLt22 83NzCA=; b=X9tX+ri1Rwtm34NOotFEkbFMhWoAtNR8Dv1W0lIT3816zwYrJYZeb MySpF21Em3ygEJ5G1B0oguHTXokdmm3j+6PGQJVzDqy5Gds1gdSdrSTPfgJpm4Y+ rZVIbsL9dfNPfbeISg/WNwDqONU556AdApTiTobXMpReA/i9uXoRkg= X-Sasl-enc: AA5yk2K6euDYYmFH5rjr0Squ2A4biLMls1aPosrm+9l7 1414565264 Received: from [192.168.0.110] (unknown [174.24.231.159]) by mail.messagingengine.com (Postfix) with ESMTPA id 6619E6800EC; Wed, 29 Oct 2014 02:47:43 -0400 (EDT) User-Agent: K-9 Mail for Android In-Reply-To: <20141029063729.GA7077@ox> References: <201410290624.s9T6OD1a038594@svn.freebsd.org> <20141029063729.GA7077@ox> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: svn commit: r273811 - head/contrib/ofed/librdmacm/examples From: Anthony Cornehl Date: Tue, 28 Oct 2014 23:47:29 -0700 To: Navdeep Parhar Message-ID: <2773FEBA-554C-4035-A27B-0F1DEBB98ED3@fastmail.fm> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 06:47:47 -0000 On October 28, 2014 11:38:01 PM PDT, Navdeep Parhar 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 >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 >> > #include >> > #include >> >-#include >> > #include >> > #include >> > #include >> >@@ -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" >> >> >>