* [PATCH] Avoid possible hang on device removal
@ 2016-10-25 20:50 Mustafa Ismail
[not found] ` <1477428628-11504-1-git-send-email-mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Mustafa Ismail @ 2016-10-25 20:50 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
leon-DgEjT+Ai2ygdnm+yROfE0A
When we get an RDMA_CM_EVENT_DEVICE_REMOVAL the cm_thread will
exit and because flush errors are ignored the cb->sem may not get signaled.
So just signal on device removal event.
Signed-off-by: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
librdmacm/examples/rping.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c
index ad38f6d..53c1525 100644
--- a/librdmacm/examples/rping.c
+++ b/librdmacm/examples/rping.c
@@ -224,6 +224,8 @@ static int rping_cma_event_handler(struct rdma_cm_id *cma_id,
case RDMA_CM_EVENT_DEVICE_REMOVAL:
fprintf(stderr, "cma detected device removal!!!!\n");
+ cb->state = ERROR;
+ sem_post(&cb->sem);
ret = -1;
break;
--
2.7.4
--
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] 5+ messages in thread[parent not found: <1477428628-11504-1-git-send-email-mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* RE: [PATCH] Avoid possible hang on device removal [not found] ` <1477428628-11504-1-git-send-email-mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2016-10-25 20:56 ` Steve Wise 2016-10-25 22:43 ` Jason Gunthorpe 0 siblings, 1 reply; 5+ messages in thread From: Steve Wise @ 2016-10-25 20:56 UTC (permalink / raw) To: 'Mustafa Ismail', linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w, hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A > > When we get an RDMA_CM_EVENT_DEVICE_REMOVAL the cm_thread will > exit and because flush errors are ignored the cb->sem may not get signaled. > So just signal on device removal event. > > Signed-off-by: Mustafa Ismail <mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Looks good. Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> Also, this fixes a previous commit, so you could add this tag: Fixes 612eae1f6fe3 ("rping: ignore flushed completions") However that commit id is from the previous librdmacm repo...not sure how useful it is? Steve. -- 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 [flat|nested] 5+ messages in thread
* Re: [PATCH] Avoid possible hang on device removal 2016-10-25 20:56 ` Steve Wise @ 2016-10-25 22:43 ` Jason Gunthorpe [not found] ` <20161025224318.GA7816-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Jason Gunthorpe @ 2016-10-25 22:43 UTC (permalink / raw) To: Steve Wise Cc: 'Mustafa Ismail', linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w, hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A On Tue, Oct 25, 2016 at 03:56:57PM -0500, Steve Wise wrote: > Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> > > Also, this fixes a previous commit, so you could add this tag: > > Fixes 612eae1f6fe3 ("rping: ignore flushed completions") > > However that commit id is from the previous librdmacm repo...not > sure how useful it is? It still exists in the new repo, I'd include the fixes line. Jason -- 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 [flat|nested] 5+ messages in thread
[parent not found: <20161025224318.GA7816-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* RE: [PATCH] Avoid possible hang on device removal [not found] ` <20161025224318.GA7816-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2016-10-26 13:45 ` Steve Wise 2016-10-26 16:03 ` Jason Gunthorpe 0 siblings, 1 reply; 5+ messages in thread From: Steve Wise @ 2016-10-26 13:45 UTC (permalink / raw) To: 'Jason Gunthorpe' Cc: 'Mustafa Ismail', linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w, hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A > > Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> > > > > Also, this fixes a previous commit, so you could add this tag: > > > > Fixes 612eae1f6fe3 ("rping: ignore flushed completions") > > > > However that commit id is from the previous librdmacm repo...not > > sure how useful it is? > > It still exists in the new repo, I'd include the fixes line. > > Jason Hey Jason, how do I see the history? [root@stevo1 rdma-core]# git log --pretty=oneline --abbrev-commit librdmacm/examples/rping.c 9024876 rdmacm: Use correct format specifier for size_t 400122e Be explicit about _GNU_SOURCE 663098b Rename librdmacm -- 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 [flat|nested] 5+ messages in thread
* Re: [PATCH] Avoid possible hang on device removal 2016-10-26 13:45 ` Steve Wise @ 2016-10-26 16:03 ` Jason Gunthorpe 0 siblings, 0 replies; 5+ messages in thread From: Jason Gunthorpe @ 2016-10-26 16:03 UTC (permalink / raw) To: Steve Wise Cc: 'Mustafa Ismail', linux-rdma-u79uwXL29TY76Z2rM5mHXA, sean.hefty-ral2JQCrhuEAvxtiuMwx3w, hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, dledford-H+wXaHxf7aLQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A On Wed, Oct 26, 2016 at 08:45:33AM -0500, Steve Wise wrote: > > > Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> > > > > > > Also, this fixes a previous commit, so you could add this tag: > > > > > > Fixes 612eae1f6fe3 ("rping: ignore flushed completions") > > > > > > However that commit id is from the previous librdmacm repo...not > > > sure how useful it is? > > > > It still exists in the new repo, I'd include the fixes line. > > > > Jason > > Hey Jason, how do I see the history? > > [root@stevo1 rdma-core]# git log --pretty=oneline --abbrev-commit > librdmacm/examples/rping.c > 9024876 rdmacm: Use correct format specifier for size_t > 400122e Be explicit about _GNU_SOURCE > 663098b Rename librdmacm Add --follow $ git log --follow --pretty=oneline --abbrev-commit librdmacm/examples/rping.c 44579aeb63ee Enable -Wwrite-strings 90248767130f rdmacm: Use correct format specifier for size_t 400122ef15bd Be explicit about _GNU_SOURCE 663098bfc3ac Rename librdmacm 171176797516 [v1, 1/1, librdmacm] examples/rping.c: fix unwanted abort during qp creation c9ac6566b26c [librdmacm] examples: Use gai_strerror rather than perror for [rdma_]getaddrinfo failures 5c5bd081e37a rping: create persistent server threads in DETACHED state 612eae1f6fe3 rping: ignore flushed completions 5ae36aba6f95 rping: Fixes race, where ibv context was getting freed before memory was deregistered b70a390d8bd8 rping: Fix server reporting error on exit e57196c71ddd [5/5,librdmacm] rping: added checks to the return values functions 860b1a8784f1 rping: Reduce retry_count to fit in 3-bits 5658ff385e04 rping: Replace sprintf with snprintf to protect from buffer overflow 93635fa33b41 librdmacm/rping: Make sure CQ event thread exits before destroying the CQ 8c6aeb3e70bb RPING: Remove printf for FLUSH completion. 4e33a4109a62 librdmacm: returns errors from the library consistently 267c28a2f03b rping: add ipv6 support ea9b03238b13 librdmacm/rping: allow specifying hostnames in place of IP addresses 163f48d410fa librdmacm/rping: fix duplicate usage message 308b811d8d6b librdmacm: implement address change event 1beed21b111e librdmacm/examples [..] Jason -- 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 [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-26 16:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 20:50 [PATCH] Avoid possible hang on device removal Mustafa Ismail
[not found] ` <1477428628-11504-1-git-send-email-mustafa.ismail-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-10-25 20:56 ` Steve Wise
2016-10-25 22:43 ` Jason Gunthorpe
[not found] ` <20161025224318.GA7816-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-26 13:45 ` Steve Wise
2016-10-26 16:03 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox