From e819b5a34a577bf5d1fb0af719d4b57f7de52f13 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 27 Feb 2014 21:47:01 +0000 Subject: [PATCH] Remove the vendor_ids parsing. We don't use this functionality any more; we use the transport_type and device name to identify usnic devices. It's slightly easier because we can transport_type+name from ibv_device_open() and don't have to do an additional ibv_query_device() to get its attributes. Reviewed by Dave Goodell. cmr=v1.7.5:reviewer=ompi-rm1.7 This commit was SVN r30882. --- ompi/mca/btl/usnic/btl_usnic.h | 2 - ompi/mca/btl/usnic/btl_usnic_component.c | 70 ----------------------- ompi/mca/btl/usnic/btl_usnic_mca.c | 14 ----- ompi/mca/btl/usnic/help-mpi-btl-usnic.txt | 8 --- 4 files changed, 94 deletions(-) diff --git a/ompi/mca/btl/usnic/btl_usnic.h b/ompi/mca/btl/usnic/btl_usnic.h index 39fba921e2..0dbd6f923c 100644 --- a/ompi/mca/btl/usnic/btl_usnic.h +++ b/ompi/mca/btl/usnic/btl_usnic.h @@ -159,8 +159,6 @@ typedef struct ompi_btl_usnic_component_t { char *if_include; char *if_exclude; - char *vendor_part_ids_string; - uint32_t *vendor_part_ids; /** Want stats? */ bool stats_enabled; diff --git a/ompi/mca/btl/usnic/btl_usnic_component.c b/ompi/mca/btl/usnic/btl_usnic_component.c index caa2d886e4..7d0bd7a9f3 100644 --- a/ompi/mca/btl/usnic/btl_usnic_component.c +++ b/ompi/mca/btl/usnic/btl_usnic_component.c @@ -217,11 +217,6 @@ static int usnic_component_close(void) free(mca_btl_usnic_component.usnic_all_modules); free(mca_btl_usnic_component.usnic_active_modules); - if (NULL != mca_btl_usnic_component.vendor_part_ids) { - free(mca_btl_usnic_component.vendor_part_ids); - mca_btl_usnic_component.vendor_part_ids = NULL; - } - ompi_btl_usnic_rtnl_sk_free(mca_btl_usnic_component.unlsk); #if OMPI_BTL_USNIC_UNIT_TESTS @@ -317,58 +312,6 @@ static int check_reg_mem_basics(void) } -/* - * Parse the value returned in the btl_usnic_vendor_part_ids MCA param - */ -static int parse_vendor_part_ids(const char *str, uint32_t **part_ids) -{ - int i, ret = OMPI_SUCCESS; - char **parts = NULL; - uint32_t *ids; - long id; - - *part_ids = NULL; - - /* Defensive programming; this should never actually happen */ - if (NULL == str) { - ret = OMPI_ERR_BAD_PARAM; - str = ""; - goto out; - } - - /* Split into a comma-delimited list */ - parts = opal_argv_split(str, ','); - ids = calloc(sizeof(uint32_t), opal_argv_count(parts) + 1); - if (NULL == ids) { - ret = OMPI_ERR_OUT_OF_RESOURCE; - goto out; - } - for (i = 0, str = parts[0]; NULL != str; str = parts[++i]) { - id = strtol(str, NULL, 0); - if (id > UINT32_MAX || id <= 0 || - ERANGE == errno || EINVAL == errno) { - ret = OMPI_ERR_BAD_PARAM; - goto out; - } - ids[i] = (uint32_t) id; - } - *part_ids = ids; - - out: - if (NULL != parts) { - opal_argv_free(parts); - } - - /* If the parameter was bad, show a help message */ - if (OMPI_ERR_BAD_PARAM == ret) { - opal_show_help("help-mpi-btl-usnic.txt", - "bad value for btl_usnic_vendor_part_ids", - true, str); - } - - return ret; -} - static int read_device_sysfs(ompi_btl_usnic_module_t *module, const char *name) { int ret, fd; @@ -511,19 +454,6 @@ static mca_btl_base_module_t** usnic_component_init(int* num_btl_modules, return NULL; } - /* Parse the vendor part IDs returned in - btl_usnic_vendor_part_ids */ - if (OMPI_SUCCESS != - parse_vendor_part_ids(mca_btl_usnic_component.vendor_part_ids_string, - &mca_btl_usnic_component.vendor_part_ids)) { - return NULL; - } - - /* Free the value that we got back from the MCA param (the MCA var - system maintains its own interncal copy) */ - free(mca_btl_usnic_component.vendor_part_ids_string); - mca_btl_usnic_component.vendor_part_ids_string = NULL; - /* Setup the connectivity checking agent and client. */ if (mca_btl_usnic_component.connectivity_enabled) { if (OMPI_SUCCESS != ompi_btl_usnic_connectivity_agent_init() || diff --git a/ompi/mca/btl/usnic/btl_usnic_mca.c b/ompi/mca/btl/usnic/btl_usnic_mca.c index fb32ec0126..7da4c41f57 100644 --- a/ompi/mca/btl/usnic/btl_usnic_mca.c +++ b/ompi/mca/btl/usnic/btl_usnic_mca.c @@ -185,20 +185,6 @@ int ompi_btl_usnic_component_register(void) NULL, &mca_btl_usnic_component.if_exclude, REGSTR_EMPTY_OK, OPAL_INFO_LVL_1)); - /* Cisco Sereno-based VICs are part ID 207 */ - CHECK(reg_string("vendor_part_ids", - "Comma-delimited list verbs vendor part IDs to search for/use", - "207", - &mca_btl_usnic_component.vendor_part_ids_string, - 0, OPAL_INFO_LVL_5)); - /* Initialize the array to NULL here so that it can be checked as - a sentinel value later. The value will be analyzed in - component_init because it requires allocating memory. This is - not a problem for MPI processes, but ompi_info only calls this - register function without calling component finalize (meaning: - the allocated memory would not be freed/leaked). */ - mca_btl_usnic_component.vendor_part_ids = NULL; - CHECK(reg_int("stats", "A non-negative integer specifying the frequency at which each USNIC BTL will output statistics (default: 0 seconds, meaning that statistics are disabled)", 0, &mca_btl_usnic_component.stats_frequency, 0, diff --git a/ompi/mca/btl/usnic/help-mpi-btl-usnic.txt b/ompi/mca/btl/usnic/help-mpi-btl-usnic.txt index fac29799e2..aaf34ea036 100644 --- a/ompi/mca/btl/usnic/help-mpi-btl-usnic.txt +++ b/ompi/mca/btl/usnic/help-mpi-btl-usnic.txt @@ -185,14 +185,6 @@ remote host. Remote host: %s Remote MTU: %d # -[bad value for btl_usnic_vendor_part_ids] -A non-numeric value was specified for the btl_usnic_vendor_part_ids -MCA parameter. This parameter is supposed to be a comma-delimited -list of decimal verbs vendor part IDs. This usnic BTL will be ignored -for this job. - - btl_usnic_vendor_part_ids value: %s -# [rtnetlink init fail] The usnic BTL failed to initialize the rtnetlink query subsystem.