public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pavel Shamis (Pasha)" <pashash-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
Cc: Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: RDMAoE verbs questions
Date: Wed, 25 Nov 2009 22:13:06 +0200	[thread overview]
Message-ID: <4B0D8FD2.9000702@dev.mellanox.co.il> (raw)
In-Reply-To: <4B0D4660.5060701-smomgflXvOZWk0Htik3J/w@public.gmane.org>

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

Or,
The patch is attached.

Regards,
Pasha.

Or Gerlitz wrote:
> Jeff Squyres wrote:
>> Here's one thread:  
>> http://www.open-mpi.org/community/lists/devel/2009/11/7063.php
> Jeff, looking on the threads you have sent, I didn't find a way to 
> download the patch in a form which can be applied on a source tree, is 
> there a way to do it through this archive? are these patches available 
> from some git tree @mellanox or elsewhere? does anyone have the email 
> address of Vasily Philipov (/vasily_at_[hidden]/), if yes, can you op 
> Pasha please ask him to send me or better, this list the proposed 
> patch, many thanks.
>
> Or
>
> -- 
> 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
>


[-- Attachment #2: rdmaoe.patch --]
[-- Type: text/x-patch, Size: 6393 bytes --]

diff -r 16b0d6d73529 ompi/config/ompi_check_openib.m4
--- a/ompi/config/ompi_check_openib.m4	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/config/ompi_check_openib.m4	Sun Nov 15 14:58:37 2009 +0200
@@ -13,7 +13,7 @@
 # Copyright (c) 2006-2008 Cisco Systems, Inc.  All rights reserved.
 # Copyright (c) 2006-2007 Los Alamos National Security, LLC.  All rights
 #                         reserved.
-# Copyright (c) 2006-2008 Mellanox Technologies. All rights reserved.
+# Copyright (c) 2006-2009 Mellanox Technologies. All rights reserved.
 # $COPYRIGHT$
 # 
 # Additional copyrights may follow
@@ -204,6 +204,21 @@
                        [$1_have_ibcm=1
                        $1_LIBS="-libcm $$1_LIBS"])])
            fi
+		   
+           # Check support for RDMAoE devices
+           $1_have_rdmaoe=0
+           AC_CHECK_DECLS([RDMA_TRANSPORT_RDMAOE],
+                          [$1_have_rdmaoe=1], [],
+                          [#include <infiniband/verbs.h>])
+
+           AC_MSG_CHECKING([if RDMAoE support is enabled])
+           if test "1" = "$$1_have_rdmaoe"; then
+                AC_DEFINE_UNQUOTED([OMPI_HAVE_RDMAOE], [$$1_have_rdmaoe], [Enable RDMAoE support])
+                AC_MSG_RESULT([yes])
+           else
+                AC_MSG_RESULT([no])
+           fi
+
           ])
 
     # Check to see if <infiniband/driver.h> works.  It is known to
diff -r 16b0d6d73529 ompi/mca/btl/openib/btl_openib.c
--- a/ompi/mca/btl/openib/btl_openib.c	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/mca/btl/openib/btl_openib.c	Sun Nov 15 14:58:37 2009 +0200
@@ -354,6 +354,13 @@
         }
 #endif
 
+#ifdef OMPI_HAVE_RDMAOE
+        if(RDMA_TRANSPORT_RDMAOE == (openib_btl->ib_port_attr.transport) &&
+                OPAL_PROC_ON_LOCAL_NODE(ompi_proc->proc_flags)) {
+            continue;
+        }
+#endif
+
         if(NULL == (ib_proc = mca_btl_openib_proc_create(ompi_proc))) {
             return OMPI_ERR_OUT_OF_RESOURCE;
         }
diff -r 16b0d6d73529 ompi/mca/btl/openib/connect/base.h
--- a/ompi/mca/btl/openib/connect/base.h	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/mca/btl/openib/connect/base.h	Sun Nov 15 14:58:37 2009 +0200
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2007-2008 Cisco Systems, Inc.  All rights reserved.
  *
+ * Copyright (c) 2009      Mellanox Technologies.  All rights reserved.
  * $COPYRIGHT$
  * 
  * Additional copyrights may follow
@@ -13,6 +14,17 @@
 
 #include "connect/connect.h"
 
+#ifdef OMPI_HAVE_RDMAOE
+#define BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)                       \
+        (((IBV_TRANSPORT_IB != ((btl)->device->ib_dev->transport_type)) || \
+        (RDMA_TRANSPORT_RDMAOE == ((btl)->ib_port_attr.transport))) ?      \
+        true : false)
+#else
+#define BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)                       \
+        ((IBV_TRANSPORT_IB != ((btl)->device->ib_dev->transport_type)) ?   \
+        true : false)
+#endif
+
 BEGIN_C_DECLS
 
 /*
diff -r 16b0d6d73529 ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c
--- a/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c	Sun Nov 15 14:58:37 2009 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2007-2009 Cisco Systems, Inc.  All rights reserved.
- * Copyright (c) 2008      Mellanox Technologies. All rights reserved.
+ * Copyright (c) 2008-2009 Mellanox Technologies. All rights reserved.
  *
  * $COPYRIGHT$
  * 
@@ -653,7 +653,7 @@
        we're in an old version of OFED that is IB only (i.e., no
        iWarp), so we can safely assume that we can use this CPC. */
 #if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE)
-    if (IBV_TRANSPORT_IB != btl->device->ib_dev->transport_type) {
+    if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
         BTL_VERBOSE(("ibcm CPC only supported on InfiniBand; skipped on %s:%d",
                      ibv_get_device_name(btl->device->ib_dev),
                      openib_btl->port_num));
diff -r 16b0d6d73529 ompi/mca/btl/openib/connect/btl_openib_connect_oob.c
--- a/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c	Sun Nov 15 14:58:37 2009 +0200
@@ -12,7 +12,7 @@
  * Copyright (c) 2006-2009 Cisco Systems, Inc.  All rights reserved.
  * Copyright (c) 2006      Los Alamos National Security, LLC.  All rights
  *                         reserved. 
- * Copyright (c) 2008      Mellanox Technologies.  All rights reserved.
+ * Copyright (c) 2008-2009 Mellanox Technologies.  All rights reserved.
  *
  * $COPYRIGHT$
  * 
@@ -120,7 +120,7 @@
        transport_type member, then we must be < OFED v1.2, and
        therefore we must be IB. */   
 #if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE)
-    if (IBV_TRANSPORT_IB != btl->device->ib_dev->transport_type) {
+    if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
         opal_output_verbose(5, mca_btl_base_output,
                             "openib BTL: oob CPC only supported on InfiniBand; skipped on  %s:%d",
                             ibv_get_device_name(btl->device->ib_dev),
diff -r 16b0d6d73529 ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c
--- a/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c	Tue Nov 03 20:00:16 2009 -0800
+++ b/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c	Sun Nov 15 14:58:37 2009 +0200
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2007-2009 Cisco Systems, Inc.  All rights reserved.
  * Copyright (c) 2007-2008 Chelsio, Inc. All rights reserved.
- * Copyright (c) 2008      Mellanox Technologies. All rights reserved.
+ * Copyright (c) 2008-2009 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2009      Sandia National Laboratories. All rights reserved.
  *
  * $COPYRIGHT$
@@ -1158,10 +1158,15 @@
  */
 static int rdmacm_destroy_dummy_qp(id_context_t *context)
 {
-    if (NULL != context->id->qp) {
-        ibv_destroy_qp(context->id->qp);
-        context->id->qp = NULL;
+    /* We need to check id pointer because of retransmitions.
+                                 Maybe the reject was already done. */
+    if (NULL != context->id) {
+	    if (NULL != context->id->qp) {
+            ibv_destroy_qp(context->id->qp);
+            context->id->qp = NULL;
+        }
     }
+
     if (NULL != context->contents->dummy_cq) {
         ibv_destroy_cq(context->contents->dummy_cq);
     }

  parent reply	other threads:[~2009-11-25 20:13 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24 23:23 RDMAoE verbs questions Jeff Squyres
     [not found] ` <209ECE49-3AB9-4E62-B825-54E474321FA6-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25  0:11   ` Jason Gunthorpe
     [not found]     ` <20091125001136.GP6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-25  2:12       ` Jeff Squyres
     [not found]         ` <DD0B6BCA-5892-4CA9-8F5D-87C6CC1189DC-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25  4:52           ` Jason Gunthorpe
     [not found]             ` <20091125045244.GJ1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-25  9:53               ` Pavel Shamis (Pasha)
     [not found]                 ` <4B0CFEAB.70304-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-25 17:44                   ` Jason Gunthorpe
2009-11-25 12:01               ` Jeff Squyres
2009-11-25 14:04       ` Tziporet Koren
     [not found]         ` <4B0D3982.2040408-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2009-11-25 14:30           ` Jeff Squyres
     [not found]             ` <7127F20E-2307-492D-B929-A6ACA5A74D14-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 14:41               ` Eli Cohen
2009-11-25 17:39                 ` Jason Gunthorpe
     [not found]                   ` <20091125173917.GK1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-01 20:58                     ` Christoph Lameter
2009-11-30 13:34       ` Eli Cohen
2009-11-30 14:03         ` Jeff Squyres
     [not found]           ` <5A90523D-56AE-4675-AA39-B6876FB32999-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-12-01 14:28             ` Eli Cohen
2009-12-01 21:00               ` Christoph Lameter
2009-11-30 17:21         ` Jason Gunthorpe
2009-11-30 18:50         ` Roland Dreier
     [not found]           ` <adaiqcrx2xx.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-11-30 19:03             ` Jason Gunthorpe
     [not found]               ` <20091130190345.GV6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-05  4:03                 ` Roland Dreier
     [not found]                   ` <ada1vjaukx8.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-12-05  4:16                     ` Jason Gunthorpe
2009-12-07 17:25                     ` Eli Cohen
2009-12-09 19:06                       ` Roland Dreier
     [not found]                         ` <adak4wwrmpq.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-12-09 21:48                           ` Jason Gunthorpe
     [not found]                             ` <20091209214843.GM6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-09 22:31                               ` Eli Cohen
2009-11-30 20:01             ` Todd Rimmer
     [not found]               ` <5AEC2602AE03EB46BFC16C6B9B200DA81691763FEA-e4KNYiSEog6Xx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2009-12-01 16:46                 ` Eli Cohen
2009-12-01 14:42             ` Eli Cohen
2009-11-25  7:25   ` Or Gerlitz
     [not found]     ` <4B0CDBEC.1030203-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-25 11:52       ` Jeff Squyres
     [not found]         ` <10904370-1D66-4013-BB3F-0F4B5EE581EE-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 14:59           ` Or Gerlitz
     [not found]             ` <4B0D4660.5060701-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-25 20:13               ` Pavel Shamis (Pasha) [this message]
     [not found]                 ` <4B0D8FD2.9000702-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-26  7:26                   ` Or Gerlitz
     [not found]                     ` <4B0E2DA7.7060809-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-26  9:00                       ` Pavel Shamis (Pasha)
     [not found]                         ` <4B0E43BA.6070700-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-26 11:16                           ` Or Gerlitz
2009-11-30 13:54               ` Jeff Squyres
2009-12-02 12:12       ` Eli Cohen
     [not found] <F57121538EA0C94F86018DDD40ADA1D101A4E9A6@mtiexch01.mti.com>
     [not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01CBE494@mtlexch01.mtl.com>
     [not found]   ` <2ED289D4E09FBD4D92D911E869B97FDD01CBE494-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-01 16:22     ` Liran Liss
     [not found]       ` <2ED289D4E09FBD4D92D911E869B97FDD01D0D6F9-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-01 16:27         ` Sean Hefty
     [not found]           ` <44B4931AF8354AF3BABCCA052150D2BA-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-12-01 17:00             ` Liran Liss
     [not found]               ` <2ED289D4E09FBD4D92D911E869B97FDD01D0D792-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-02  8:08                 ` Or Gerlitz
     [not found]                   ` <000001ca732d$1f99b4d0$5ecd1e70$@com>
2009-12-02 10:49                     ` Liran Liss
2009-12-02 10:59                     ` Or Gerlitz
2009-12-01 17:46         ` Jason Gunthorpe
     [not found]           ` <20091201174604.GO1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-02 10:38             ` Liran Liss
     [not found]               ` <2ED289D4E09FBD4D92D911E869B97FDD01D647E2-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-02 17:33                 ` Jason Gunthorpe
     [not found]                   ` <20091202173314.GP1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-03 18:26                     ` Liran Liss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0D8FD2.9000702@dev.mellanox.co.il \
    --to=pashash-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    --cc=pasha-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox