Bottom: 586b39cacd2b705239045da946e474cb11840ae8
-Top: 99c14cee568e20d5c05839010bd735d77fc6dff3
+Top: 1e1d3e8a52d8f13c674a437c666499f303e34507
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2010-11-16 10:39:24 -0800
---
+diff --git a/acm_opts.cfg b/acm_opts.cfg
+index 3dbb0c6..65faac9 100644
+--- a/acm_opts.cfg
++++ b/acm_opts.cfg
+@@ -41,6 +41,14 @@ addr_prot acm
+ \r
+ route_prot sa\r
+ \r
++# loopback_prot:\r
++# Address and route resolution protocol to resolve local addresses\r
++# Supported protocols are:\r
++# none - Use same protocols defined for addr_prot and route_prot\r
++# local - Resolve information used locally available data\r
++\r
++loopback_prot local\r
++\r
+ # server_port:\r
+ # TCP port number that the server listens on.\r
+ # If this value is changed, then a corresponding change is required for\r
diff --git a/src/acm.c b/src/acm.c
-index 77194ff..78e3b42 100644
+index 77194ff..5f7a136 100644
--- a/src/acm.c
+++ b/src/acm.c
-@@ -204,6 +204,7 @@ static char log_file[128] = "stdout";
+@@ -69,6 +69,13 @@ enum acm_route_prot
+ ACM_ROUTE_PROT_SA
+ };
+
++enum acm_loopback_prot
++{
++ ACM_LOOPBACK_PROT_NONE,
++ ACM_LOOPBACK_PROT_LOCAL
++};
++
++};
+ /*
+ * Nested locking order: dest -> ep, dest -> port
+ */
+@@ -204,6 +211,7 @@ static char log_file[128] = "stdout";
static int log_level = 0;
static enum acm_addr_prot addr_prot = ACM_ADDR_PROT_ACM;
static enum acm_route_prot route_prot = ACM_ROUTE_PROT_ACM;
-+static int loopback_prot = 0;
++static int loopback_prot = ACM_LOOPBACK_PROT_LOCAL;
static short server_port = 6125;
static int timeout = 2000;
static int retries = 15;
-@@ -2294,6 +2295,43 @@ static int acm_assign_ep_names(struct acm_ep *ep)
+@@ -2133,6 +2141,16 @@ static enum acm_route_prot acm_convert_route_prot(char *param)
+ return route_prot;
+ }
+
++static enum acm_loopback_prot acm_convert_loopback_prot(char *param)
++{
++ if (!stricmp("none", param))
++ return ACM_LOOPBACK_PROT_NONE;
++ else if (!stricmp("local", param))
++ return ACM_LOOPBACK_PROT_LOCAL;
++
++ return loopback_prot;
++}
++
+ static enum ibv_rate acm_get_rate(uint8_t width, uint8_t speed)
+ {
+ switch (width) {
+@@ -2294,6 +2312,43 @@ static int acm_assign_ep_names(struct acm_ep *ep)
return !index;
}
+ int i;
+
+ acm_log(2, "\n");
-+ if (!loopback_prot)
++ if (loopback_prot != ACM_LOOPBACK_PROT_LOCAL)
+ return 0;
+
+ for (i = 0; i < MAX_EP_ADDR && ep->addr_type[i]; i++) {
static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_index)
{
struct ibv_qp_init_attr init_attr;
-@@ -2383,6 +2421,11 @@ static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pk
+@@ -2383,6 +2438,11 @@ static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pk
if (ret)
goto err2;
return 0;
err2:
-@@ -2620,6 +2663,12 @@ static void acm_set_options(void)
- }
-
- fclose(f);
-+
-+ if (!(f = fopen("/sys/module/mlx4_core/parameters/block_loopback", "r")))
-+ return;
-+
-+ fscanf(f, "%d", &loopback_prot);
-+ fclose(f);
- }
-
- static void acm_log_options(void)
+@@ -2599,6 +2659,8 @@ static void acm_set_options(void)
+ addr_prot = acm_convert_addr_prot(value);
+ else if (!stricmp("route_prot", opt))
+ route_prot = acm_convert_route_prot(value);
++ else if (!stricmp("loopback_prot", opt))
++ loopback_prot = acm_convert_loopback_prot(value);
+ else if (!stricmp("server_port", opt))
+ server_port = (short) atoi(value);
+ else if (!stricmp("timeout", opt))
+diff --git a/src/acme.c b/src/acme.c
+index e03679f..b54738e 100644
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -121,6 +121,14 @@ static void gen_opts_temp(FILE *f)
+ fprintf(f, "\n");
+ fprintf(f, "route_prot sa\n");
+ fprintf(f, "\n");
++ fprintf(f, "# loopback_prot:\n");
++ fprintf(f, "# Address and route resolution protocol to resolve local addresses\n");
++ fprintf(f, "# Supported protocols are:\n");
++ fprintf(f, "# none - Use same protocols defined for addr_prot and route_prot\n");
++ fprintf(f, "# local - Resolve information used locally available data\n");
++ fprintf(f, "\n");
++ fprintf(f, "loopback_prot local\n");
++ fprintf(f, "\n");
+ fprintf(f, "# server_port:\n");
+ fprintf(f, "# TCP port number that the server listens on.\n");
+ fprintf(f, "# If this value is changed, then a corresponding change is required for\n");
+++ /dev/null
-Bottom: 99c14cee568e20d5c05839010bd735d77fc6dff3
-Top: 1e1d3e8a52d8f13c674a437c666499f303e34507
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2010-11-17 10:21:25 -0800
-
-Refresh of loop
-
----
-
-diff --git a/acm_opts.cfg b/acm_opts.cfg
-index 3dbb0c6..65faac9 100644
---- a/acm_opts.cfg
-+++ b/acm_opts.cfg
-@@ -41,6 +41,14 @@ addr_prot acm
- \r
- route_prot sa\r
- \r
-+# loopback_prot:\r
-+# Address and route resolution protocol to resolve local addresses\r
-+# Supported protocols are:\r
-+# none - Use same protocols defined for addr_prot and route_prot\r
-+# local - Resolve information used locally available data\r
-+\r
-+loopback_prot local\r
-+\r
- # server_port:\r
- # TCP port number that the server listens on.\r
- # If this value is changed, then a corresponding change is required for\r
-diff --git a/src/acm.c b/src/acm.c
-index 78e3b42..5f7a136 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -69,6 +69,13 @@ enum acm_route_prot
- ACM_ROUTE_PROT_SA
- };
-
-+enum acm_loopback_prot
-+{
-+ ACM_LOOPBACK_PROT_NONE,
-+ ACM_LOOPBACK_PROT_LOCAL
-+};
-+
-+};
- /*
- * Nested locking order: dest -> ep, dest -> port
- */
-@@ -204,7 +211,7 @@ static char log_file[128] = "stdout";
- static int log_level = 0;
- static enum acm_addr_prot addr_prot = ACM_ADDR_PROT_ACM;
- static enum acm_route_prot route_prot = ACM_ROUTE_PROT_ACM;
--static int loopback_prot = 0;
-+static int loopback_prot = ACM_LOOPBACK_PROT_LOCAL;
- static short server_port = 6125;
- static int timeout = 2000;
- static int retries = 15;
-@@ -2134,6 +2141,16 @@ static enum acm_route_prot acm_convert_route_prot(char *param)
- return route_prot;
- }
-
-+static enum acm_loopback_prot acm_convert_loopback_prot(char *param)
-+{
-+ if (!stricmp("none", param))
-+ return ACM_LOOPBACK_PROT_NONE;
-+ else if (!stricmp("local", param))
-+ return ACM_LOOPBACK_PROT_LOCAL;
-+
-+ return loopback_prot;
-+}
-+
- static enum ibv_rate acm_get_rate(uint8_t width, uint8_t speed)
- {
- switch (width) {
-@@ -2301,7 +2318,7 @@ static int acm_init_ep_loopback(struct acm_ep *ep)
- int i;
-
- acm_log(2, "\n");
-- if (!loopback_prot)
-+ if (loopback_prot != ACM_LOOPBACK_PROT_LOCAL)
- return 0;
-
- for (i = 0; i < MAX_EP_ADDR && ep->addr_type[i]; i++) {
-@@ -2642,6 +2659,8 @@ static void acm_set_options(void)
- addr_prot = acm_convert_addr_prot(value);
- else if (!stricmp("route_prot", opt))
- route_prot = acm_convert_route_prot(value);
-+ else if (!stricmp("loopback_prot", opt))
-+ loopback_prot = acm_convert_loopback_prot(value);
- else if (!stricmp("server_port", opt))
- server_port = (short) atoi(value);
- else if (!stricmp("timeout", opt))
-@@ -2663,12 +2682,6 @@ static void acm_set_options(void)
- }
-
- fclose(f);
--
-- if (!(f = fopen("/sys/module/mlx4_core/parameters/block_loopback", "r")))
-- return;
--
-- fscanf(f, "%d", &loopback_prot);
-- fclose(f);
- }
-
- static void acm_log_options(void)
-diff --git a/src/acme.c b/src/acme.c
-index e03679f..b54738e 100644
---- a/src/acme.c
-+++ b/src/acme.c
-@@ -121,6 +121,14 @@ static void gen_opts_temp(FILE *f)
- fprintf(f, "\n");
- fprintf(f, "route_prot sa\n");
- fprintf(f, "\n");
-+ fprintf(f, "# loopback_prot:\n");
-+ fprintf(f, "# Address and route resolution protocol to resolve local addresses\n");
-+ fprintf(f, "# Supported protocols are:\n");
-+ fprintf(f, "# none - Use same protocols defined for addr_prot and route_prot\n");
-+ fprintf(f, "# local - Resolve information used locally available data\n");
-+ fprintf(f, "\n");
-+ fprintf(f, "loopback_prot local\n");
-+ fprintf(f, "\n");
- fprintf(f, "# server_port:\n");
- fprintf(f, "# TCP port number that the server listens on.\n");
- fprintf(f, "# If this value is changed, then a corresponding change is required for\n");