]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
commit
authorSean Hefty <sean.hefty@intel.com>
Fri, 20 Jun 2014 15:55:44 +0000 (08:55 -0700)
committerSean Hefty <sean.hefty@intel.com>
Fri, 20 Jun 2014 15:55:44 +0000 (08:55 -0700)
meta
patches/ibacm-add-provider-man-page [deleted file]
patches/ibacm-prov-export-a-function-t [deleted file]
patches/ibacm-prov-export-a-function-t-0 [deleted file]
patches/ibacm-update-man-page [deleted file]

diff --git a/meta b/meta
index 49af7d228e303dbe9ba38969104ff171085031ba..d6c0d2a119f6fabd261e477743de9906297e46e2 100644 (file)
--- a/meta
+++ b/meta
@@ -1,11 +1,7 @@
 Version: 1
-Previous: d564b143ee721c5e7d7d7c8b7f0dbad680b274aa
+Previous: 006e6e9b9382a2a3923bdabf3d9c6afdd00d123a
 Head: b7cbaac6cadd778140a20b161f7c29772fc5a77f
 Applied:
-  ibacm-update-man-page: 740d2536b9ba2ae764fffcc2205c656771bde779
-  ibacm-add-provider-man-page: a2b702c11c98eb1065bb8831d28e07979155c2a2
-  ibacm-prov-export-a-function-t: b0e500b5b2768b0176c2724a0925043d97886d23
-  ibacm-prov-export-a-function-t-0: b7cbaac6cadd778140a20b161f7c29772fc5a77f
 Unapplied:
   suse: 7076e2a00570a3cda4e4ce034419399a23ebfb0a
   dev-name2ip: 8e00708e882239292492e13aa51c82042255933c
diff --git a/patches/ibacm-add-provider-man-page b/patches/ibacm-add-provider-man-page
deleted file mode 100644 (file)
index a880620..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Bottom: 8cedf3c95809cfc78f8f716b0872e121ebce2987
-Top:    8cedf3c95809cfc78f8f716b0872e121ebce2987
-Author: Kaike Wan <kaike.wan@intel.com>
-Date:   2014-06-20 08:53:01 -0700
-
-ibacm: add provider man page
-
-This patch adds the man page for the provider interface.
-
-Signed-off-by: Kaike Wan <kaike.wan@intel.com>
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-
diff --git a/patches/ibacm-prov-export-a-function-t b/patches/ibacm-prov-export-a-function-t
deleted file mode 100644 (file)
index 529e851..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-Bottom: 8cedf3c95809cfc78f8f716b0872e121ebce2987
-Top:    07014405cca6b5e9bb67a82361b2ec1d634f6281
-Author: Kaike Wan <kaike.wan@intel.com>
-Date:   2014-06-20 08:54:43 -0700
-
-ibacm/prov: export a function to return config file name
-
-Instead of exposing the ibacm configuration file name directly,
-this patch exports a function to return the configuration file
-name. This provides better encapsulation.
-
-Signed-off-by: Kaike Wan <kaike.wan@intel.com>
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/include/infiniband/acm_prov.h b/include/infiniband/acm_prov.h
-index dcfdf5f..9e299b9 100644
---- a/include/infiniband/acm_prov.h
-+++ b/include/infiniband/acm_prov.h
-@@ -82,7 +82,6 @@ struct acm_provider {
- /* Variables exported from core */
- extern atomic_t counter[ACM_MAX_COUNTER];
--extern char *opts_file;
- int provider_query(struct acm_provider **info, uint32_t *version);
-@@ -117,4 +116,6 @@ acm_alloc_sa_mad(const struct acm_endpoint *endpoint, void *context,
- extern void acm_free_sa_mad(struct acm_sa_mad *mad);
- extern int acm_send_sa_mad(struct acm_sa_mad *mad);
-+extern char * acm_get_opts_file(void);
-+
- #endif /* ACM_PROV_H */
-diff --git a/prov/acmp/src/acmp.c b/prov/acmp/src/acmp.c
-index 45ad03b..5db62e2 100644
---- a/prov/acmp/src/acmp.c
-+++ b/prov/acmp/src/acmp.c
-@@ -2776,6 +2776,7 @@ static void acmp_set_options(void)
-       FILE *f;
-       char s[120];
-       char opt[32], value[256];
-+      char *opts_file = acm_get_opts_file();
-       if (!(f = fopen(opts_file, "r")))
-               return;
-diff --git a/src/acm.c b/src/acm.c
-index 6d18ac5..97b773e 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -186,7 +186,7 @@ static struct sa_data {
-  * Service options - may be set through ibacm_opts.cfg file.
-  */
- static char *acme = IBACM_BIN_PATH "/ib_acme -A";
--char *opts_file = ACM_CONF_DIR "/" ACM_OPTS_FILE;
-+static char *opts_file = ACM_CONF_DIR "/" ACM_OPTS_FILE;
- static char *addr_file = ACM_CONF_DIR "/" ACM_ADDR_FILE;
- static char log_file[128] = "/var/log/ibacm.log";
- static int log_level = 0;
-@@ -256,6 +256,11 @@ int ib_any_gid(union ibv_gid *gid)
-       return ((gid->global.subnet_prefix | gid->global.interface_id) == 0);
- }
-+char * acm_get_opts_file(void)
-+{
-+      return opts_file;
-+}
-+
- static struct acmc_prov_context *
- acm_alloc_prov_context(struct acm_provider *prov)
- {
diff --git a/patches/ibacm-prov-export-a-function-t-0 b/patches/ibacm-prov-export-a-function-t-0
deleted file mode 100644 (file)
index 610d946..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-Bottom: 07014405cca6b5e9bb67a82361b2ec1d634f6281
-Top:    35fd60e5ad8d8c58e2774173414af34ecd73c204
-Author: Kaike Wan <kaike.wan@intel.com>
-Date:   2014-06-20 08:55:23 -0700
-
-ibacm/prov: export a function to increment performance counters
-
-Instead of exposing the combined counters directly, this patch exports a
-function to providers to increment the combined counters. This offers better
-encapsulation and avoids exposing the private type atomic_t.
-
-Signed-off-by: Kaike Wan <kaike.wan@intel.com>
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/include/infiniband/acm_prov.h b/include/infiniband/acm_prov.h
-index 9e299b9..890e6ba 100644
---- a/include/infiniband/acm_prov.h
-+++ b/include/infiniband/acm_prov.h
-@@ -80,9 +80,6 @@ struct acm_provider {
-       void    (*query_perf)(void *ep_context, uint64_t *values, uint8_t *cnt);
- };
--/* Variables exported from core */
--extern atomic_t counter[ACM_MAX_COUNTER];
--
- int provider_query(struct acm_provider **info, uint32_t *version);
- /* Functions exported from core */
-@@ -117,5 +114,6 @@ extern void acm_free_sa_mad(struct acm_sa_mad *mad);
- extern int acm_send_sa_mad(struct acm_sa_mad *mad);
- extern char * acm_get_opts_file(void);
-+extern void acm_increment_counter(int type);
- #endif /* ACM_PROV_H */
-diff --git a/prov/acmp/src/acmp.c b/prov/acmp/src/acmp.c
-index 5db62e2..2dd356d 100644
---- a/prov/acmp/src/acmp.c
-+++ b/prov/acmp/src/acmp.c
-@@ -798,7 +798,7 @@ static uint8_t acmp_resolve_path_sa(struct acmp_ep *ep, struct acmp_dest *dest,
-       memcpy(mad->data, &dest->path, sizeof(dest->path));
-       mad->comp_mask = acm_path_comp_mask(&dest->path);
--      atomic_inc(&counter[ACM_CNTR_ROUTE_QUERY]);
-+      acm_increment_counter(ACM_CNTR_ROUTE_QUERY);
-       atomic_inc(&ep->counters[ACM_CNTR_ROUTE_QUERY]);
-       dest->state = ACMP_QUERY_ROUTE;
-       if (acm_send_sa_mad(sa_mad)) {
-@@ -1630,7 +1630,7 @@ acmp_query(void *addr_context, struct acm_msg *msg, uint64_t id)
-               sizeof(struct ibv_path_record));
-       mad->comp_mask = acm_path_comp_mask(&msg->resolve_data[0].info.path);
--      atomic_inc(&counter[ACM_CNTR_ROUTE_QUERY]);
-+      acm_increment_counter(ACM_CNTR_ROUTE_QUERY);
-       atomic_inc(&ep->counters[ACM_CNTR_ROUTE_QUERY]);
-       if (acm_send_sa_mad(sa_mad)) {
-               acm_log(0, "Error - Failed to send sa mad\n");
-@@ -1691,8 +1691,8 @@ acmp_send_resolve(struct acmp_ep *ep, struct acmp_dest *dest,
-       rec->gid_cnt = (uint8_t) ep->mc_cnt;
-       for (i = 0; i < ep->mc_cnt; i++)
-               memcpy(&rec->gid[i], ep->mc_dest[i].address, 16);
--      
--      atomic_inc(&counter[ACM_CNTR_ADDR_QUERY]);
-+
-+      acm_increment_counter(ACM_CNTR_ADDR_QUERY);
-       atomic_inc(&ep->counters[ACM_CNTR_ADDR_QUERY]);
-       acmp_post_send(&ep->resolve_queue, msg);
-       return 0;
-@@ -1758,13 +1758,13 @@ test:
-               if (acmp_dest_timeout(dest))
-                       goto test;
-               acm_log(2, "request satisfied from local cache\n");
--              atomic_inc(&counter[ACM_CNTR_ROUTE_CACHE]);
-+              acm_increment_counter(ACM_CNTR_ROUTE_CACHE);
-               atomic_inc(&ep->counters[ACM_CNTR_ROUTE_CACHE]);
-               status = ACM_STATUS_SUCCESS;
-               break;
-       case ACMP_ADDR_RESOLVED:
-               acm_log(2, "have address, resolving route\n");
--              atomic_inc(&counter[ACM_CNTR_ADDR_CACHE]);
-+              acm_increment_counter(ACM_CNTR_ADDR_CACHE);
-               atomic_inc(&ep->counters[ACM_CNTR_ADDR_CACHE]);
-               status = acmp_resolve_path_sa(ep, dest, acmp_dest_sa_resp);
-               if (status) {
-@@ -1833,7 +1833,7 @@ test:
-               if (acmp_dest_timeout(dest))
-                       goto test;
-               acm_log(2, "request satisfied from local cache\n");
--              atomic_inc(&counter[ACM_CNTR_ROUTE_CACHE]);
-+              acm_increment_counter(ACM_CNTR_ROUTE_CACHE);
-               atomic_inc(&ep->counters[ACM_CNTR_ROUTE_CACHE]);
-               status = ACM_STATUS_SUCCESS;
-               break;
-diff --git a/src/acm.c b/src/acm.c
-index 97b773e..8f147ef 100644
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -163,7 +163,7 @@ static struct acmc_client client_array[FD_SETSIZE - 1];
- static FILE *flog;
- static lock_t log_lock;
- PER_THREAD char log_data[ACM_MAX_ADDRESS];
--atomic_t counter[ACM_MAX_COUNTER];
-+static atomic_t counter[ACM_MAX_COUNTER];
- static struct acmc_device *
- acm_get_device_from_gid(union ibv_gid *sgid, uint8_t *port);
-@@ -261,6 +261,12 @@ char * acm_get_opts_file(void)
-       return opts_file;
- }
-+void acm_increment_counter(int type)
-+{
-+      if (type >= 0 && type < ACM_MAX_COUNTER)
-+              atomic_inc(&counter[type]);
-+}
-+
- static struct acmc_prov_context *
- acm_alloc_prov_context(struct acm_provider *prov)
- {
diff --git a/patches/ibacm-update-man-page b/patches/ibacm-update-man-page
deleted file mode 100644 (file)
index 6320ee2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Bottom: 8cedf3c95809cfc78f8f716b0872e121ebce2987
-Top:    8cedf3c95809cfc78f8f716b0872e121ebce2987
-Author: Kaike Wan <kaike.wan@intel.com>
-Date:   2014-06-20 08:53:51 -0700
-
-ibacm: update man page
-
-This patch updates the ibacm man page after the introduction
-of the provider interface.
-
-Signed-off-by: Kaike Wan <kaike.wan@intel.com>
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-