Bottom: fb1d0cc95bf413473d6098cbb67824845146864e
-Top: c2eb2f73a26bb1db735a31b311d9902c68afdf8d
+Top: 49af70598cfc4c3312b698b4acd973641bf76f48
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2011-01-20 17:06:28 -0800
---
diff --git a/src/acm.c b/src/acm.c
-index f21f702..806b133 100644
+index f21f702..bc080f2 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -294,15 +294,22 @@ static int acm_compare_dest(const void *dest1, const void *dest2)
static void acm_process_timeouts(void)
{
DLIST_ENTRY *entry;
-@@ -1730,6 +1709,37 @@ acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path)
+@@ -1730,12 +1709,42 @@ acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path)
}
static struct acm_ep *
acm_get_ep(struct acm_ep_addr_data *data)
{
struct acm_device *dev;
-@@ -1746,28 +1756,11 @@ acm_get_ep(struct acm_ep_addr_data *data)
+- struct acm_port *port;
+ struct acm_ep *ep;
+- DLIST_ENTRY *dev_entry, *ep_entry;
++ DLIST_ENTRY *dev_entry;
+ int i;
+
+ acm_format_name(2, log_data, sizeof log_data,
+@@ -1746,28 +1755,11 @@ acm_get_ep(struct acm_ep_addr_data *data)
dev = container_of(dev_entry, struct acm_device, entry);
for (i = 0; i < dev->port_cnt; i++) {
}
}
-@@ -2490,7 +2483,7 @@ static int acm_init_ep_loopback(struct acm_ep *ep)
+@@ -2385,6 +2377,22 @@ err:
+ return -1;
+ }
+
++static FILE *acm_open_addr_file(void)
++{
++ FILE *f;
++
++ if ((f = fopen(addr_file, "r")))
++ return f;
++
++ acm_log(0, "notice - generating acm_addr.cfg file\n");
++ if (!(f = popen("ib_acme -A", "r"))) {
++ acm_log(0, "ERROR - cannot generate acm_addr.cfg\n");
++ return NULL;
++ }
++ pclose(f);
++ return fopen(addr_file, "r");
++}
++
+ static int acm_assign_ep_names(struct acm_ep *ep)
+ {
+ FILE *faddr;
+@@ -2490,7 +2498,7 @@ static int acm_init_ep_loopback(struct acm_ep *ep)
return 0;
}
{
struct ibv_qp_init_attr init_attr;
struct ibv_qp_attr attr;
-@@ -2593,24 +2586,61 @@ err1:
+@@ -2593,24 +2601,61 @@ err1:
return -1;
}
if (!ret) {
DListInsertHead(&ep->entry, &port->ep_list);
} else {
-@@ -2619,103 +2649,70 @@ static void acm_activate_port(struct acm_port *port)
+@@ -2619,103 +2664,70 @@ static void acm_activate_port(struct acm_port *port)
}
}
}
static void acm_open_dev(struct ibv_device *ibdev)
-@@ -2748,25 +2745,59 @@ static void acm_open_dev(struct ibv_device *ibdev)
+@@ -2748,25 +2760,59 @@ static void acm_open_dev(struct ibv_device *ibdev)
dev->guid = ibv_get_device_guid(ibdev);
dev->port_cnt = attr.phys_port_cnt;
static void acm_set_options(void)
{
FILE *f;
-@@ -2963,27 +2994,13 @@ int CDECL_FUNC main(int argc, char **argv)
+@@ -2852,22 +2898,6 @@ static FILE *acm_open_log(void)
+ return f;
+ }
+
+-static FILE *acm_open_addr_file(void)
+-{
+- FILE *f;
+-
+- if ((f = fopen(addr_file, "r")))
+- return f;
+-
+- acm_log(0, "notice - generating acm_addr.cfg file\n");
+- if (!(f = popen("ib_acme -A", "r"))) {
+- acm_log(0, "ERROR - cannot generate acm_addr.cfg\n");
+- return NULL;
+- }
+- pclose(f);
+- return fopen(addr_file, "r");
+-}
+-
+ static int acm_open_lock_file(void)
+ {
+ int lock_fd;
+@@ -2921,9 +2951,7 @@ static void show_usage(char *program)
+
+ int CDECL_FUNC main(int argc, char **argv)
+ {
+- struct ibv_device **ibdev;
+- int dev_cnt;
+- int op, i, daemon = 0;
++ int op, daemon = 0;
+
+ while ((op = getopt(argc, argv, "DA:O:")) != -1) {
+ switch (op) {
+@@ -2963,27 +2991,13 @@ int CDECL_FUNC main(int argc, char **argv)
DListInit(&dev_list);
DListInit(&timeout_list);
event_init(&timeout_event);
+++ /dev/null
-Bottom: c2eb2f73a26bb1db735a31b311d9902c68afdf8d
-Top: 49af70598cfc4c3312b698b4acd973641bf76f48
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2011-02-10 11:52:51 -0800
-
-Refresh of ep_active
-
----
-
-diff --git a/src/acm.c b/src/acm.c
-index 806b133..bc080f2 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -1743,9 +1743,8 @@ static struct acm_ep *
- acm_get_ep(struct acm_ep_addr_data *data)
- {
- struct acm_device *dev;
-- struct acm_port *port;
- struct acm_ep *ep;
-- DLIST_ENTRY *dev_entry, *ep_entry;
-+ DLIST_ENTRY *dev_entry;
- int i;
-
- acm_format_name(2, log_data, sizeof log_data,
-@@ -2378,6 +2377,22 @@ err:
- return -1;
- }
-
-+static FILE *acm_open_addr_file(void)
-+{
-+ FILE *f;
-+
-+ if ((f = fopen(addr_file, "r")))
-+ return f;
-+
-+ acm_log(0, "notice - generating acm_addr.cfg file\n");
-+ if (!(f = popen("ib_acme -A", "r"))) {
-+ acm_log(0, "ERROR - cannot generate acm_addr.cfg\n");
-+ return NULL;
-+ }
-+ pclose(f);
-+ return fopen(addr_file, "r");
-+}
-+
- static int acm_assign_ep_names(struct acm_ep *ep)
- {
- FILE *faddr;
-@@ -2883,22 +2898,6 @@ static FILE *acm_open_log(void)
- return f;
- }
-
--static FILE *acm_open_addr_file(void)
--{
-- FILE *f;
--
-- if ((f = fopen(addr_file, "r")))
-- return f;
--
-- acm_log(0, "notice - generating acm_addr.cfg file\n");
-- if (!(f = popen("ib_acme -A", "r"))) {
-- acm_log(0, "ERROR - cannot generate acm_addr.cfg\n");
-- return NULL;
-- }
-- pclose(f);
-- return fopen(addr_file, "r");
--}
--
- static int acm_open_lock_file(void)
- {
- int lock_fd;
-@@ -2952,9 +2951,7 @@ static void show_usage(char *program)
-
- int CDECL_FUNC main(int argc, char **argv)
- {
-- struct ibv_device **ibdev;
-- int dev_cnt;
-- int op, i, daemon = 0;
-+ int op, daemon = 0;
-
- while ((op = getopt(argc, argv, "DA:O:")) != -1) {
- switch (op) {