]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Mon, 6 Dec 2010 23:49:26 +0000 (15:49 -0800)
committerSean Hefty <sean.hefty@intel.com>
Mon, 6 Dec 2010 23:49:26 +0000 (15:49 -0800)
meta
patches/nodelay
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 4601c21acc0161a1a7e2522e134c5c0bb696e475..9e2656e9c1ebd4d012f78f953bc7e07a1f4a055e 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: 22d4422325ae427ad40011bf83314175cd14075e
-Head: b8d801760afc90d58473c0b99c6e0f0d77d641b6
+Previous: 077872d91a62732201fb08d75661cdabcf505a9b
+Head: 07d66b4704e25e93240186d7040b8ad3ceeeae9a
 Applied:
   logging: 549692c49922dce3911d97dcc6d0a2fc583ab5f7
   acm_snoop: dd5542fbaa1c5a92367d0552ef3525d5ea0a4638
@@ -13,8 +13,7 @@ Applied:
   dbg_1: 3258ebd9b3f17653231089184f29ee2352be9d46
   no_addr: 775cf275e0feddd7b884ded8cdc341a919e4f9a6
   log_port: 92f81cd1f299db9d83aa21d794cfdfc4c4b5794f
-  nodelay: ff186988bcdfb1dedf877485791c46bbe2950902
-  refresh-temp: b8d801760afc90d58473c0b99c6e0f0d77d641b6
+  nodelay: 07d66b4704e25e93240186d7040b8ad3ceeeae9a
 Unapplied:
   acme_verbose: 45cba0846874c93ef7af156bf0afe59f43d82ea6
   1.0.4: 9f452b8e59adb21b90fbdda980d25a54d4360d37
index d7042bc6f2d670a25321f4bc5e299664ac760bb1..7c36ae8ef93a77ffe82d0e307c476e2e771d7419 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: 5cb19eb81ed40ac6bba59f5d10974e9fc25a49af
-Top:    9bd0de553ed9e9568bbdd22a2f0ccafa4a17450f
+Top:    9a270ff78976ad2fad44919c3ccfde93246bfe39
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-12-06 13:07:41 -0800
 
@@ -34,11 +34,34 @@ index d193d43..41b95b8 100644
  
  #define ACM_MSG_HDR_LENGTH      16
  #define ACM_MAX_ADDRESS         64
+diff --git a/man/ib_acme.1 b/man/ib_acme.1
+index 0c0e332..52000a3 100644
+--- a/man/ib_acme.1
++++ b/man/ib_acme.1
+@@ -37,6 +37,10 @@ Indicates that the resolved path information should be verified with the
+ active IB SA.  Use of the -v option provides a sanity check that\r
+ resolved path information is usable given the current cluster configuration.\r
+ .TP\r
++\-c\r
++Instructs the ACM service to only returned information that currently resides\r
++in its local cache.\r
++.TP\r
+ \-A\r
+ With this option, the ib_acme utility automatically generates the address\r
+ configuration file acm_addr.cfg.  The generated file is\r
 diff --git a/src/acme.c b/src/acme.c
-index cc34577..f14912a 100644
+index cc34577..3ee2073 100644
 --- a/src/acme.c
 +++ b/src/acme.c
-@@ -70,6 +70,7 @@ static void show_usage(char *program)
+@@ -51,6 +51,7 @@ static char *dest_addr;
+ static char *src_addr;
+ static char addr_type = 'i';
+ static int verify;
++static int nodelay;
+ static int make_addr;
+ static int make_opts;
+ int verbose;
+@@ -70,6 +71,7 @@ static void show_usage(char *program)
        printf("   -s src_addr      - format defined by -f option\n");
        printf("   -d dest_addr     - format defined by -f option\n");
        printf("   [-v]             - verify ACM response against SA query response\n");
@@ -46,7 +69,42 @@ index cc34577..f14912a 100644
        printf("usage 2: %s\n", program);
        printf("   -A [addr_file]   - generate local address configuration file\n");
        printf("                      (default is %s)\n", ACM_ADDR_FILE);
-@@ -550,7 +551,7 @@ int CDECL_FUNC main(int argc, char **argv)
+@@ -418,6 +420,16 @@ static void show_path(struct ibv_path_record *path)
+       printf("  packet lifetime: %d\n", path->packetlifetime & 0x1F);
+ }
++static uint32_t get_resolve_flags()
++{
++      uint32_t flags = 0;
++
++      if (nodelay)
++              flags |= ACM_FLAGS_NODELAY;
++
++      return flags;
++}
++
+ static int resolve_ip(struct ibv_path_record *path)
+ {
+       struct ibv_path_data *paths;
+@@ -439,7 +451,7 @@ static int resolve_ip(struct ibv_path_record *path)
+       }
+       ret = ib_acm_resolve_ip((struct sockaddr *) &src, (struct sockaddr *) &dest,
+-              &paths, &count);
++              &paths, &count, get_resolve_flags());
+       if (ret) {
+               printf("ib_acm_resolve_ip failed: 0x%x\n", ret);
+               return ret;
+@@ -455,7 +467,7 @@ static int resolve_name(struct ibv_path_record *path)
+       struct ibv_path_data *paths;
+       int ret, count;
+-      ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count);
++      ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count, get_resolve_flags());
+       if (ret) {
+               printf("ib_acm_resolve_name failed: 0x%x\n", ret);
+               return ret;
+@@ -550,7 +562,7 @@ int CDECL_FUNC main(int argc, char **argv)
        if (ret)
                goto out;
  
@@ -55,7 +113,7 @@ index cc34577..f14912a 100644
                switch (op) {
                case 'f':
                        addr_type = optarg[0];
-@@ -564,6 +565,9 @@ int CDECL_FUNC main(int argc, char **argv)
+@@ -564,6 +576,9 @@ int CDECL_FUNC main(int argc, char **argv)
                case 'v':
                        verify = 1;
                        break;
@@ -65,3 +123,67 @@ index cc34577..f14912a 100644
                case 'A':
                        make_addr = 1;
                        if (opt_arg(argc, argv))
+diff --git a/src/libacm.c b/src/libacm.c
+index 3ce0cd0..59a181b 100644
+--- a/src/libacm.c
++++ b/src/libacm.c
+@@ -143,7 +143,7 @@ err:
+ }
+ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
+-      struct ibv_path_data **paths, int *count)
++      struct ibv_path_data **paths, int *count, uint32_t flags)
+ {
+       struct acm_msg msg;
+       struct acm_resolve_msg *resolve_msg = (struct acm_resolve_msg *) &msg;
+@@ -162,7 +162,7 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
+       src_data->type   = type;
+       src_data->flags  = ACM_EP_FLAG_SOURCE;
+       dest_data->type  = type;
+-      dest_data->flags = ACM_EP_FLAG_DEST;
++      dest_data->flags = ACM_EP_FLAG_DEST | flags;
+       switch (type) {
+       case ACM_EP_INFO_NAME:
+@@ -202,21 +202,21 @@ out:
+ }
+ int ib_acm_resolve_name(char *src, char *dest,
+-      struct ibv_path_data **paths, int *count)
++      struct ibv_path_data **paths, int *count, uint32_t flags)
+ {
+       return acm_resolve((uint8_t *) src, (uint8_t *) dest,
+-              ACM_EP_INFO_NAME, paths, count);
++              ACM_EP_INFO_NAME, paths, count, flags);
+ }
+ int ib_acm_resolve_ip(struct sockaddr *src, struct sockaddr *dest,
+-      struct ibv_path_data **paths, int *count)
++      struct ibv_path_data **paths, int *count, uint32_t flags)
+ {
+       if (((struct sockaddr *) dest)->sa_family == AF_INET) {
+               return acm_resolve((uint8_t *) src, (uint8_t *) dest,
+-                      ACM_EP_INFO_ADDRESS_IP, paths, count);
++                      ACM_EP_INFO_ADDRESS_IP, paths, count, flags);
+       } else {
+               return acm_resolve((uint8_t *) src, (uint8_t *) dest,
+-                      ACM_EP_INFO_ADDRESS_IP6, paths, count);
++                      ACM_EP_INFO_ADDRESS_IP6, paths, count, flags);
+       }
+ }
+diff --git a/src/libacm.h b/src/libacm.h
+index 302099b..16df8b0 100644
+--- a/src/libacm.h
++++ b/src/libacm.h
+@@ -33,8 +33,8 @@ int libacm_init();
+ void libacm_cleanup();
+ int ib_acm_resolve_name(char *src, char *dest,
+-      struct ibv_path_data **paths, int *count);
++      struct ibv_path_data **paths, int *count, uint32_t flags);
+ int ib_acm_resolve_ip(struct sockaddr *src, struct sockaddr *dest,
+-      struct ibv_path_data **paths, int *count);
++      struct ibv_path_data **paths, int *count, uint32_t flags);
+ int ib_acm_resolve_path(struct ibv_path_record *path, uint32_t flags);
+ #define ib_acm_free_paths(paths) free(paths)
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 5553ff1..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-Bottom: 9bd0de553ed9e9568bbdd22a2f0ccafa4a17450f
-Top:    9a270ff78976ad2fad44919c3ccfde93246bfe39
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2010-12-06 15:49:25 -0800
-
-Refresh of nodelay
-
----
-
-diff --git a/man/ib_acme.1 b/man/ib_acme.1
-index 0c0e332..52000a3 100644
---- a/man/ib_acme.1
-+++ b/man/ib_acme.1
-@@ -37,6 +37,10 @@ Indicates that the resolved path information should be verified with the
- active IB SA.  Use of the -v option provides a sanity check that\r
- resolved path information is usable given the current cluster configuration.\r
- .TP\r
-+\-c\r
-+Instructs the ACM service to only returned information that currently resides\r
-+in its local cache.\r
-+.TP\r
- \-A\r
- With this option, the ib_acme utility automatically generates the address\r
- configuration file acm_addr.cfg.  The generated file is\r
-diff --git a/src/acme.c b/src/acme.c
-index f14912a..3ee2073 100644
---- a/src/acme.c
-+++ b/src/acme.c
-@@ -51,6 +51,7 @@ static char *dest_addr;
- static char *src_addr;
- static char addr_type = 'i';
- static int verify;
-+static int nodelay;
- static int make_addr;
- static int make_opts;
- int verbose;
-@@ -419,6 +420,16 @@ static void show_path(struct ibv_path_record *path)
-       printf("  packet lifetime: %d\n", path->packetlifetime & 0x1F);
- }
-+static uint32_t get_resolve_flags()
-+{
-+      uint32_t flags = 0;
-+
-+      if (nodelay)
-+              flags |= ACM_FLAGS_NODELAY;
-+
-+      return flags;
-+}
-+
- static int resolve_ip(struct ibv_path_record *path)
- {
-       struct ibv_path_data *paths;
-@@ -440,7 +451,7 @@ static int resolve_ip(struct ibv_path_record *path)
-       }
-       ret = ib_acm_resolve_ip((struct sockaddr *) &src, (struct sockaddr *) &dest,
--              &paths, &count);
-+              &paths, &count, get_resolve_flags());
-       if (ret) {
-               printf("ib_acm_resolve_ip failed: 0x%x\n", ret);
-               return ret;
-@@ -456,7 +467,7 @@ static int resolve_name(struct ibv_path_record *path)
-       struct ibv_path_data *paths;
-       int ret, count;
--      ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count);
-+      ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count, get_resolve_flags());
-       if (ret) {
-               printf("ib_acm_resolve_name failed: 0x%x\n", ret);
-               return ret;
-diff --git a/src/libacm.c b/src/libacm.c
-index 3ce0cd0..59a181b 100644
---- a/src/libacm.c
-+++ b/src/libacm.c
-@@ -143,7 +143,7 @@ err:
- }
- static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
--      struct ibv_path_data **paths, int *count)
-+      struct ibv_path_data **paths, int *count, uint32_t flags)
- {
-       struct acm_msg msg;
-       struct acm_resolve_msg *resolve_msg = (struct acm_resolve_msg *) &msg;
-@@ -162,7 +162,7 @@ static int acm_resolve(uint8_t *src, uint8_t *dest, uint8_t type,
-       src_data->type   = type;
-       src_data->flags  = ACM_EP_FLAG_SOURCE;
-       dest_data->type  = type;
--      dest_data->flags = ACM_EP_FLAG_DEST;
-+      dest_data->flags = ACM_EP_FLAG_DEST | flags;
-       switch (type) {
-       case ACM_EP_INFO_NAME:
-@@ -202,21 +202,21 @@ out:
- }
- int ib_acm_resolve_name(char *src, char *dest,
--      struct ibv_path_data **paths, int *count)
-+      struct ibv_path_data **paths, int *count, uint32_t flags)
- {
-       return acm_resolve((uint8_t *) src, (uint8_t *) dest,
--              ACM_EP_INFO_NAME, paths, count);
-+              ACM_EP_INFO_NAME, paths, count, flags);
- }
- int ib_acm_resolve_ip(struct sockaddr *src, struct sockaddr *dest,
--      struct ibv_path_data **paths, int *count)
-+      struct ibv_path_data **paths, int *count, uint32_t flags)
- {
-       if (((struct sockaddr *) dest)->sa_family == AF_INET) {
-               return acm_resolve((uint8_t *) src, (uint8_t *) dest,
--                      ACM_EP_INFO_ADDRESS_IP, paths, count);
-+                      ACM_EP_INFO_ADDRESS_IP, paths, count, flags);
-       } else {
-               return acm_resolve((uint8_t *) src, (uint8_t *) dest,
--                      ACM_EP_INFO_ADDRESS_IP6, paths, count);
-+                      ACM_EP_INFO_ADDRESS_IP6, paths, count, flags);
-       }
- }
-diff --git a/src/libacm.h b/src/libacm.h
-index 302099b..16df8b0 100644
---- a/src/libacm.h
-+++ b/src/libacm.h
-@@ -33,8 +33,8 @@ int libacm_init();
- void libacm_cleanup();
- int ib_acm_resolve_name(char *src, char *dest,
--      struct ibv_path_data **paths, int *count);
-+      struct ibv_path_data **paths, int *count, uint32_t flags);
- int ib_acm_resolve_ip(struct sockaddr *src, struct sockaddr *dest,
--      struct ibv_path_data **paths, int *count);
-+      struct ibv_path_data **paths, int *count, uint32_t flags);
- int ib_acm_resolve_path(struct ibv_path_record *path, uint32_t flags);
- #define ib_acm_free_paths(paths) free(paths)