]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
Refresh of timeout
authorSean Hefty <sean.hefty@intel.com>
Tue, 9 Oct 2012 06:50:54 +0000 (23:50 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 9 Oct 2012 06:50:54 +0000 (23:50 -0700)
src/acm.c
src/acme.c

index 32ed4b6ad558599875d514e673756acc165f4d19..5f03f4139f2e6ec180161c8bd1e0c3c53bf2116d 100644 (file)
--- a/src/acm.c
+++ b/src/acm.c
@@ -1119,6 +1119,7 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
                acm_init_path_av(msg->ep->port, dest);
                dest->addr_timeout = time_stamp_min() + (uint64_t) addr_timeout;
                dest->route_timeout = time_stamp_min() + (uint64_t) route_timeout;
+               acm_log(2, "timeout addr %llu route %llu\n", dest->addr_timeout, dest->route_timeout);
                dest->state = ACM_READY;
        } else {
                dest->state = ACM_INIT;
@@ -3088,7 +3089,7 @@ static void acm_set_options(void)
                else if (!stricmp("addr_prot", opt))
                        addr_prot = acm_convert_addr_prot(value);
                else if (!stricmp("addr_timeout", opt))
-                       addr_timeout = aoti(value);
+                       addr_timeout = atoi(value);
                else if (!stricmp("route_prot", opt))
                        route_prot = acm_convert_route_prot(value);
                else if (!strcmp("route_timeout", opt))
index 5bc9c01832ca1db81a906a58e391dd9520dfc87e..4cd1a97f5b8ffbb87f1529b8ec3e738a41c900ac 100644 (file)
@@ -136,7 +136,7 @@ static void gen_opts_temp(FILE *f)
        fprintf(f, "# Number of minutes to maintain IP address to GID mapping before\n");
        fprintf(f, "# repeating address resolution.  A value of -1 indicates that the\n");
        fprintf(f, "# mapping will not time out.\n");
-       fprintf(f, "# 1 hour = 60, 1 day = 1440, 1 week = 10080, 1 month ~ 43200")
+       fprintf(f, "# 1 hour = 60, 1 day = 1440, 1 week = 10080, 1 month ~ 43200");
        fprintf(f, "\n");
        fprintf(f, "addr_timeout 1440\n");
        fprintf(f, "\n");
@@ -153,7 +153,7 @@ static void gen_opts_temp(FILE *f)
        fprintf(f, "# repeating route resolution.  A value of -1 indicates that the\n");
        fprintf(f, "# mapping will not time out.  However, the route will\n");
        fprintf(f, "# automatically time out when the address times out.\n");
-       fprintf(f, "# 1 hour = 60, 1 day = 1440, 1 week = 10080, 1 month ~ 43200")
+       fprintf(f, "# 1 hour = 60, 1 day = 1440, 1 week = 10080, 1 month ~ 43200");
        fprintf(f, "\n");
        fprintf(f, "route_timeout -1\n");
        fprintf(f, "\n");
@@ -677,9 +677,9 @@ static void query_perf(char *svc)
        }
 
        printf("%s,", svc);
-       for (i = 0; i < cnt; i++)
+       for (i = 0; i < cnt - 1; i++)
                printf("%llu,", (unsigned long long) counters[i]);
-       printf("\n");
+       printf("%llu\n", (unsigned long long) counters[i]);
        ib_acm_free_perf(counters);
 }