]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
commit
authorSean Hefty <sean.hefty@intel.com>
Fri, 14 Jan 2011 16:47:33 +0000 (08:47 -0800)
committerSean Hefty <sean.hefty@intel.com>
Fri, 14 Jan 2011 16:47:33 +0000 (08:47 -0800)
meta
patches/acme_gid [deleted file]

diff --git a/meta b/meta
index 9fc44c13feb0a7bbe497bd0611d2d81fc52bf6ba..c0fbe7172ad77e7b74b00d7552b39a442e87b36d 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,7 @@
 Version: 1
-Previous: be3c10bb5263d34dfc4df62103aed6d3544a48b9
+Previous: 933e16341ee3e823418debbc534666b738eb44de
 Head: 3b1f7191c890140c64eb9972876b4e56955a65ca
 Applied:
-  acme_gid: 69a4139e95401a3100a2c363675fdd6d96a60d54
   range: 1a80d1d2efa888ad294bac3e681f744555d4e816
   format_lid: 3d001d786a9894e9a7e86932685e7c43568484b5
   query_path: 3b1f7191c890140c64eb9972876b4e56955a65ca
diff --git a/patches/acme_gid b/patches/acme_gid
deleted file mode 100644 (file)
index f573bba..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-Bottom: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e
-Top:    1ab5f7833d1baaba821d175e19964a67ad69afe5
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2010-12-17 10:20:05 -0800
-
-ib_acme: support querying by gids
-
-Allow the user to specify gids when querying path data.
-
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/man/ib_acme.1 b/man/ib_acme.1
-index e5256a0..9e44822 100644
---- a/man/ib_acme.1
-+++ b/man/ib_acme.1
-@@ -18,9 +18,8 @@ create address and configuration files for the ib_acm service.
- .TP\r
- \-f addr_format\r
- Specifies the format of the src_addr and dest_addr parameters.  Valid\r
--address formats are: 'i', 'n', 'p', and 'u', which indicate that the src_addr\r
--and dest_addr parameters are ip addresses, system network names, LIDs,\r
--or the format is unspecified, respectively.  If the -f option is omitted,\r
-+address formats are: 'i' ip address, 'n' host name, 'l' lid, 'g' gid,\r
-+and 'u' unspecified.  If the -f option is omitted,\r
- an unspecified address format is assumed.  ib_acme will use getaddrinfo or\r
- other mechanisms to determine which format the address uses.\r
- .TP\r
-diff --git a/src/acme.c b/src/acme.c
-index dd645c1..d42ba81 100644
---- a/src/acme.c
-+++ b/src/acme.c
-@@ -67,7 +67,7 @@ extern char **parse(char *args, int *count);
- static void show_usage(char *program)
- {
-       printf("usage 1: %s\n", program);
--      printf("   [-f addr_format] - i(p), n(ame), l(id), or u(nspecified)\n");
-+      printf("   [-f addr_format] - i(p), n(ame), l(id), g(gid), or u(nspecified)\n");
-       printf("                      default: 'u'\n");
-       printf("   [-s src_addr]    - format defined by -f option\n");
-       printf("   [-d] dest_addr   - format defined by -f option\n");
-@@ -500,6 +500,30 @@ static int resolve_lid(struct ibv_path_record *path)
-       return ret;
- }
-+static int resolve_gid(struct ibv_path_record *path)
-+{
-+      int ret;
-+
-+      ret = inet_pton(AF_INET6, src_addr, &path->sgid);
-+      if (ret <= 0) {
-+              printf("inet_pton error on source address (%s): 0x%x\n", src_addr, ret);
-+              return ret;
-+      }
-+
-+      ret = inet_pton(AF_INET6, dest_addr, &path->dgid);
-+      if (ret <= 0) {
-+              printf("inet_pton error on dest address (%s): 0x%x\n", dest_addr, ret);
-+              return ret;
-+      }
-+
-+      path->reversible_numpath = IBV_PATH_RECORD_REVERSIBLE | 1;
-+      ret = ib_acm_resolve_path(path, get_resolve_flags());
-+      if (ret)
-+              printf("ib_acm_resolve_path failed: %s\n", strerror(errno));
-+
-+      return ret;
-+}
-+
- static int verify_resolve(struct ibv_path_record *path)
- {
-       int ret;
-@@ -589,6 +613,10 @@ static int resolve(char *program, char *dest_arg)
-                       memset(&path, 0, sizeof path);
-                       ret = resolve_lid(&path);
-                       break;
-+              case 'g':
-+                      memset(&path, 0, sizeof path);
-+                      ret = resolve_gid(&path);
-+                      break;
-               default:
-                       show_usage(program);
-                       exit(1);