public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH libibverbs] XRC - Sample application issues
@ 2013-08-08 15:05 Yishai Hadas
       [not found] ` <1375974336-26314-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Yishai Hadas @ 2013-08-08 15:05 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg
  Cc: ogerlitz-VPRAkNaXOzVWk0Htik3J/w, tzahio-VPRAkNaXOzVWk0Htik3J/w,
	yishaih-VPRAkNaXOzVWk0Htik3J/w, sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	jay.e.sternberg-ral2JQCrhuEAvxtiuMwx3w, Eli Cohen

Fix sync issue when clients go down, it comes to prevent a case when
client misses a response from the daemon then wait forever.

Fix typo in error message.

Signed-off-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---

This patch is on top of V9 of XRC series that was already sent.
It should be squashed into latest patch #7 named 'Add XRC sample application'.

Jay, Sean - please review.


 examples/xsrq_pingpong.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/examples/xsrq_pingpong.c b/examples/xsrq_pingpong.c
index 984740d..aceef2e 100644
--- a/examples/xsrq_pingpong.c
+++ b/examples/xsrq_pingpong.c
@@ -376,7 +376,7 @@ static int connect_qps(int index)
 			  IBV_QP_STATE | IBV_QP_AV | IBV_QP_PATH_MTU |
 			  IBV_QP_DEST_QPN | IBV_QP_RQ_PSN |
 			  IBV_QP_MAX_DEST_RD_ATOMIC | IBV_QP_MIN_RNR_TIMER)) {
-		fprintf(stderr, "Failed to modify send QP[%d] to RTR\n", index);
+		fprintf(stderr, "Failed to modify recv QP[%d] to RTR\n", index);
 		return 1;
 	}
 
@@ -884,6 +884,13 @@ int main(int argc, char *argv[])
 	if (ctx.use_event)
 		ibv_ack_cq_events(ctx.recv_cq, num_cq_events);
 
+	/* Process should wait before closing its resources to make sure
+	  * latest daemon's response sent via its target QP destined to an XSRQ
+	  * created by another client won't be lost.
+	  * Failure to do so will cause the client to wait for that sent message forever.
+	  * See comment on pp_post_send.
+	*/
+	sleep(1);
 	if (pp_close_ctx())
 		return 1;
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-20  5:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-08 15:05 [PATCH libibverbs] XRC - Sample application issues Yishai Hadas
     [not found] ` <1375974336-26314-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-08-16 15:10   ` Hefty, Sean
     [not found]     ` <63247C4015478741AE4981C62DF608835683DDC8@MTLDAG01.mtl.com>
     [not found]       ` <63247C4015478741AE4981C62DF608835683DDC8-fViJhHBwANKuSA5JZHE7gA@public.gmane.org>
2013-08-18  9:05         ` Yishai Hadas
     [not found]           ` <52108E6C.9070908-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-08-19 19:12             ` Jason Gunthorpe
     [not found]               ` <20130819191216.GA29493-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-08-20  5:16                 ` Ido Shamai
     [not found]     ` <1828884A29C6694DAF28B7E6B8A8237388CA64F6-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-08-19 15:27       ` Steve Wise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox