]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Thu, 19 Jul 2012 21:19:28 +0000 (14:19 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 19 Jul 2012 21:19:28 +0000 (14:19 -0700)
meta
patches/cma-rm-pd
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index e106070e0443f6a6a2a506eef035d6c1932f7a48..9d4c940635cf4f7bb7a7333e167e6d420994652d 100644 (file)
--- a/meta
+++ b/meta
@@ -1,10 +1,9 @@
 Version: 1
-Previous: 219d8c12669b4d4f34b8e62f57df2909a91f922e
-Head: 30ca433ea9422e4ed89726b35029369dda64dbc3
+Previous: efadc9c2f3c82725536e71036aa1636b32f3453a
+Head: a13fd8c5744c3f8eb80150654e2c34e50a5f04aa
 Applied:
   rm-ib-var: 63a728f303f78348ad9727c46ac3e271197dace4
-  cma-rm-pd: 05f424a751356396f7546c73b8d2881109958008
-  refresh-temp: 30ca433ea9422e4ed89726b35029369dda64dbc3
+  cma-rm-pd: a13fd8c5744c3f8eb80150654e2c34e50a5f04aa
 Unapplied:
   transpose: 84e0beee0d2d3c217cd9703b9e438d25856cacb6
   fork: 0744fbe2b19f7924faf0dce72349307cc445577e
index 0a40e790591cd917053227f227bc1a643159a292..e3471f1dde10fe6ca22b568afc21d291bc62b122 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: 7683fa697371afc1116e378e4f1b6c848ead85aa
-Top:    8be788d836cc93c7da4ef5d9221d97c9784be146
+Top:    31c0cf47f562afc290796ba3e9791f672a7d5d8b
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2012-07-19 10:09:48 -0700
 
@@ -19,7 +19,7 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 ---
 
 diff --git a/src/cma.c b/src/cma.c
-index bad8bce..a190dee 100755
+index bad8bce..e2772fa 100755
 --- a/src/cma.c
 +++ b/src/cma.c
 @@ -76,6 +76,7 @@ struct cma_device {
@@ -38,11 +38,7 @@ index bad8bce..a190dee 100755
  
  #define container_of(ptr, type, field) \
        ((type *) ((void *)ptr - offsetof(type, field)))
-@@ -129,10 +131,12 @@ int af_ib_support;
- static void ucma_cleanup(void)
- {
-       ucma_ib_cleanup();
-+      ucma_release_verbs();
+@@ -132,7 +134,8 @@ static void ucma_cleanup(void)
  
        if (cma_dev_cnt) {
                while (cma_dev_cnt--) {
@@ -52,7 +48,7 @@ index bad8bce..a190dee 100755
                        ibv_close_device(cma_dev_array[cma_dev_cnt].verbs);
                }
  
-@@ -235,7 +239,7 @@ int ucma_init(void)
+@@ -235,7 +238,7 @@ int ucma_init(void)
                goto err2;
        }
                
@@ -61,7 +57,7 @@ index bad8bce..a190dee 100755
        if (!cma_dev_array) {
                ret = ERR(ENOMEM);
                goto err2;
-@@ -252,13 +256,6 @@ int ucma_init(void)
+@@ -252,13 +255,6 @@ int ucma_init(void)
                        goto err3;
                }
  
@@ -75,7 +71,7 @@ index bad8bce..a190dee 100755
                i++;
                ret = ibv_query_device(cma_dev->verbs, &attr);
                if (ret) {
-@@ -280,10 +277,8 @@ int ucma_init(void)
+@@ -280,10 +276,8 @@ int ucma_init(void)
        return 0;
  
  err3:
@@ -87,7 +83,12 @@ index bad8bce..a190dee 100755
        free(cma_dev_array);
  err2:
        ibv_free_device_list(dev_list);
-@@ -358,15 +353,34 @@ static int ucma_get_device(struct cma_id_private *id_priv, uint64_t guid)
+@@ -354,23 +348,45 @@ void rdma_destroy_event_channel(struct rdma_event_channel *channel)
+ static int ucma_get_device(struct cma_id_private *id_priv, uint64_t guid)
+ {
+       struct cma_device *cma_dev;
+-      int i;
++      int i, ret = 0;
  
        for (i = 0; i < cma_dev_cnt; i++) {
                cma_dev = &cma_dev_array[i];
@@ -108,15 +109,16 @@ index bad8bce..a190dee 100755
 +              cma_dev->pd = ibv_alloc_pd(cma_dev_array[i].verbs);
 +              if (!cma_dev->pd) {
 +                      cma_dev->refcnt--;
-+                      pthread_mutex_unlock(&mut);
-+                      return ERR(ENOMEM);
++                      ret = ERR(ENOMEM);
++                      goto out;
 +              }
 +      }
-+      pthread_mutex_unlock(&mut);
 +      id_priv->cma_dev = cma_dev;
 +      id_priv->id.verbs = cma_dev->verbs;
 +      id_priv->id.pd = cma_dev->pd;
-+      return 0;
++out:
++      pthread_mutex_unlock(&mut);
++      return ret;
 +}
 +
 +static void ucma_put_device(struct cma_device *cma_dev)
@@ -128,3 +130,9 @@ index bad8bce..a190dee 100755
  }
  
  static void ucma_free_id(struct cma_id_private *id_priv)
+ {
++      if (id_priv->cma_dev)
++              ucma_put_device(id_priv->cma_dev);
+       pthread_cond_destroy(&id_priv->cond);
+       pthread_mutex_destroy(&id_priv->mut);
+       if (id_priv->id.route.path_rec)
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index ceb5d96..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-Bottom: 8be788d836cc93c7da4ef5d9221d97c9784be146
-Top:    31c0cf47f562afc290796ba3e9791f672a7d5d8b
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2012-07-19 14:19:28 -0700
-
-Refresh of cma-rm-pd
-
----
-
-diff --git a/src/cma.c b/src/cma.c
-index a190dee..e2772fa 100755
---- a/src/cma.c
-+++ b/src/cma.c
-@@ -131,7 +131,6 @@ static int verbs_refcnt;
- static void ucma_cleanup(void)
- {
-       ucma_ib_cleanup();
--      ucma_release_verbs();
-       if (cma_dev_cnt) {
-               while (cma_dev_cnt--) {
-@@ -349,7 +348,7 @@ void rdma_destroy_event_channel(struct rdma_event_channel *channel)
- static int ucma_get_device(struct cma_id_private *id_priv, uint64_t guid)
- {
-       struct cma_device *cma_dev;
--      int i;
-+      int i, ret = 0;
-       for (i = 0; i < cma_dev_cnt; i++) {
-               cma_dev = &cma_dev_array[i];
-@@ -364,15 +363,16 @@ match:
-               cma_dev->pd = ibv_alloc_pd(cma_dev_array[i].verbs);
-               if (!cma_dev->pd) {
-                       cma_dev->refcnt--;
--                      pthread_mutex_unlock(&mut);
--                      return ERR(ENOMEM);
-+                      ret = ERR(ENOMEM);
-+                      goto out;
-               }
-       }
--      pthread_mutex_unlock(&mut);
-       id_priv->cma_dev = cma_dev;
-       id_priv->id.verbs = cma_dev->verbs;
-       id_priv->id.pd = cma_dev->pd;
--      return 0;
-+out:
-+      pthread_mutex_unlock(&mut);
-+      return ret;
- }
- static void ucma_put_device(struct cma_device *cma_dev)
-@@ -385,6 +385,8 @@ static void ucma_put_device(struct cma_device *cma_dev)
- static void ucma_free_id(struct cma_id_private *id_priv)
- {
-+      if (id_priv->cma_dev)
-+              ucma_put_device(id_priv->cma_dev);
-       pthread_cond_destroy(&id_priv->cond);
-       pthread_mutex_destroy(&id_priv->mut);
-       if (id_priv->id.route.path_rec)