From 2fdd09de7326a2288dbdc40f4cfb79c4bc81af8d Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Thu, 20 Jan 2011 11:41:07 -0800 Subject: [PATCH] refresh --- meta | 7 ++-- patches/autoaddr | 79 +++++++++++++++++++++++++++++++++++++++++--- patches/refresh-temp | 79 -------------------------------------------- 3 files changed, 77 insertions(+), 88 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index 9098dab..0168249 100644 --- a/meta +++ b/meta @@ -1,9 +1,8 @@ Version: 1 -Previous: 71952b230410f100d10d8a59fce46dff0d0e8ead -Head: 47e56106d6eafcf5e9e73d01db58baebec2ee681 +Previous: 7b11c550bebd2eda13a5e5f3b269f402f6ec81bb +Head: f7b588cb0a484c2a15c5bd81ef101c815bd992ee Applied: - autoaddr: b1e91c10b2510cf1f75087e5c943651fcba8096b - refresh-temp: 47e56106d6eafcf5e9e73d01db58baebec2ee681 + autoaddr: f7b588cb0a484c2a15c5bd81ef101c815bd992ee Unapplied: async_mc: c51c6e84981821b2541daba97cee9a29cd1d3709 addr_size: 8de02c47fbf595132105a7050ad6f755f49f9a7a diff --git a/patches/autoaddr b/patches/autoaddr index 5047762..ad9a39b 100644 --- a/patches/autoaddr +++ b/patches/autoaddr @@ -1,17 +1,86 @@ Bottom: a8e8aa49b3591176bc809c876eb5943ae719ce0d -Top: a8e8aa49b3591176bc809c876eb5943ae719ce0d +Top: d65a2839777e9248477661e92509a1f24ef35537 Author: Sean Hefty Date: 2011-01-20 09:30:45 -0800 Define option to auto-generate addresses -Add an option to the acm_opts.cfg file to instruct the ib_acm -service to automatically generate the address list. This will -make it easier to support dynamic changes to system configuration. +Add an option that instructs the ib_acm service to automatically +generate the address configureation file. This will +make it easier to handle dynamic changes to system configuration. Signed-off-by: Sean Hefty --- - +diff --git a/man/ib_acm.1 b/man/ib_acm.1 +index acf6a1d..16d899d 100644 +--- a/man/ib_acm.1 ++++ b/man/ib_acm.1 +@@ -4,8 +4,25 @@ ib_acm \- address and route resolution services for InfiniBand. + .SH SYNOPSIS + .sp + .nf +-\fIib_acm\fR ++\fIib_acm\fR [-D] [-A addr_file] [-a] [-O option_file] + .fi ++.SH "OPTIONS" ++.TP ++\-D ++Runs the ib_acm service as a daemon. ++.TP ++\-A addr_file ++Specifies the address configuration file. The ib_acm service uses the ++contents of this file to assign addresses to local devices and ports. ++.TP ++\-a ++If specified, indicates that the ib_acm service should automatically ++generate the address configuration file and update it based on certain ++network events. ++.TP ++\-O option_file ++Specifies the option configuration file. The ib_acm service uses the ++contents of this file to override any default configuration options. + .SH "DESCRIPTION" + The IB ACM implements and provides a framework for name, + address, and route (path) resolution services over InfiniBand. +diff --git a/src/acm.c b/src/acm.c +index 1f3c470..0338e80 100644 +--- a/src/acm.c ++++ b/src/acm.c +@@ -209,6 +209,7 @@ PER_THREAD char log_data[ACM_MAX_ADDRESS]; + + static char *opts_file = "/etc/ibacm/acm_opts.cfg"; + static char *addr_file = "/etc/ibacm/acm_addr.cfg"; ++static int auto_addr = 0; + static char log_file[128] = "/var/log/ibacm.log"; + static int log_level = 0; + static char lock_file[128] = "/var/lock/ibacm.pid"; +@@ -2861,7 +2862,7 @@ static FILE *acm_open_addr_file(void) + { + FILE *f; + +- if ((f = fopen(addr_file, "r"))) ++ if (!auto_addr && (f = fopen(addr_file, "r"))) + return f; + + acm_log(0, "notice - generating acm_addr.cfg file\n"); +@@ -2920,6 +2921,7 @@ static void show_usage(char *program) + printf(" [-D] - run as a daemon\n"); + printf(" [-A addr_file] - address configuration file\n"); + printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_ADDR_FILE); ++ printf(" [-a] - automatically generate and update addresses\n"); + printf(" [-O option_file] - option configuration file\n"); + printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_OPTS_FILE); + } +@@ -2938,6 +2940,9 @@ int CDECL_FUNC main(int argc, char **argv) + case 'A': + addr_file = optarg; + break; ++ case 'a': ++ auto_addr = 1; ++ break; + case 'O': + opts_file = optarg; + break; diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index ee4961c..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,79 +0,0 @@ -Bottom: a8e8aa49b3591176bc809c876eb5943ae719ce0d -Top: d65a2839777e9248477661e92509a1f24ef35537 -Author: Sean Hefty -Date: 2011-01-20 11:32:27 -0800 - -Refresh of autoaddr - ---- - -diff --git a/man/ib_acm.1 b/man/ib_acm.1 -index acf6a1d..16d899d 100644 ---- a/man/ib_acm.1 -+++ b/man/ib_acm.1 -@@ -4,8 +4,25 @@ ib_acm \- address and route resolution services for InfiniBand. - .SH SYNOPSIS - .sp - .nf --\fIib_acm\fR -+\fIib_acm\fR [-D] [-A addr_file] [-a] [-O option_file] - .fi -+.SH "OPTIONS" -+.TP -+\-D -+Runs the ib_acm service as a daemon. -+.TP -+\-A addr_file -+Specifies the address configuration file. The ib_acm service uses the -+contents of this file to assign addresses to local devices and ports. -+.TP -+\-a -+If specified, indicates that the ib_acm service should automatically -+generate the address configuration file and update it based on certain -+network events. -+.TP -+\-O option_file -+Specifies the option configuration file. The ib_acm service uses the -+contents of this file to override any default configuration options. - .SH "DESCRIPTION" - The IB ACM implements and provides a framework for name, - address, and route (path) resolution services over InfiniBand. -diff --git a/src/acm.c b/src/acm.c -index 1f3c470..0338e80 100644 ---- a/src/acm.c -+++ b/src/acm.c -@@ -209,6 +209,7 @@ PER_THREAD char log_data[ACM_MAX_ADDRESS]; - - static char *opts_file = "/etc/ibacm/acm_opts.cfg"; - static char *addr_file = "/etc/ibacm/acm_addr.cfg"; -+static int auto_addr = 0; - static char log_file[128] = "/var/log/ibacm.log"; - static int log_level = 0; - static char lock_file[128] = "/var/lock/ibacm.pid"; -@@ -2861,7 +2862,7 @@ static FILE *acm_open_addr_file(void) - { - FILE *f; - -- if ((f = fopen(addr_file, "r"))) -+ if (!auto_addr && (f = fopen(addr_file, "r"))) - return f; - - acm_log(0, "notice - generating acm_addr.cfg file\n"); -@@ -2920,6 +2921,7 @@ static void show_usage(char *program) - printf(" [-D] - run as a daemon\n"); - printf(" [-A addr_file] - address configuration file\n"); - printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_ADDR_FILE); -+ printf(" [-a] - automatically generate and update addresses\n"); - printf(" [-O option_file] - option configuration file\n"); - printf(" (default %s/%s\n", ACM_DEST_DIR, ACM_OPTS_FILE); - } -@@ -2938,6 +2940,9 @@ int CDECL_FUNC main(int argc, char **argv) - case 'A': - addr_file = optarg; - break; -+ case 'a': -+ auto_addr = 1; -+ break; - case 'O': - opts_file = optarg; - break; -- 2.46.0