]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Tue, 7 Dec 2010 16:28:38 +0000 (08:28 -0800)
committerSean Hefty <sean.hefty@intel.com>
Tue, 7 Dec 2010 16:28:38 +0000 (08:28 -0800)
meta
patches/refresh-temp [deleted file]
patches/show_err

diff --git a/meta b/meta
index ab55a37f44c1eba42a7554b5e8f535e9a91eef9d..a9d7872205845943bbc6687eccacb92f8c06194b 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: 8f6f257ccdcf3ef8b5525e6a5fe8a361772a91c0
-Head: 6cad517022926e04a9c57d283bd716aacd513bd5
+Previous: 855c46ceb24c627b1ef71969cddce949358be54d
+Head: aadb98a10bf5192f36dba186eefb696794864ad6
 Applied:
   logging: 549692c49922dce3911d97dcc6d0a2fc583ab5f7
   acm_snoop: dd5542fbaa1c5a92367d0552ef3525d5ea0a4638
@@ -15,8 +15,7 @@ Applied:
   log_port: 92f81cd1f299db9d83aa21d794cfdfc4c4b5794f
   nodelay: 3dc208def66463660ee185a0346722561e7c2448
   acme_dest: f5cc9c1794700bda0a62967250a00ea9bae5839e
-  show_err: ce37df57a1812168a086d23f985a22cf350f2185
-  refresh-temp: 6cad517022926e04a9c57d283bd716aacd513bd5
+  show_err: aadb98a10bf5192f36dba186eefb696794864ad6
 Unapplied:
   acme_verbose: 45cba0846874c93ef7af156bf0afe59f43d82ea6
   1.0.4: 9f452b8e59adb21b90fbdda980d25a54d4360d37
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 68d5e2a..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-Bottom: f141944c9884ee22acc7dfcfeed6b44674772b46
-Top:    c2470ba843932ecae54968d05db5285e1b09bb91
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2010-12-07 08:28:37 -0800
-
-Refresh of show_err
-
----
-
-diff --git a/src/acme.c b/src/acme.c
-index a75ef34..7e1ca5e 100644
---- a/src/acme.c
-+++ b/src/acme.c
-@@ -459,7 +459,7 @@ static int resolve_ip(struct ibv_path_record *path)
-       ret = ib_acm_resolve_ip(saddr, (struct sockaddr *) &dest,
-               &paths, &count, get_resolve_flags());
-       if (ret) {
--              printf("ib_acm_resolve_ip failed: 0x%x\n", ret);
-+              printf("ib_acm_resolve_ip failed: %s\n", strerror(errno));
-               return ret;
-       }
-@@ -475,7 +475,7 @@ static int resolve_name(struct ibv_path_record *path)
-       ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count, get_resolve_flags());
-       if (ret) {
--              printf("ib_acm_resolve_name failed: 0x%x\n", ret);
-+              printf("ib_acm_resolve_name failed: %s\n", strerror(errno));
-               return ret;
-       }
-@@ -494,7 +494,7 @@ static int resolve_lid(struct ibv_path_record *path)
-       ret = ib_acm_resolve_path(path, 0);
-       if (ret)
--              printf("ib_acm_resolve_path failed: 0x%x\n", ret);
-+              printf("ib_acm_resolve_path failed: %s\n", strerror(errno));
-       return ret;
- }
-@@ -505,7 +505,7 @@ static int verify_resolve(struct ibv_path_record *path)
-       ret = ib_acm_resolve_path(path, ACM_FLAGS_QUERY_SA);
-       if (ret)
--              printf("SA verification: failed 0x%x\n", ret);
-+              printf("SA verification: failed %s\n", strerror(errno));
-       else
-               printf("SA verification: success\n");
-diff --git a/src/libacm.c b/src/libacm.c
-index d32e749..57036bc 100644
---- a/src/libacm.c
-+++ b/src/libacm.c
-@@ -35,6 +35,7 @@
- #include "libacm.h"
- #include <infiniband/acm.h>
- #include <stdio.h>
-+#include <errno.h>
- struct acm_port
- {
-@@ -182,6 +183,38 @@ static int acm_format_ep_addr(struct acm_ep_addr_data *data, uint8_t *addr,
-       return 0;
- }
-+
-+static inline int ERR(int err)
-+{
-+      errno = err;
-+      return -1;
-+}
-+
-+static int acm_error(uint8_t status)
-+{
-+      switch (status) {
-+      case ACM_STATUS_SUCCESS:
-+              return 0;
-+      case ACM_STATUS_ENOMEM:
-+              return ERR(ENOMEM);
-+      case ACM_STATUS_EINVAL:
-+              return ERR(EINVAL);
-+      case ACM_STATUS_ENODATA:
-+              return ERR(ENODATA);
-+      case ACM_STATUS_ENOTCONN:
-+              return ERR(ENOTCONN);
-+      case ACM_STATUS_ETIMEDOUT:
-+              return ERR(ETIMEDOUT);
-+      case ACM_STATUS_ESRCADDR:
-+      case ACM_STATUS_EDESTADDR:
-+              return ERR(EADDRNOTAVAIL);
-+      case ACM_STATUS_ESRCTYPE:
-+      case ACM_STATUS_EDESTTYPE:
-+      default:
-+              return ERR(EINVAL);
-+      }
-+}
-+
- static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-       struct ibv_path_data **paths, int *count, uint32_t flags)
- {
-@@ -217,7 +250,7 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-               goto out;
-       if (msg.hdr.status) {
--              ret = msg.hdr.status;
-+              ret = acm_error(msg.hdr.status);
-               goto out;
-       }
-@@ -271,7 +304,7 @@ int ib_acm_resolve_path(struct ibv_path_record *path, uint32_t flags)
-       if (ret < ACM_MSG_HDR_LENGTH || ret != msg.hdr.length)
-               goto out;
--      ret = msg.hdr.status;
-+      ret = acm_error(msg.hdr.status);
-       if (!ret)
-               *path = data->info.path;
index 95751ccab0baf4a2cd440694a02433cb49e60163..6695649aa93cbfe85c8fef0f927d67c86c9f1c32 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: f141944c9884ee22acc7dfcfeed6b44674772b46
-Top:    f141944c9884ee22acc7dfcfeed6b44674772b46
+Top:    c2470ba843932ecae54968d05db5285e1b09bb91
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-12-07 07:58:54 -0800
 
@@ -13,4 +13,111 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 ---
 
-
+diff --git a/src/acme.c b/src/acme.c
+index a75ef34..7e1ca5e 100644
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -459,7 +459,7 @@ static int resolve_ip(struct ibv_path_record *path)
+       ret = ib_acm_resolve_ip(saddr, (struct sockaddr *) &dest,
+               &paths, &count, get_resolve_flags());
+       if (ret) {
+-              printf("ib_acm_resolve_ip failed: 0x%x\n", ret);
++              printf("ib_acm_resolve_ip failed: %s\n", strerror(errno));
+               return ret;
+       }
+@@ -475,7 +475,7 @@ static int resolve_name(struct ibv_path_record *path)
+       ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count, get_resolve_flags());
+       if (ret) {
+-              printf("ib_acm_resolve_name failed: 0x%x\n", ret);
++              printf("ib_acm_resolve_name failed: %s\n", strerror(errno));
+               return ret;
+       }
+@@ -494,7 +494,7 @@ static int resolve_lid(struct ibv_path_record *path)
+       ret = ib_acm_resolve_path(path, 0);
+       if (ret)
+-              printf("ib_acm_resolve_path failed: 0x%x\n", ret);
++              printf("ib_acm_resolve_path failed: %s\n", strerror(errno));
+       return ret;
+ }
+@@ -505,7 +505,7 @@ static int verify_resolve(struct ibv_path_record *path)
+       ret = ib_acm_resolve_path(path, ACM_FLAGS_QUERY_SA);
+       if (ret)
+-              printf("SA verification: failed 0x%x\n", ret);
++              printf("SA verification: failed %s\n", strerror(errno));
+       else
+               printf("SA verification: success\n");
+diff --git a/src/libacm.c b/src/libacm.c
+index d32e749..57036bc 100644
+--- a/src/libacm.c
++++ b/src/libacm.c
+@@ -35,6 +35,7 @@
+ #include "libacm.h"
+ #include <infiniband/acm.h>
+ #include <stdio.h>
++#include <errno.h>
+ struct acm_port
+ {
+@@ -182,6 +183,38 @@ static int acm_format_ep_addr(struct acm_ep_addr_data *data, uint8_t *addr,
+       return 0;
+ }
++
++static inline int ERR(int err)
++{
++      errno = err;
++      return -1;
++}
++
++static int acm_error(uint8_t status)
++{
++      switch (status) {
++      case ACM_STATUS_SUCCESS:
++              return 0;
++      case ACM_STATUS_ENOMEM:
++              return ERR(ENOMEM);
++      case ACM_STATUS_EINVAL:
++              return ERR(EINVAL);
++      case ACM_STATUS_ENODATA:
++              return ERR(ENODATA);
++      case ACM_STATUS_ENOTCONN:
++              return ERR(ENOTCONN);
++      case ACM_STATUS_ETIMEDOUT:
++              return ERR(ETIMEDOUT);
++      case ACM_STATUS_ESRCADDR:
++      case ACM_STATUS_EDESTADDR:
++              return ERR(EADDRNOTAVAIL);
++      case ACM_STATUS_ESRCTYPE:
++      case ACM_STATUS_EDESTTYPE:
++      default:
++              return ERR(EINVAL);
++      }
++}
++
+ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
+       struct ibv_path_data **paths, int *count, uint32_t flags)
+ {
+@@ -217,7 +250,7 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
+               goto out;
+       if (msg.hdr.status) {
+-              ret = msg.hdr.status;
++              ret = acm_error(msg.hdr.status);
+               goto out;
+       }
+@@ -271,7 +304,7 @@ int ib_acm_resolve_path(struct ibv_path_record *path, uint32_t flags)
+       if (ret < ACM_MSG_HDR_LENGTH || ret != msg.hdr.length)
+               goto out;
+-      ret = msg.hdr.status;
++      ret = acm_error(msg.hdr.status);
+       if (!ret)
+               *path = data->info.path;