From: sean.hefty@intel.com Date: Wed, 10 Nov 2010 02:02:45 +0000 (-0800) Subject: refresh X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=66cdb19c0d76265a8f3e7859d27e762184782308;p=~shefty%2Fibacm.git refresh --- diff --git a/meta b/meta index c26fc4c..b2da77e 100644 --- a/meta +++ b/meta @@ -1,8 +1,7 @@ Version: 1 -Previous: ca5c78973df85149fc9d1110d3600aa4c1303ccb -Head: 7d09b8358636efaaa0f8b2ce4c9da12151e88990 +Previous: 7facb11fd89d7dd57db2e5c1efb0816730609c2c +Head: 40e40f53777a233408457e07062c8ea9c013d519 Applied: - ibacm-allow-disabling-for-loop: 4631c89c172ffe6f49b513241793c7672e7cfd66 - refresh-temp: 7d09b8358636efaaa0f8b2ce4c9da12151e88990 + ibacm-allow-disabling-for-loop: 40e40f53777a233408457e07062c8ea9c013d519 Unapplied: Hidden: diff --git a/patches/ibacm-allow-disabling-for-loop b/patches/ibacm-allow-disabling-for-loop index 5e95da5..2303f03 100644 --- a/patches/ibacm-allow-disabling-for-loop +++ b/patches/ibacm-allow-disabling-for-loop @@ -1,5 +1,5 @@ Bottom: 30326a5093b7b177c8d7612eba401d4999793f71 -Top: 30326a5093b7b177c8d7612eba401d4999793f71 +Top: 1eb335b444d6a59de8b26ecc43e9a756580e9a86 Author: Sean Hefty Date: 2010-11-09 15:37:58 -0800 @@ -15,4 +15,110 @@ Signed-off-by: Sean Hefty --- - +diff --git a/acm_opts.cfg b/acm_opts.cfg +index 3dbb0c6..61872ef 100644 +--- a/acm_opts.cfg ++++ b/acm_opts.cfg +@@ -41,6 +41,13 @@ addr_prot acm + + route_prot sa + ++# disable_loopback: ++# If non-zero, the ACM will fail resolution requests for local destination ++# addresses. This works around issues with HCAs that do not copy ++# multicast traffic back to the QP that issues the send. ++ ++disable_loopback 0 ++ + # 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 820365c..ffd1315 100644 +--- a/src/acm.c ++++ b/src/acm.c +@@ -200,6 +200,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 disable_loopback = 0; + static short server_port = 6125; + static int timeout = 2000; + static int retries = 15; +@@ -1700,7 +1701,6 @@ acm_get_ep(struct acm_ep_addr_data *data) + } + } + +- acm_log_addr(0, "acm_get_ep: could not find ", data->type, data->info.addr); + return NULL; + } + +@@ -1726,7 +1726,8 @@ acm_svr_query(struct acm_client *client, struct acm_resolve_msg *msg) + + ep = acm_get_ep(&msg->data[0]); + if (!ep) { +- acm_log(0, "could not find local end point\n"); ++ acm_log_addr(0, "acm_svr_query: could not find ", ++ data->type, data->info.addr); + status = ACM_STATUS_ESRCADDR; + goto resp; + } +@@ -1947,10 +1948,22 @@ acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *msg) + return acm_client_resolve_resp(client, msg, NULL, status); + } + ++ if (disable_loopback) { ++ acm_log_addr(2, "acm_svr_resolve: dest loopback? ", ++ daddr->type, daddr->info.addr); ++ ep = acm_get_ep(daddr); ++ if (ep) { ++ acm_log(2, "dest is local, and loopback is disabled"); ++ return acm_client_resolve_resp(client, msg, NULL, ++ ACM_STATUS_EDSTADDR); ++ } ++ } ++ + acm_log_addr(2, "acm_svr_resolve: source ", saddr->type, saddr->info.addr); + ep = acm_get_ep(saddr); + if (!ep) { +- acm_log(0, "unknown local end point\n"); ++ acm_log_addr(0, "acm_svr_resolve: could not find ", ++ data->type, data->info.addr); + return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR); + } + +@@ -2562,6 +2575,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("disable_loopback", opt)) ++ disable_loopback = atoi(value); + else if (!stricmp("server_port", opt)) + server_port = (short) atoi(value); + else if (!stricmp("timeout", opt)) +@@ -2590,6 +2605,7 @@ static void acm_log_options(void) + acm_log(0, "log level %d\n", log_level); + acm_log(0, "address resolution %d\n", addr_prot); + acm_log(0, "route resolution %d\n", route_prot); ++ acm_log(0, "disable loopback %d\n", disable_loopback); + acm_log(0, "server_port %d\n", server_port); + acm_log(0, "timeout %d ms\n", timeout); + acm_log(0, "retries %d\n", retries); +diff --git a/src/acme.c b/src/acme.c +index e03679f..6080b46 100644 +--- a/src/acme.c ++++ b/src/acme.c +@@ -121,6 +121,13 @@ static void gen_opts_temp(FILE *f) + fprintf(f, "\n"); + fprintf(f, "route_prot sa\n"); + fprintf(f, "\n"); ++ fprintf(f, "# disable_loopback:\n"); ++ fprintf(f, "# If non-zero, the ACM will fail resolution requests for local destination\n"); ++ fprintf(f, "# addresses. This works around issues with HCAs that do not copy\n"); ++ fprintf(f, "# multicast traffic back to the QP that issues the send.\n"); ++ fprintf(f, "\n"); ++ fprintf(f, "disable_loopback 0\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 c9be5a2..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,116 +0,0 @@ -Bottom: 30326a5093b7b177c8d7612eba401d4999793f71 -Top: 1eb335b444d6a59de8b26ecc43e9a756580e9a86 -Author: sean.hefty@intel.com -Date: 2010-11-09 18:02:44 -0800 - -Refresh of ibacm-allow-disabling-for-loop - ---- - -diff --git a/acm_opts.cfg b/acm_opts.cfg -index 3dbb0c6..61872ef 100644 ---- a/acm_opts.cfg -+++ b/acm_opts.cfg -@@ -41,6 +41,13 @@ addr_prot acm - - route_prot sa - -+# disable_loopback: -+# If non-zero, the ACM will fail resolution requests for local destination -+# addresses. This works around issues with HCAs that do not copy -+# multicast traffic back to the QP that issues the send. -+ -+disable_loopback 0 -+ - # 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 820365c..ffd1315 100644 ---- a/src/acm.c -+++ b/src/acm.c -@@ -200,6 +200,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 disable_loopback = 0; - static short server_port = 6125; - static int timeout = 2000; - static int retries = 15; -@@ -1700,7 +1701,6 @@ acm_get_ep(struct acm_ep_addr_data *data) - } - } - -- acm_log_addr(0, "acm_get_ep: could not find ", data->type, data->info.addr); - return NULL; - } - -@@ -1726,7 +1726,8 @@ acm_svr_query(struct acm_client *client, struct acm_resolve_msg *msg) - - ep = acm_get_ep(&msg->data[0]); - if (!ep) { -- acm_log(0, "could not find local end point\n"); -+ acm_log_addr(0, "acm_svr_query: could not find ", -+ data->type, data->info.addr); - status = ACM_STATUS_ESRCADDR; - goto resp; - } -@@ -1947,10 +1948,22 @@ acm_svr_resolve(struct acm_client *client, struct acm_resolve_msg *msg) - return acm_client_resolve_resp(client, msg, NULL, status); - } - -+ if (disable_loopback) { -+ acm_log_addr(2, "acm_svr_resolve: dest loopback? ", -+ daddr->type, daddr->info.addr); -+ ep = acm_get_ep(daddr); -+ if (ep) { -+ acm_log(2, "dest is local, and loopback is disabled"); -+ return acm_client_resolve_resp(client, msg, NULL, -+ ACM_STATUS_EDSTADDR); -+ } -+ } -+ - acm_log_addr(2, "acm_svr_resolve: source ", saddr->type, saddr->info.addr); - ep = acm_get_ep(saddr); - if (!ep) { -- acm_log(0, "unknown local end point\n"); -+ acm_log_addr(0, "acm_svr_resolve: could not find ", -+ data->type, data->info.addr); - return acm_client_resolve_resp(client, msg, NULL, ACM_STATUS_ESRCADDR); - } - -@@ -2562,6 +2575,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("disable_loopback", opt)) -+ disable_loopback = atoi(value); - else if (!stricmp("server_port", opt)) - server_port = (short) atoi(value); - else if (!stricmp("timeout", opt)) -@@ -2590,6 +2605,7 @@ static void acm_log_options(void) - acm_log(0, "log level %d\n", log_level); - acm_log(0, "address resolution %d\n", addr_prot); - acm_log(0, "route resolution %d\n", route_prot); -+ acm_log(0, "disable loopback %d\n", disable_loopback); - acm_log(0, "server_port %d\n", server_port); - acm_log(0, "timeout %d ms\n", timeout); - acm_log(0, "retries %d\n", retries); -diff --git a/src/acme.c b/src/acme.c -index e03679f..6080b46 100644 ---- a/src/acme.c -+++ b/src/acme.c -@@ -121,6 +121,13 @@ static void gen_opts_temp(FILE *f) - fprintf(f, "\n"); - fprintf(f, "route_prot sa\n"); - fprintf(f, "\n"); -+ fprintf(f, "# disable_loopback:\n"); -+ fprintf(f, "# If non-zero, the ACM will fail resolution requests for local destination\n"); -+ fprintf(f, "# addresses. This works around issues with HCAs that do not copy\n"); -+ fprintf(f, "# multicast traffic back to the QP that issues the send.\n"); -+ fprintf(f, "\n"); -+ fprintf(f, "disable_loopback 0\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");