]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
import
authorSean Hefty <sean.hefty@intel.com>
Thu, 25 Jul 2013 19:38:41 +0000 (12:38 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 25 Jul 2013 19:38:41 +0000 (12:38 -0700)
meta
patches/ibacm-add-support-for-name-cac [new file with mode: 0644]

diff --git a/meta b/meta
index 446024a6b64e14c38a7cc4fcf0e465a2aadb82dd..7da4cd6bef23061b4bfd334fc057398bf64e560e 100644 (file)
--- a/meta
+++ b/meta
@@ -1,7 +1,8 @@
 Version: 1
-Previous: d58172167ad29d08e6aa50b6eb198fbc642763b7
-Head: bceebd670da69cef75bc48803a637d2f6d2f76be
+Previous: 3c32e3a174a6be028c5f496396497342b3bade33
+Head: 0768755e238f2337bc0f5eae98cfa0c9b61d5e5d
 Applied:
+  ibacm-add-support-for-name-cac: 0768755e238f2337bc0f5eae98cfa0c9b61d5e5d
 Unapplied:
   predoc: d248e34e50d384ea95ef2425ec745c29bb9f7a3e
   dev-name2ip: 8e00708e882239292492e13aa51c82042255933c
diff --git a/patches/ibacm-add-support-for-name-cac b/patches/ibacm-add-support-for-name-cac
new file mode 100644 (file)
index 0000000..5cae545
--- /dev/null
@@ -0,0 +1,94 @@
+Bottom: 8fa59a3931723108e19a34adfa0a61a0cadf88f4
+Top:    abdb52c4eaf8960315e499e609efeec200678412
+Author: Hal Rosenstock <hal@dev.mellanox.co.il>
+Date:   2013-07-19 14:30:04 -0400
+
+[ibacm] Add support for name cache
+
+Similar to IPv4 and IPv6 preload, (host)name cache preload is
+now supported in addr_preload_file when acm_hosts is specified
+for addr_preload setting.
+
+Signed-off-by: Hal Rosenstock <hal@mellanox.com>
+Signed-off-by: Sean Hefty <sean.hefty@intel.com>
+
+
+---
+
+diff --git a/acm_notes.txt b/acm_notes.txt
+index d204484..3f24322 100644
+--- a/acm_notes.txt
++++ b/acm_notes.txt
+@@ -136,7 +136,7 @@ none which does not preload these caches.  See dump_pr.notes.txt in dump_pr
+ for more information on the opensm_full_v1 file format and how to configure
+ OpenSM to generate this file.
+-Additional IPv4 and IPv6 caches can be be preloaded by using the
+-addr_preload option.  The default is none which does not preload these
++Additionally, the name, IPv4, and IPv6 caches can be be preloaded by using
++the addr_preload option.  The default is none which does not preload these
+ caches.  To preload these caches, set this option to acm_hosts and
+ configure the addr_data_file appropriately.
+diff --git a/ibacm_hosts.data b/ibacm_hosts.data
+index 9011691..78b978d 100644
+--- a/ibacm_hosts.data
++++ b/ibacm_hosts.data
+@@ -3,10 +3,13 @@
+ # Entry format is:
+ # address IB GID
+ #
++# The address may be one of the following:
++# host_name - ascii character string, up to 31 characters
+ # address - IPv4 or IPv6 formatted address
+ #
+ # There can be multiple entries for a single IB GID
+ #
+ # Samples:
++# luna3 fe80::8:f104:39a:169
+ # 192.168.1.3 fe80::8:f104:39a:169
+ # fe80::208:f104:39a:169 fe80::8:f104:39a:169
+diff --git a/man/ibacm.1 b/man/ibacm.1
+index 0ff58a2..fb15752 100644
+--- a/man/ibacm.1
++++ b/man/ibacm.1
+@@ -157,8 +157,8 @@ See dump_pr.notes.txt in dump_pr for more information on the
+ full_opensm_v1 file format and how to configure OpenSM to
+ generate this file.
+ .P
+-Additional IPv4 and IPv6 caches can be be preloaded by using the
+-addr_preload option.  The default is none which does not preload these
++Additionally, the name, IPv4, and IPv6 caches can be be preloaded by using
++the addr_preload option.  The default is none which does not preload these
+ caches. To preload these caches, set this option to acm_hosts and
+ configure the addr_data_file appropriately.
+ .SH "SEE ALSO"
+diff --git a/src/acm.c b/src/acm.c
+index 7f926b4..09051dc 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -2832,20 +2832,18 @@ static void acm_parse_hosts_file(struct acm_ep *ep)
+                       acm_log(0, "ERROR - %s is not IB GID\n", gid);
+                       continue;
+               }
++              memset(name, 0, ACM_MAX_ADDRESS);
+               if (inet_pton(AF_INET, addr, &ip_addr) > 0) {
+                       addr_type = ACM_ADDRESS_IP;
++                      memcpy(name, &ip_addr, 4);
+               } else if (inet_pton(AF_INET6, addr, &ip_addr) > 0) {
+                       addr_type = ACM_ADDRESS_IP6;
++                      memcpy(name, &ip_addr, sizeof(ip_addr));
+               } else {
+-                      acm_log(0, "ERROR - %s is not IP address\n", addr);
+-                      continue;
++                      addr_type = ACM_ADDRESS_NAME;
++                      strncpy((char *)name, addr, ACM_MAX_ADDRESS);
+               }
+-              memset(name, 0, ACM_MAX_ADDRESS);
+-              if (addr_type == ACM_ADDRESS_IP)
+-                      memcpy(name, &ip_addr, 4);
+-              else
+-                      memcpy(name, &ip_addr, sizeof(ip_addr));
+               dest = acm_acquire_dest(ep, addr_type, name);
+               if (!dest) {
+                       acm_log(0, "ERROR - unable to create dest %s\n", addr);