Version: 1
-Previous: 62b7031cd247eff13387b1b6a8e371459706fd17
-Head: 2cbd2e5fc9825b1a28a14fc3a3c1a3675235a0d1
+Previous: 2ba73131243a361f6f973ca0001d1e9ddd6cc7ec
+Head: 160551b2a4bed277f4c81b52ef33a184f43ca783
Applied:
lmc: b355854c79a1e446e87684a41663ad5aae258b73
lid: 1c005908ee6c257f6fa290df8ce8a45e968d07ab
- acme_gid: fdde245c413bb692b8d6bf3f4e86922e6d20ae24
- refresh-temp: 2cbd2e5fc9825b1a28a14fc3a3c1a3675235a0d1
+ acme_gid: 160551b2a4bed277f4c81b52ef33a184f43ca783
Unapplied:
Hidden:
Bottom: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e
-Top: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e
+Top: 1ab5f7833d1baaba821d175e19964a67ad69afe5
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2010-12-17 10:20:05 -0800
---
-
+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);
+++ /dev/null
-Bottom: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e
-Top: 1ab5f7833d1baaba821d175e19964a67ad69afe5
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2010-12-17 10:25:55 -0800
-
-Refresh of acme_gid
-
----
-
-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);