From: Sean Hefty Date: Fri, 17 Dec 2010 18:25:55 +0000 (-0800) Subject: refresh (create temporary patch) X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=de6b16495e17671d4c4310ec1f7e9586bea86737;p=~shefty%2Fibacm.git refresh (create temporary patch) --- diff --git a/meta b/meta index bff4c07..d6cc378 100644 --- a/meta +++ b/meta @@ -1,9 +1,10 @@ Version: 1 -Previous: 2de643921c1b755ec391485d82de58ec659974d0 -Head: fdde245c413bb692b8d6bf3f4e86922e6d20ae24 +Previous: 62b7031cd247eff13387b1b6a8e371459706fd17 +Head: 2cbd2e5fc9825b1a28a14fc3a3c1a3675235a0d1 Applied: lmc: b355854c79a1e446e87684a41663ad5aae258b73 lid: 1c005908ee6c257f6fa290df8ce8a45e968d07ab acme_gid: fdde245c413bb692b8d6bf3f4e86922e6d20ae24 + refresh-temp: 2cbd2e5fc9825b1a28a14fc3a3c1a3675235a0d1 Unapplied: Hidden: diff --git a/patches/refresh-temp b/patches/refresh-temp new file mode 100644 index 0000000..1d87b42 --- /dev/null +++ b/patches/refresh-temp @@ -0,0 +1,80 @@ +Bottom: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e +Top: 1ab5f7833d1baaba821d175e19964a67ad69afe5 +Author: Sean Hefty +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 + \-f addr_format + Specifies the format of the src_addr and dest_addr parameters. Valid +-address formats are: 'i', 'n', 'p', and 'u', which indicate that the src_addr +-and dest_addr parameters are ip addresses, system network names, LIDs, +-or the format is unspecified, respectively. If the -f option is omitted, ++address formats are: 'i' ip address, 'n' host name, 'l' lid, 'g' gid, ++and 'u' unspecified. If the -f option is omitted, + an unspecified address format is assumed. ib_acme will use getaddrinfo or + other mechanisms to determine which format the address uses. + .TP +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);