From: Sean Hefty Date: Wed, 17 Nov 2010 18:21:25 +0000 (-0800) Subject: refresh X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b2d70c43d208bd7dfabd07c947a38df5f2314eff;p=~shefty%2Fibacm.git refresh --- diff --git a/meta b/meta index 2ae7eaa..5fe29d9 100644 --- a/meta +++ b/meta @@ -1,10 +1,9 @@ Version: 1 -Previous: 96f56f02a81151f32dfbe2349a420a73271e5f48 -Head: 25fbbb7190cded6c8e0042920e0c12760fb0e4e7 +Previous: 7100c91676c0b46f6694adabad6875e28a2686f8 +Head: c72e512dccb1797ac88a704a2e50771c5dfa54d3 Applied: logging: 549692c49922dce3911d97dcc6d0a2fc583ab5f7 acm_snoop: dd5542fbaa1c5a92367d0552ef3525d5ea0a4638 - loop: e4fd19e546d176034462ebab6fb261f11307df71 - refresh-temp: 25fbbb7190cded6c8e0042920e0c12760fb0e4e7 + loop: c72e512dccb1797ac88a704a2e50771c5dfa54d3 Unapplied: Hidden: diff --git a/patches/loop b/patches/loop index 12b56a8..97cf063 100644 --- a/patches/loop +++ b/patches/loop @@ -1,5 +1,5 @@ Bottom: 586b39cacd2b705239045da946e474cb11840ae8 -Top: 99c14cee568e20d5c05839010bd735d77fc6dff3 +Top: 1e1d3e8a52d8f13c674a437c666499f303e34507 Author: Sean Hefty Date: 2010-11-16 10:39:24 -0800 @@ -23,19 +23,69 @@ Signed-off-by: Sean Hefty --- +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 + + route_prot sa + ++# loopback_prot: ++# Address and route resolution protocol to resolve local addresses ++# Supported protocols are: ++# none - Use same protocols defined for addr_prot and route_prot ++# local - Resolve information used locally available data ++ ++loopback_prot local ++ + # server_port: + # TCP port number that the server listens on. + # If this value is changed, then a corresponding change is required for 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; } @@ -45,7 +95,7 @@ index 77194ff..78e3b42 100644 + 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++) { @@ -79,7 +129,7 @@ index 77194ff..78e3b42 100644 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; @@ -91,16 +141,31 @@ index 77194ff..78e3b42 100644 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"); diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index 7df3e88..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,122 +0,0 @@ -Bottom: 99c14cee568e20d5c05839010bd735d77fc6dff3 -Top: 1e1d3e8a52d8f13c674a437c666499f303e34507 -Author: Sean Hefty -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 - - route_prot sa - -+# loopback_prot: -+# Address and route resolution protocol to resolve local addresses -+# Supported protocols are: -+# none - Use same protocols defined for addr_prot and route_prot -+# local - Resolve information used locally available data -+ -+loopback_prot local -+ - # server_port: - # TCP port number that the server listens on. - # If this value is changed, then a corresponding change is required for -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");