]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Mon, 16 Aug 2010 17:18:07 +0000 (10:18 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 16 Aug 2010 17:18:07 +0000 (10:18 -0700)
meta
patches/gai
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 39abfda47f0d3faa35e43d800200e3a93c565ed5..71bdf35ef035a1a8f434ef0b50d84d7f6ac216d5 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: 9e26954e53fd216dc04830463cafe81c5b9c689e
-Head: d1cc63ef7150782aa507647f116d4b14de8e21cc
+Previous: a08121097c217859da0d4fb1c8e8f50d4f2db256
+Head: b5a8dd8a5b533f27f59a730602757ac220a66d41
 Applied:
   sync: 452ce3b051e10e10363baa77834962a89267e052
   pre-af-ib: 73504ef1f812bea6d1fd59f194f90e5194ca2efa
@@ -8,8 +8,7 @@ Applied:
   opt-cq: eb08384598a3829b40cc525aa2871e4e96817507
   max-rdma: 0dd5de47b21e3a7274ec258f969cfb366f7b5e46
   opt-cp: 0c67e54602a5ce5524698f8aba7f543f356a865a
-  gai: 9e8c0eaf693ddecf5e1d932af488bfdd11f82ac5
-  refresh-temp: d1cc63ef7150782aa507647f116d4b14de8e21cc
+  gai: b5a8dd8a5b533f27f59a730602757ac220a66d41
 Unapplied:
   cq-status: d4535a68c8d41302c9ee9d44b98a75ea19b4f172
   wv-rm-ioctl: 2c4f8b27f89993bc9c1215e8c358046b2934f755
index 70686ab33406fcab1befe0624da34fb42ce893fa..1ac3313dd8180cb7cc065bfb45cd1d81321c85a7 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: 5a4bd54fa45c17ca116710f00c36a7a09b2b37db
-Top:    79bdd0398365f7f202d9a70815bfd17bcf84cb0b
+Top:    5c341df87e859ab6d6dbc28cd60d6f6528b8e5e0
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-08-16 10:05:05 -0700
 
@@ -9,7 +9,7 @@ librdmacm: add rdma_getaddrinfo
 ---
 
 diff --git a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
-index 294a75b..3120cab 100644
+index 294a75b..2ef2868 100644
 --- a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
 +++ b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
 @@ -188,6 +188,26 @@ struct rdma_cm_event
@@ -39,7 +39,7 @@ index 294a75b..3120cab 100644
  /**\r
   * rdma_create_event_channel - Open a channel used to report communication events.\r
   * Description:\r
-@@ -639,6 +659,13 @@ int rdma_set_option(struct rdma_cm_id *id, int level, int optname,
+@@ -639,6 +659,15 @@ int rdma_set_option(struct rdma_cm_id *id, int level, int optname,
  __declspec(dllexport)\r
  int rdma_migrate_id(struct rdma_cm_id *id, struct rdma_event_channel *channel);\r
  \r
@@ -49,6 +49,8 @@ index 294a75b..3120cab 100644
 +int rdma_getaddrinfo(char *node, char *service,\r
 +                                       struct rdma_addrinfo *hints,\r
 +                                       struct rdma_addrinfo **res);\r
++\r
++void rdma_freeaddrinfo(struct rdma_addrinfo *res);\r
 +\r
  __declspec(dllexport)\r
  int rdmaw_wsa_errno(int wsa_err);\r
@@ -67,14 +69,232 @@ index 6a8418a..4a98afa 100644
  \r
  INCLUDES = ..\include;..\..\..\inc;..\..\..\inc\user;..\..\libibverbs\include;\\r
                   ..\..\..\inc\user\linux;\r
+diff --git a/trunk/ulp/librdmacm/src/addrinfo.c b/trunk/ulp/librdmacm/src/addrinfo.c
+new file mode 100644
+index 0000000..8e929ed
+--- /dev/null
++++ b/trunk/ulp/librdmacm/src/addrinfo.c
+@@ -0,0 +1,211 @@
++/*
++ * Copyright (c) 2010 Intel Corporation.  All rights reserved.
++ *
++ * This software is available to you under a choice of one of two
++ * licenses.  You may choose to be licensed under the terms of the GNU
++ * General Public License (GPL) Version 2, available from the file
++ * COPYING in the main directory of this source tree, or the
++ * OpenIB.org BSD license below:
++ *
++ *     Redistribution and use in source and binary forms, with or
++ *     without modification, are permitted provided that the following
++ *     conditions are met:
++ *
++ *      - Redistributions of source code must retain the above
++ *        copyright notice, this list of conditions and the following
++ *        disclaimer.
++ *
++ *      - Redistributions in binary form must reproduce the above
++ *        copyright notice, this list of conditions and the following
++ *        disclaimer in the documentation and/or other materials
++ *        provided with the distribution.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++ * SOFTWARE.
++ */
++
++#if HAVE_CONFIG_H
++#  include <config.h>
++#endif /* HAVE_CONFIG_H */
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netdb.h>
++#include <unistd.h>
++
++#include "cma.h"
++#include <rdma/rdma_cma.h>
++#include <rdma/rdma_verbs.h>
++
++static void ucma_convert_to_ai(struct addrinfo *ai, struct rdma_addrinfo *rai)
++{
++      memset(ai, 0, sizeof *ai);
++      ai->ai_flags = rai->ai_flags;
++      ai->ai_family = rai->ai_family;
++
++      switch (rai->ai_qp_type) {
++      case IBV_QPT_RC:
++              ai->ai_socktype = SOCK_STREAM;
++              break;
++      case IBV_QPT_UD:
++              ai->ai_socktype = SOCK_DGRAM;
++              break;
++      }
++
++      switch (rai->ai_port_space) {
++      case RDMA_PS_TCP:
++              ai->ai_protocol = IPPROTO_TCP;
++              break;
++      case RDMA_PS_IPOIB:
++      case RDMA_PS_UDP:
++              ai->ai_protocol = IPPROTO_UDP;
++              break;
++      }
++
++      if (rai->ai_flags & RAI_PASSIVE) {
++              ai->ai_addrlen = rai->ai_src_len;
++              ai->ai_addr = rai->ai_src_addr;
++      } else {
++              ai->ai_addrlen = rai->ai_dst_len;
++              ai->ai_addr = rai->ai_dst_addr;
++      }
++      ai->ai_canonname = rai->ai_dst_canonname;
++      ai->ai_next = NULL;
++}
++
++static int ucma_convert_to_rai(struct rdma_addrinfo *rai, struct addrinfo *ai)
++{
++      struct sockaddr *addr;
++      char *canonname;
++
++      memset(rai, 0, sizeof *rai);
++      rai->ai_flags = ai->ai_flags;
++      rai->ai_family = ai->ai_family;
++
++      switch (ai->ai_socktype) {
++      case SOCK_STREAM:
++              rai->ai_qp_type = IBV_QPT_RC;
++              break;
++      case SOCK_DGRAM:
++              rai->ai_qp_type = IBV_QPT_UD;
++              break;
++      }
++
++      switch (ai->ai_protocol) {
++      case IPPROTO_TCP:
++              rai->ai_port_space = RDMA_PS_TCP;
++              break;
++      case IPPROTO_UDP:
++              rai->ai_port_space = RDMA_PS_UDP;
++              break;
++      }
++
++      addr = malloc(ai->ai_addrlen);
++      if (!addr)
++              return rdma_seterrno(ENOMEM);
++
++      canonname = ai->ai_canonname ? malloc(strlen(ai->ai_canonname) + 1) : NULL;
++      if (canonname)
++              strcpy(canonname, ai->ai_canonname);
++
++      memcpy(addr, ai->ai_addr, ai->ai_addrlen);
++      if (ai->ai_flags & RAI_PASSIVE) {
++              rai->ai_src_addr = addr;
++              rai->ai_src_len = ai->ai_addrlen;
++              rai->ai_src_canonname = canonname;
++      } else {
++              rai->ai_dst_addr = addr;
++              rai->ai_dst_len = ai->ai_addrlen;
++              rai->ai_dst_canonname = canonname;
++      }
++
++      return 0;
++}
++
++int rdma_getaddrinfo(char *node, char *service,
++                                       struct rdma_addrinfo *hints,
++                                       struct rdma_addrinfo **res)
++{
++      struct rdma_addrinfo *rai;
++      struct addrinfo ai_hints;
++      struct addrinfo *ai;
++      int ret;
++
++      if (hints)
++              ucma_convert_to_ai(&ai_hints, hints);
++
++      ret = getaddrinfo(node, service, &ai_hints, &ai);
++      if (ret)
++              return ret;
++
++      rai = malloc(sizeof(*rai));
++      if (!rai) {
++              ret = rdma_seterrno(ENOMEM);
++              goto err1;
++      }
++
++      ret = ucma_convert_to_rai(rai, ai);
++      if (ret)
++              goto err2;
++
++      if (!rai->ai_src_len && hints && hints->ai_src_len) {
++              rai->ai_src_addr = calloc(1, hints->ai_src_len);
++              if (!rai->ai_src_addr) {
++                      ret = rdma_seterrno(ENOMEM);
++                      goto err2;
++              }
++              memcpy(rai->ai_src_addr, hints->ai_src_addr,
++                     hints->ai_src_len);
++              rai->ai_src_len = hints->ai_src_len;
++      }
++
++      // requires ib acm support --
++      //if (!(rai->ai_flags & RAI_PASSIVE))
++      //      ucma_ib_resolve(rai);
++
++      freeaddrinfo(ai);
++      *res = rai;
++      return 0;
++
++err2:
++      rdma_freeaddrinfo(rai);
++err1:
++      freeaddrinfo(ai);
++      return ret;
++}
++
++void rdma_freeaddrinfo(struct rdma_addrinfo *res)
++{
++      struct rdma_addrinfo *rai;
++
++      while (res) {
++              rai = res;
++              res = res->ai_next;
++
++              if (rai->ai_connect)
++                      free(rai->ai_connect);
++
++              if (rai->ai_route)
++                      free(rai->ai_route);
++
++              if (rai->ai_src_canonname)
++                      free(rai->ai_src_canonname);
++
++              if (rai->ai_dst_canonname)
++                      free(rai->ai_dst_canonname);
++
++              if (rai->ai_src_addr)
++                      free(rai->ai_src_addr);
++
++              if (rai->ai_dst_addr)
++                      free(rai->ai_dst_addr);
++
++              free(rai);
++      }
++}
 diff --git a/trunk/ulp/librdmacm/src/cma_exports.src b/trunk/ulp/librdmacm/src/cma_exports.src
-index a8fe8f3..c7107d4 100644
+index a8fe8f3..8f370be 100644
 --- a/trunk/ulp/librdmacm/src/cma_exports.src
 +++ b/trunk/ulp/librdmacm/src/cma_exports.src
-@@ -30,5 +30,6 @@ rdma_free_devices
+@@ -30,5 +30,7 @@ rdma_free_devices
  rdma_event_str\r
  rdma_set_option\r
  rdma_migrate_id\r
 +rdma_getaddrinfo\r
++rdma_freeaddrinfo\r
  rdmaw_wsa_errno\r
  #endif
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 9e8049b..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-Bottom: 79bdd0398365f7f202d9a70815bfd17bcf84cb0b
-Top:    5c341df87e859ab6d6dbc28cd60d6f6528b8e5e0
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2010-08-16 10:18:01 -0700
-
-Refresh of gai
-
----
-
-diff --git a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
-index 3120cab..2ef2868 100644
---- a/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
-+++ b/trunk/ulp/librdmacm/include/rdma/rdma_cma.h
-@@ -666,6 +666,8 @@ int rdma_getaddrinfo(char *node, char *service,
-                                        struct rdma_addrinfo *hints,\r
-                                        struct rdma_addrinfo **res);\r
\r
-+void rdma_freeaddrinfo(struct rdma_addrinfo *res);\r
-+\r
- __declspec(dllexport)\r
- int rdmaw_wsa_errno(int wsa_err);\r
\r
-diff --git a/trunk/ulp/librdmacm/src/addrinfo.c b/trunk/ulp/librdmacm/src/addrinfo.c
-new file mode 100644
-index 0000000..8e929ed
---- /dev/null
-+++ b/trunk/ulp/librdmacm/src/addrinfo.c
-@@ -0,0 +1,211 @@
-+/*
-+ * Copyright (c) 2010 Intel Corporation.  All rights reserved.
-+ *
-+ * This software is available to you under a choice of one of two
-+ * licenses.  You may choose to be licensed under the terms of the GNU
-+ * General Public License (GPL) Version 2, available from the file
-+ * COPYING in the main directory of this source tree, or the
-+ * OpenIB.org BSD license below:
-+ *
-+ *     Redistribution and use in source and binary forms, with or
-+ *     without modification, are permitted provided that the following
-+ *     conditions are met:
-+ *
-+ *      - Redistributions of source code must retain the above
-+ *        copyright notice, this list of conditions and the following
-+ *        disclaimer.
-+ *
-+ *      - Redistributions in binary form must reproduce the above
-+ *        copyright notice, this list of conditions and the following
-+ *        disclaimer in the documentation and/or other materials
-+ *        provided with the distribution.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+#if HAVE_CONFIG_H
-+#  include <config.h>
-+#endif /* HAVE_CONFIG_H */
-+
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netdb.h>
-+#include <unistd.h>
-+
-+#include "cma.h"
-+#include <rdma/rdma_cma.h>
-+#include <rdma/rdma_verbs.h>
-+
-+static void ucma_convert_to_ai(struct addrinfo *ai, struct rdma_addrinfo *rai)
-+{
-+      memset(ai, 0, sizeof *ai);
-+      ai->ai_flags = rai->ai_flags;
-+      ai->ai_family = rai->ai_family;
-+
-+      switch (rai->ai_qp_type) {
-+      case IBV_QPT_RC:
-+              ai->ai_socktype = SOCK_STREAM;
-+              break;
-+      case IBV_QPT_UD:
-+              ai->ai_socktype = SOCK_DGRAM;
-+              break;
-+      }
-+
-+      switch (rai->ai_port_space) {
-+      case RDMA_PS_TCP:
-+              ai->ai_protocol = IPPROTO_TCP;
-+              break;
-+      case RDMA_PS_IPOIB:
-+      case RDMA_PS_UDP:
-+              ai->ai_protocol = IPPROTO_UDP;
-+              break;
-+      }
-+
-+      if (rai->ai_flags & RAI_PASSIVE) {
-+              ai->ai_addrlen = rai->ai_src_len;
-+              ai->ai_addr = rai->ai_src_addr;
-+      } else {
-+              ai->ai_addrlen = rai->ai_dst_len;
-+              ai->ai_addr = rai->ai_dst_addr;
-+      }
-+      ai->ai_canonname = rai->ai_dst_canonname;
-+      ai->ai_next = NULL;
-+}
-+
-+static int ucma_convert_to_rai(struct rdma_addrinfo *rai, struct addrinfo *ai)
-+{
-+      struct sockaddr *addr;
-+      char *canonname;
-+
-+      memset(rai, 0, sizeof *rai);
-+      rai->ai_flags = ai->ai_flags;
-+      rai->ai_family = ai->ai_family;
-+
-+      switch (ai->ai_socktype) {
-+      case SOCK_STREAM:
-+              rai->ai_qp_type = IBV_QPT_RC;
-+              break;
-+      case SOCK_DGRAM:
-+              rai->ai_qp_type = IBV_QPT_UD;
-+              break;
-+      }
-+
-+      switch (ai->ai_protocol) {
-+      case IPPROTO_TCP:
-+              rai->ai_port_space = RDMA_PS_TCP;
-+              break;
-+      case IPPROTO_UDP:
-+              rai->ai_port_space = RDMA_PS_UDP;
-+              break;
-+      }
-+
-+      addr = malloc(ai->ai_addrlen);
-+      if (!addr)
-+              return rdma_seterrno(ENOMEM);
-+
-+      canonname = ai->ai_canonname ? malloc(strlen(ai->ai_canonname) + 1) : NULL;
-+      if (canonname)
-+              strcpy(canonname, ai->ai_canonname);
-+
-+      memcpy(addr, ai->ai_addr, ai->ai_addrlen);
-+      if (ai->ai_flags & RAI_PASSIVE) {
-+              rai->ai_src_addr = addr;
-+              rai->ai_src_len = ai->ai_addrlen;
-+              rai->ai_src_canonname = canonname;
-+      } else {
-+              rai->ai_dst_addr = addr;
-+              rai->ai_dst_len = ai->ai_addrlen;
-+              rai->ai_dst_canonname = canonname;
-+      }
-+
-+      return 0;
-+}
-+
-+int rdma_getaddrinfo(char *node, char *service,
-+                                       struct rdma_addrinfo *hints,
-+                                       struct rdma_addrinfo **res)
-+{
-+      struct rdma_addrinfo *rai;
-+      struct addrinfo ai_hints;
-+      struct addrinfo *ai;
-+      int ret;
-+
-+      if (hints)
-+              ucma_convert_to_ai(&ai_hints, hints);
-+
-+      ret = getaddrinfo(node, service, &ai_hints, &ai);
-+      if (ret)
-+              return ret;
-+
-+      rai = malloc(sizeof(*rai));
-+      if (!rai) {
-+              ret = rdma_seterrno(ENOMEM);
-+              goto err1;
-+      }
-+
-+      ret = ucma_convert_to_rai(rai, ai);
-+      if (ret)
-+              goto err2;
-+
-+      if (!rai->ai_src_len && hints && hints->ai_src_len) {
-+              rai->ai_src_addr = calloc(1, hints->ai_src_len);
-+              if (!rai->ai_src_addr) {
-+                      ret = rdma_seterrno(ENOMEM);
-+                      goto err2;
-+              }
-+              memcpy(rai->ai_src_addr, hints->ai_src_addr,
-+                     hints->ai_src_len);
-+              rai->ai_src_len = hints->ai_src_len;
-+      }
-+
-+      // requires ib acm support --
-+      //if (!(rai->ai_flags & RAI_PASSIVE))
-+      //      ucma_ib_resolve(rai);
-+
-+      freeaddrinfo(ai);
-+      *res = rai;
-+      return 0;
-+
-+err2:
-+      rdma_freeaddrinfo(rai);
-+err1:
-+      freeaddrinfo(ai);
-+      return ret;
-+}
-+
-+void rdma_freeaddrinfo(struct rdma_addrinfo *res)
-+{
-+      struct rdma_addrinfo *rai;
-+
-+      while (res) {
-+              rai = res;
-+              res = res->ai_next;
-+
-+              if (rai->ai_connect)
-+                      free(rai->ai_connect);
-+
-+              if (rai->ai_route)
-+                      free(rai->ai_route);
-+
-+              if (rai->ai_src_canonname)
-+                      free(rai->ai_src_canonname);
-+
-+              if (rai->ai_dst_canonname)
-+                      free(rai->ai_dst_canonname);
-+
-+              if (rai->ai_src_addr)
-+                      free(rai->ai_src_addr);
-+
-+              if (rai->ai_dst_addr)
-+                      free(rai->ai_dst_addr);
-+
-+              free(rai);
-+      }
-+}
-diff --git a/trunk/ulp/librdmacm/src/cma_exports.src b/trunk/ulp/librdmacm/src/cma_exports.src
-index c7107d4..8f370be 100644
---- a/trunk/ulp/librdmacm/src/cma_exports.src
-+++ b/trunk/ulp/librdmacm/src/cma_exports.src
-@@ -31,5 +31,6 @@ rdma_event_str
- rdma_set_option\r
- rdma_migrate_id\r
- rdma_getaddrinfo\r
-+rdma_freeaddrinfo\r
- rdmaw_wsa_errno\r
- #endif