public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rdma cm typo + bug report
@ 2011-05-09 21:50 frank zago
       [not found] ` <4DC861A7.5010005-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: frank zago @ 2011-05-09 21:50 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sean Hefty

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

Hi Sean,

Here's a patch for a typo.

I also think there's a bug with ucma_create_cqs()/ucma_destroy_cqs() because ucma_destroy_cqs unconditionally destroys the CQs, even if they were given by the application. librdmacm should only destroy the CQs it created.

Regards,
  Frank.

[-- Attachment #2: rdmacm-typo.diff --]
[-- Type: text/x-diff, Size: 332 bytes --]

diff --git a/examples/rdma_server.c b/examples/rdma_server.c
index 2831d0c..5b9e16d 100644
--- a/examples/rdma_server.c
+++ b/examples/rdma_server.c
@@ -97,7 +97,7 @@ static int run(void)
 
 	ret = rdma_accept(id, NULL);
 	if (ret) {
-		printf("rdma_connect %d\n", errno);
+		printf("rdma_accept %d\n", errno);
 		return ret;
 	}
 

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

* RE: [PATCH] rdma cm typo + bug report
       [not found] ` <4DC861A7.5010005-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
@ 2011-05-09 22:34   ` Hefty, Sean
       [not found]     ` <1828884A29C6694DAF28B7E6B8A82373B942-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Hefty, Sean @ 2011-05-09 22:34 UTC (permalink / raw)
  To: frank zago, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> Here's a patch for a typo.

Thanks - I added a patch for this.
 
> I also think there's a bug with ucma_create_cqs()/ucma_destroy_cqs()
> because ucma_destroy_cqs unconditionally destroys the CQs, even if they
> were given by the application. librdmacm should only destroy the CQs it
> created.

I think we're okay here.  ucma_create_cqs() only allocates a CQ if the user specified a CQ of NULL as part of the QP attributes.  It stores the allocated CQ in id->send/recv_cq.  ucma_destroy_cqs() checks for id->send/recv_cq and destroys them.

- Sean
--
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] 3+ messages in thread

* Re: [PATCH] rdma cm typo + bug report
       [not found]     ` <1828884A29C6694DAF28B7E6B8A82373B942-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2011-05-09 22:53       ` frank zago
  0 siblings, 0 replies; 3+ messages in thread
From: frank zago @ 2011-05-09 22:53 UTC (permalink / raw)
  To: Hefty, Sean; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 05/09/2011 05:34 PM, Hefty, Sean wrote:

>> I also think there's a bug with ucma_create_cqs()/ucma_destroy_cqs()
>> because ucma_destroy_cqs unconditionally destroys the CQs, even if they
>> were given by the application. librdmacm should only destroy the CQs it
>> created.
> 
> I think we're okay here.  ucma_create_cqs() only allocates a CQ if the user specified a CQ of NULL as part of the QP attributes.  It stores the allocated CQ in id->send/recv_cq.  ucma_destroy_cqs() checks for id->send/recv_cq and destroys them.

Indeed. Sorry.

Frank.
--
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] 3+ messages in thread

end of thread, other threads:[~2011-05-09 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 21:50 [PATCH] rdma cm typo + bug report frank zago
     [not found] ` <4DC861A7.5010005-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-05-09 22:34   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373B942-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-09 22:53       ` frank zago

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