From 1b9d90850f07bdc9a257dc38ecc2479dd33fa761 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 17 Dec 2010 10:25:55 -0800 Subject: [PATCH] refresh --- meta | 7 ++-- patches/acme_gid | 74 ++++++++++++++++++++++++++++++++++++++-- patches/refresh-temp | 80 -------------------------------------------- 3 files changed, 75 insertions(+), 86 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index d6cc378..cb5ff19 100644 --- a/meta +++ b/meta @@ -1,10 +1,9 @@ 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: diff --git a/patches/acme_gid b/patches/acme_gid index 1e8c8c2..f573bba 100644 --- a/patches/acme_gid +++ b/patches/acme_gid @@ -1,5 +1,5 @@ Bottom: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e -Top: 9cfb1ddbdd89bfe7a45eb80019ef27af2267dd2e +Top: 1ab5f7833d1baaba821d175e19964a67ad69afe5 Author: Sean Hefty Date: 2010-12-17 10:20:05 -0800 @@ -12,4 +12,74 @@ Signed-off-by: Sean Hefty --- - +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); diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index 1d87b42..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,80 +0,0 @@ -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); -- 2.46.0