]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Tue, 16 Nov 2010 23:01:58 +0000 (15:01 -0800)
committerSean Hefty <sean.hefty@intel.com>
Tue, 16 Nov 2010 23:01:58 +0000 (15:01 -0800)
meta
patches/loop
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 571a3f83e3e97e985a74ace6d6a9ea2821e8003e..85ef9af58b30e08f625accac385eb4dcdfa13733 100644 (file)
--- a/meta
+++ b/meta
@@ -1,12 +1,11 @@
 Version: 1
-Previous: 2ef51322b98c08d6eda63413850f69cbff2db343
-Head: 50aabefea99c72aab693bcce9c8718ce9ee67874
+Previous: d2f6de4156b73a8447490b64f444ee781ce00d17
+Head: f2f26b18aefbfab005ae1f23139ba7c18993b8cd
 Applied:
   acm_snoop: 4241a1ee0838579443846233ba67f9f6464db855
   log_lid: 9bc99c564c67392596986084c29697a4fb55d006
   logging: 39170d53e725bd8dc493d1eea532c63fde504e61
   dest_string: d234c9d83479e496fa925c7f46b806d07a35d3d4
-  loop: 51d39059c7fec3ee6e764fe2f473b5ce227a3967
-  refresh-temp: 50aabefea99c72aab693bcce9c8718ce9ee67874
+  loop: f2f26b18aefbfab005ae1f23139ba7c18993b8cd
 Unapplied:
 Hidden:
index 5a02f469b17256a9e1f9a8b6ee05924418ce643f..0258ab9d50e43291c09155492d41d7b43660b3ed 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: 586b39cacd2b705239045da946e474cb11840ae8
-Top:    586b39cacd2b705239045da946e474cb11840ae8
+Top:    f753fc77ff0487c91ad6761d39d3786136eb1015
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-11-16 10:39:24 -0800
 
@@ -22,4 +22,79 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 ---
 
-
+diff --git a/src/acm.c b/src/acm.c
+index 77194ff..754a74b 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -204,6 +204,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 short server_port = 6125;
+ static int timeout = 2000;
+ static int retries = 15;
+@@ -2294,6 +2295,37 @@ static int acm_assign_ep_names(struct acm_ep *ep)
+       return !index;
+ }
++static int acm_init_ep_loopback(struct acm_ep *ep)
++{
++      struct acm_dest *dest;
++      int i, ret;
++
++      for (i = 0; i < MAX_EP_ADDRESS && ep->addr_type[i]; i++) {
++              dest = acm_acquire_dest(ep, ep->addr_type[i], &ep->addr[i].addr);
++              if (!dest) {
++                      acm_format_name(0, log_data, sizeof log_data,
++                                      ep->addr_type[i], &ep->addr[i].addr,
++                                      sizeof ep->addr[i].addr);
++                      acm_log(0, "ERROR - unable to create loopback dest %s\n", log_data);
++                      return -1;
++              }
++
++              ibv_query_gid(ep->port->dev->verbs, ep->port->port_num,
++                            0, &dest->path.sgid);
++
++              dest->path.dgid = dest->path.sgid;
++              dest->path.dlid = dest->path.slid = htons(ep->port->lid);
++              dest->path.reversible_numpath = IBV_PATH_RECORD_REVERSIBLE;
++              dest->path.pkey = htons(ep->pkey);
++              dest->path.mtu = (uint8_t) ep->port->mtu;
++              dest->path.rate = (uint8_t) ep->port->rate;
++
++              dest->state = ACM_READY;
++              acm_put_dest(dest);
++      }
++      retutn 0;
++}
++
+ static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_index)
+ {
+       struct ibv_qp_init_attr init_attr;
+@@ -2323,6 +2355,12 @@ static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pk
+               return ret;
+       }
++      ret = acm_init_ep_loopback(ep);
++      if (ret) {
++              acm_log(0, "ERROR - unable to init loopback\n");
++              return ret;
++      }
++
+       sq_size = resolve_depth + sa_depth + send_depth;
+       ep->cq = ibv_create_cq(port->dev->verbs, sq_size + recv_depth,
+               ep, port->dev->channel, 0);
+@@ -2620,6 +2658,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)
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 8dede59..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-Bottom: 586b39cacd2b705239045da946e474cb11840ae8
-Top:    f753fc77ff0487c91ad6761d39d3786136eb1015
-Author: Sean Hefty <sean.hefty@intel.com>
-Date:   2010-11-16 15:01:58 -0800
-
-Refresh of loop
-
----
-
-diff --git a/src/acm.c b/src/acm.c
-index 77194ff..754a74b 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -204,6 +204,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 short server_port = 6125;
- static int timeout = 2000;
- static int retries = 15;
-@@ -2294,6 +2295,37 @@ static int acm_assign_ep_names(struct acm_ep *ep)
-       return !index;
- }
-+static int acm_init_ep_loopback(struct acm_ep *ep)
-+{
-+      struct acm_dest *dest;
-+      int i, ret;
-+
-+      for (i = 0; i < MAX_EP_ADDRESS && ep->addr_type[i]; i++) {
-+              dest = acm_acquire_dest(ep, ep->addr_type[i], &ep->addr[i].addr);
-+              if (!dest) {
-+                      acm_format_name(0, log_data, sizeof log_data,
-+                                      ep->addr_type[i], &ep->addr[i].addr,
-+                                      sizeof ep->addr[i].addr);
-+                      acm_log(0, "ERROR - unable to create loopback dest %s\n", log_data);
-+                      return -1;
-+              }
-+
-+              ibv_query_gid(ep->port->dev->verbs, ep->port->port_num,
-+                            0, &dest->path.sgid);
-+
-+              dest->path.dgid = dest->path.sgid;
-+              dest->path.dlid = dest->path.slid = htons(ep->port->lid);
-+              dest->path.reversible_numpath = IBV_PATH_RECORD_REVERSIBLE;
-+              dest->path.pkey = htons(ep->pkey);
-+              dest->path.mtu = (uint8_t) ep->port->mtu;
-+              dest->path.rate = (uint8_t) ep->port->rate;
-+
-+              dest->state = ACM_READY;
-+              acm_put_dest(dest);
-+      }
-+      retutn 0;
-+}
-+
- static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pkey_index)
- {
-       struct ibv_qp_init_attr init_attr;
-@@ -2323,6 +2355,12 @@ static int acm_activate_ep(struct acm_port *port, struct acm_ep *ep, uint16_t pk
-               return ret;
-       }
-+      ret = acm_init_ep_loopback(ep);
-+      if (ret) {
-+              acm_log(0, "ERROR - unable to init loopback\n");
-+              return ret;
-+      }
-+
-       sq_size = resolve_depth + sa_depth + send_depth;
-       ep->cq = ibv_create_cq(port->dev->verbs, sq_size + recv_depth,
-               ep, port->dev->channel, 0);
-@@ -2620,6 +2658,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)