* [PATCH] opensm: Cosmetic changes
@ 2011-04-04 18:46 Hal Rosenstock
0 siblings, 0 replies; 6+ messages in thread
From: Hal Rosenstock @ 2011-04-04 18:46 UTC (permalink / raw)
To: Alex Netes; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Some commentary and formatting changes
Fix some typos
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/include/opensm/osm_mcm_port.h b/include/opensm/osm_mcm_port.h
index 897f3ca..096f5f8 100644
--- a/include/opensm/osm_mcm_port.h
+++ b/include/opensm/osm_mcm_port.h
@@ -87,17 +87,19 @@ typedef struct osm_mcm_port {
* map_item
* Map Item for qmap linkage. Must be first element!!
*
+* list_item
+* Linkage structure for cl_qlist.
+*
* port
-* Reference to the parent port.
+* Reference to the parent port
*
* mgrp
* The pointer to multicast group where this port is member of
*
* port_gid
-* GID of the member port.
+* GID of the member port
*
* scope_state
-* ???
*
* proxy_join
* If FALSE - Join was performed by the endport identified
@@ -124,10 +126,10 @@ osm_mcm_port_t *osm_mcm_port_new(IN osm_port_t *
port, IN struct osm_mgrp *mgrp,
/*
* PARAMETERS
* port
-* [in] Pointer to the port object.
+* [in] Pointer to the port object
*
* mgrp
-* [in] Pointer to multicast group where this port is joined.
+* [in] Pointer to multicast group where this port is joined
*
* mcmr
* [in] Pointer to MCMember record of the join request
diff --git a/include/opensm/osm_multicast.h b/include/opensm/osm_multicast.h
index df6ac6c..d8d484c 100644
--- a/include/opensm/osm_multicast.h
+++ b/include/opensm/osm_multicast.h
@@ -178,6 +178,7 @@ osm_mgrp_t *osm_mgrp_new(IN osm_subn_t * subn, IN
ib_net16_t mlid,
* PARAMETERS
* subn
* [in] Pointer to osm_subn_t object.
+*
* mlid
* [in] Multicast LID for this multicast group.
*
@@ -357,7 +358,7 @@ osm_mcm_port_t *osm_mgrp_add_port(osm_subn_t *subn,
osm_log_t *log,
* osm_mgrp_get_mcm_port
*
* DESCRIPTION
-* finds a port in the multicast group.
+* Finds a port in the multicast group.
*
* SYNOPSIS
*/
@@ -369,7 +370,7 @@ osm_mcm_port_t *osm_mgrp_get_mcm_port(IN const
osm_mgrp_t * p_mgrp,
* [in] Pointer to an osm_mgrp_t object.
*
* port_guid
-* [in] Port guid of the departing port.
+* [in] Port guid.
*
* RETURN VALUES
* Pointer to the mcm port object when present or NULL otherwise.
@@ -379,9 +380,9 @@ osm_mcm_port_t *osm_mgrp_get_mcm_port(IN const
osm_mgrp_t * p_mgrp,
* SEE ALSO
*********/
-/****f* OpenSM: Multicast Group/osm_mgrp_remove_port
+/****f* OpenSM: Multicast Group/osm_mgrp_delete_port
* NAME
-* osm_mgrp_remove_port
+* osm_mgrp_delete_port
*
* DESCRIPTION
* Removes a port from the multicast group.
diff --git a/include/opensm/osm_port.h b/include/opensm/osm_port.h
index 8c68c99..ee9feec 100644
--- a/include/opensm/osm_port.h
+++ b/include/opensm/osm_port.h
@@ -1220,7 +1220,7 @@ osm_port_t *osm_port_new(IN const ib_node_info_t *
p_ni,
/*
* PARAMETERS
* p_ni
-* [in] Pointer to the NodeInfo attribute relavent for this port.
+* [in] Pointer to the NodeInfo attribute relevant for this port.
*
* p_parent_node
* [in] Pointer to the initialized parent osm_node_t object
diff --git a/include/opensm/osm_subnet.h b/include/opensm/osm_subnet.h
index 42ae416..a9499dd 100644
--- a/include/opensm/osm_subnet.h
+++ b/include/opensm/osm_subnet.h
@@ -501,7 +501,7 @@ typedef struct osm_subn_opt {
* hardware specific work arounds
*
* no_clients_rereg
-* When TRUE disables clients reregistration request.
+* When TRUE disables clients reregistration request
*
* SEE ALSO
* Subnet object
@@ -929,7 +929,7 @@ struct osm_switch *osm_get_switch_by_guid(IN const
osm_subn_t * p_subn,
* osm_get_node_by_guid
*
* DESCRIPTION
-* The looks for the given node giud in the subnet table of nodes by guid.
+* This looks for the given node guid in the subnet table of nodes by guid.
* NOTE: this code is not thread safe. Need to grab the lock before
* calling it.
*
@@ -958,7 +958,7 @@ struct osm_node *osm_get_node_by_guid(IN osm_subn_t
const *p_subn,
* osm_get_port_by_guid
*
* DESCRIPTION
-* The looks for the given port guid in the subnet table of ports by guid.
+* This looks for the given port guid in the subnet table of ports by guid.
* NOTE: this code is not thread safe. Need to grab the lock before
* calling it.
*
@@ -1041,7 +1041,7 @@ static inline struct osm_port
*osm_get_port_by_lid(IN osm_subn_t const * subn,
* osm_get_mgrp_by_mgid
*
* DESCRIPTION
-* The looks for the given multicast group in the subnet table by mgid.
+* This looks for the given multicast group in the subnet table by mgid.
* NOTE: this code is not thread safe. Need to grab the lock before
* calling it.
*
@@ -1065,7 +1065,7 @@ struct osm_mgrp *osm_get_mgrp_by_mgid(IN
osm_subn_t * subn, IN ib_gid_t * mgid);
* osm_get_mbox_by_mlid
*
* DESCRIPTION
-* The looks for the given multicast group in the subnet table by mlid.
+* This looks for the given multicast group in the subnet table by mlid.
* NOTE: this code is not thread safe. Need to grab the lock before
* calling it.
*
diff --git a/include/vendor/osm_vendor_ibumad.h
b/include/vendor/osm_vendor_ibumad.h
index 0a4692d..0a25583 100644
--- a/include/vendor/osm_vendor_ibumad.h
+++ b/include/vendor/osm_vendor_ibumad.h
@@ -73,7 +73,7 @@ BEGIN_C_DECLS
* osm_ca_info_t
*
* DESCRIPTION
-* Structure containing information about local Channle Adapters.
+* Structure containing information about local Channel Adapters.
*
* SYNOPSIS
*/
diff --git a/opensm/osm_multicast.c b/opensm/osm_multicast.c
index 843b6ce..4ff93f2 100644
--- a/opensm/osm_multicast.c
+++ b/opensm/osm_multicast.c
@@ -72,8 +72,7 @@ void mgrp_box_delete(osm_mgrp_box_t *mbox)
void mgrp_delete(IN osm_mgrp_t * p_mgrp)
{
- osm_mcm_port_t *p_mcm_port;
- osm_mcm_port_t *p_next_mcm_port;
+ osm_mcm_port_t *p_mcm_port, *p_next_mcm_port;
CL_ASSERT(p_mgrp);
@@ -93,7 +92,8 @@ void mgrp_delete(IN osm_mgrp_t * p_mgrp)
void osm_mgrp_box_delete(osm_mgrp_box_t *mbox)
{
osm_mgrp_t *mgrp;
- while(cl_qlist_count(&mbox->mgrp_list)) {
+
+ while (cl_qlist_count(&mbox->mgrp_list)) {
mgrp = cl_item_obj(cl_qlist_remove_head(&mbox->mgrp_list),
mgrp, list_item);
mgrp_delete(mgrp);
@@ -140,7 +140,7 @@ void osm_mgrp_cleanup(osm_subn_t * subn, osm_mgrp_t
* mgrp)
return;
while (cl_qmap_count(&mgrp->mcm_port_tbl)) {
- mcm_port = (osm_mcm_port_t *)cl_qmap_head(&mgrp->mcm_port_tbl);
+ mcm_port = (osm_mcm_port_t *) cl_qmap_head(&mgrp->mcm_port_tbl);
cl_qmap_remove_item(&mgrp->mcm_port_tbl, &mcm_port->map_item);
cl_qlist_remove_item(&mcm_port->port->mcm_list,
&mcm_port->list_item);
@@ -320,6 +320,6 @@ osm_mcm_port_t *osm_mgrp_get_mcm_port(IN const
osm_mgrp_t * p_mgrp,
{
cl_map_item_t *item = cl_qmap_get(&p_mgrp->mcm_port_tbl, port_guid);
if (item != cl_qmap_end(&p_mgrp->mcm_port_tbl))
- return (osm_mcm_port_t *)item;
+ return (osm_mcm_port_t *) item;
return NULL;
}
diff --git a/opensm/osm_opensm.c b/opensm/osm_opensm.c
index 11b7158..ce51a39 100644
--- a/opensm/osm_opensm.c
+++ b/opensm/osm_opensm.c
@@ -422,14 +422,12 @@ ib_api_status_t osm_opensm_init(IN osm_opensm_t *
p_osm,
p_osm->p_vendor, &p_osm->mad_pool, &p_osm->vl15,
&p_osm->log, &p_osm->stats, &p_osm->disp,
&p_osm->lock);
-
if (status != IB_SUCCESS)
goto Exit;
status = osm_sa_init(&p_osm->sm, &p_osm->sa, &p_osm->subn,
p_osm->p_vendor, &p_osm->mad_pool, &p_osm->log,
&p_osm->stats, &p_osm->disp, &p_osm->lock);
-
if (status != IB_SUCCESS)
goto Exit;
diff --git a/opensm/osm_sa_path_record.c b/opensm/osm_sa_path_record.c
index 04790fb..04ddf96 100644
--- a/opensm/osm_sa_path_record.c
+++ b/opensm/osm_sa_path_record.c
@@ -1620,7 +1620,7 @@ void osm_pr_rcv_process(IN void *context, IN void
*data)
goto Exit;
}
- /* update the requester physical port. */
+ /* update the requester physical port */
requester_port = osm_get_port_by_mad_addr(sa->p_log, sa->p_subn,
osm_madw_get_mad_addr_ptr
(p_madw));
diff --git a/osmtest/main.c b/osmtest/main.c
index d676de1..7b586e9 100644
--- a/osmtest/main.c
+++ b/osmtest/main.c
@@ -359,7 +359,7 @@ int main(int argc, char *argv[])
case 'f':
/*
- * Specifies Flow .
+ * Specifies Flow.
*/
if (strlen(optarg) > OSMTEST_FILE_PATH_MAX)
printf
diff --git a/osmtest/osmt_inform.c b/osmtest/osmt_inform.c
index d3558ce..f06ec3f 100644
--- a/osmtest/osmt_inform.c
+++ b/osmtest/osmt_inform.c
@@ -596,7 +596,7 @@ osmt_init_inform_info_by_trap(IN osmtest_t * const
p_osmt,
* - try to unregister inform info (should succeed)
* - register an inform info
* - send a trap - sleep
- * - check that a Report(Notice) arrived that match the sent one
+ * - check that a Report(Notice) arrived that matches the sent trap
*
*/
ib_api_status_t osmt_run_inform_info_flow(IN osmtest_t * const p_osmt)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] opensm: Cosmetic changes
@ 2009-11-13 16:37 Hal Rosenstock
[not found] ` <20091113163720.GA13938-Wuw85uim5zDR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hal Rosenstock @ 2009-11-13 16:37 UTC (permalink / raw)
To: sashak-smomgflXvOZWk0Htik3J/w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Compressed some type declarations and assignments into single line
Removed some unneeded underbars
Some minor reformatting including comment lines
Fixed some tabbing
Fixed some typos
Eliminated trailing periods in messages
Eliminated some unneeded braces
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/opensm/include/complib/cl_nodenamemap.h b/opensm/include/complib/cl_nodenamemap.h
index 9b2ada4..97984b1 100644
--- a/opensm/include/complib/cl_nodenamemap.h
+++ b/opensm/include/complib/cl_nodenamemap.h
@@ -56,8 +56,7 @@ typedef cl_qmap_t nn_map_t;
*/
nn_map_t *open_node_name_map(char *node_name_map);
void close_node_name_map(nn_map_t *map);
-char *remap_node_name(nn_map_t *map, uint64_t target_guid,
- char *nodedesc);
+char *remap_node_name(nn_map_t *map, uint64_t target_guid, char *nodedesc);
/* NOTE: parameter "nodedesc" may be modified here. */
int parse_node_map(const char *file_name,
int (*create)(void *, uint64_t, char *), void *cxt);
diff --git a/opensm/include/iba/ib_types.h b/opensm/include/iba/ib_types.h
index f6a1cf4..1facbd3 100644
--- a/opensm/include/iba/ib_types.h
+++ b/opensm/include/iba/ib_types.h
@@ -2415,7 +2415,7 @@ typedef struct _ib_path_rec {
* Another global routing parameter.
*
* num_path
-* Reversible path - 1 bit to say if path is reversible.
+* Reversible path - 1 bit to say if path is reversible.
* num_path [6:0] In queries, maximum number of paths to return.
* In responses, undefined.
*
@@ -2766,7 +2766,7 @@ ib_path_rec_init_local(IN ib_path_rec_t * const p_rec,
* [in] LID of source port.
*
* num_path
-* [in] Reversible path - 1 bit to say if path is reversible.
+* [in] Reversible path - 1 bit to say if path is reversible.
* num_path [6:0] In queries, maximum number of paths to return.
* In responses, undefined.
*
@@ -4316,7 +4316,7 @@ ib_sa_mad_get_payload_ptr(IN const ib_sa_mad_t * const p_sa_mad)
* ib_node_info_get_local_port_num
*
* DESCRIPTION
-* Gets a the local port number from the NodeInfo attribute.
+* Gets the local port number from the NodeInfo attribute.
*
* SYNOPSIS
*/
diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h
index aa8ffe1..33d1920 100644
--- a/opensm/include/opensm/osm_event_plugin.h
+++ b/opensm/include/opensm/osm_event_plugin.h
@@ -142,8 +142,8 @@ typedef struct osm_event_plugin {
const char *osm_version;
void *(*create) (struct osm_opensm *osm);
void (*delete) (void *plugin_data);
- void (*report) (void *plugin_data,
- osm_epi_event_id_t event_id, void *event_data);
+ void (*report) (void *plugin_data, osm_epi_event_id_t event_id,
+ void *event_data);
} osm_event_plugin_t;
/** =========================================================================
diff --git a/opensm/opensm/osm_console.c b/opensm/opensm/osm_console.c
index c50670b..206e7f7 100644
--- a/opensm/opensm/osm_console.c
+++ b/opensm/opensm/osm_console.c
@@ -1241,12 +1241,12 @@ static void dump_portguid_parse(char **p_last, osm_opensm_t * p_osm, FILE * out)
} else
fprintf(out, "No file name passed\n");
} else if (!(p_regexp = malloc(sizeof(*p_regexp)))) {
- fprintf(out, "No memory.\n");
+ fprintf(out, "No memory\n");
break;
} else if (regcomp(&p_regexp->exp, p_cmd,
REG_NOSUB | REG_EXTENDED) != 0) {
fprintf(out, "Cannot parse regular expression \'%s\'."
- " Skipping.\n", p_cmd);
+ " Skipping\n", p_cmd);
free(p_regexp);
continue;
} else {
@@ -1262,7 +1262,7 @@ static void dump_portguid_parse(char **p_last, osm_opensm_t * p_osm, FILE * out)
}
if (p_osm->sm.p_subn->need_update != 0) {
- fprintf(out, "Subnet is not ready yet. Try again later.\n");
+ fprintf(out, "Subnet is not ready yet. Try again later\n");
return;
}
diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index b749260..879e21f 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -88,11 +88,13 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
p_remote_physp->port_guid);
if (p_remote_port) {
- /* Let's check if this is a case of link that is lost (both ports
- weren't recognized), or a "hiccup" in the subnet - in which case
- the remote port was recognized, and its state is ACTIVE.
- If this is just a "hiccup" - force a heavy sweep in the next sweep.
- We don't want to lose that part of the subnet. */
+ /* Let's check if this is a case of link that is lost
+ (both ports weren't recognized), or a "hiccup" in the
+ subnet - in which case the remote port was
+ recognized, and its state is ACTIVE.
+ If this is just a "hiccup" - force a heavy sweep in
+ the next sweep. We don't want to lose that part of
+ the subnet. */
if (p_remote_port->discovery_count &&
osm_physp_get_port_state(p_remote_physp) ==
IB_LINK_ACTIVE) {
@@ -105,9 +107,10 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
sm->p_subn->force_heavy_sweep = TRUE;
}
- /* If the remote node is ca or router - need to remove the remote port,
- since it is no longer reachable. This can be done if we reset the
- discovery count of the remote port. */
+ /* If the remote node is ca or router - need to remove
+ the remote port, since it is no longer reachable.
+ This can be done if we reset the discovery count
+ of the remote port. */
if (!p_remote_physp->p_node->sw) {
p_remote_port->discovery_count = 0;
OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
@@ -130,8 +133,8 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
p_remote_physp->port_num);
if (sm->ucast_mgr.cache_valid)
- osm_ucast_cache_add_link(&sm->ucast_mgr,
- p_physp, p_remote_physp);
+ osm_ucast_cache_add_link(&sm->ucast_mgr, p_physp,
+ p_remote_physp);
osm_physp_unlink(p_physp, p_remote_physp);
@@ -406,12 +409,9 @@ Exit:
void osm_drop_mgr_process(osm_sm_t * sm)
{
- cl_qmap_t *p_node_guid_tbl;
- cl_qmap_t *p_port_guid_tbl;
- osm_port_t *p_port;
- osm_port_t *p_next_port;
- osm_node_t *p_node;
- osm_node_t *p_next_node;
+ cl_qmap_t *p_node_guid_tbl, *p_port_guid_tbl;
+ osm_port_t *p_port, *p_next_port;
+ osm_node_t *p_node, *p_next_node;
CL_ASSERT(sm);
diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
index a553310..77ae89e 100644
--- a/opensm/opensm/osm_helper.c
+++ b/opensm/opensm/osm_helper.c
@@ -58,7 +58,7 @@
#define ARR_SIZE(a) (sizeof(a)/sizeof((a)[0]))
/* we use two tables - one for queries and one for responses */
-static const char *__ib_sa_method_str[] = {
+static const char *ib_sa_method_str[] = {
"RESERVED", /* 0 */
"SubnAdmGet", /* 1 */
"SubnAdmSet", /* 2 */
@@ -84,7 +84,7 @@ static const char *__ib_sa_method_str[] = {
"UNKNOWN" /* 16 */
};
-static const char *__ib_sa_resp_method_str[] = {
+static const char *ib_sa_resp_method_str[] = {
"RESERVED", /* 80 */
"SubnAdmGetResp", /* 81 */
"RESERVED (SetResp?)", /* 82 */
@@ -112,7 +112,7 @@ static const char *__ib_sa_resp_method_str[] = {
#define OSM_SA_METHOD_STR_UNKNOWN_VAL 0x16
-static const char *__ib_sm_method_str[] = {
+static const char *ib_sm_method_str[] = {
"RESERVED0", /* 0 */
"SubnGet", /* 1 */
"SubnSet", /* 2 */
@@ -150,7 +150,7 @@ static const char *__ib_sm_method_str[] = {
#define OSM_SM_METHOD_STR_UNKNOWN_VAL 0x21
-static const char *__ib_sm_attr_str[] = {
+static const char *ib_sm_attr_str[] = {
"RESERVED", /* 0 */
"ClassPortInfo", /* 1 */
"Notice", /* 2 */
@@ -189,7 +189,7 @@ static const char *__ib_sm_attr_str[] = {
#define OSM_SM_ATTR_STR_UNKNOWN_VAL 0x21
-static const char *__ib_sa_attr_str[] = {
+static const char *ib_sa_attr_str[] = {
"RESERVED", /* 0 */
"ClassPortInfo", /* 1 */
"Notice", /* 2 */
@@ -460,11 +460,11 @@ const char *ib_get_sa_method_str(IN uint8_t method)
if (method > OSM_SA_METHOD_STR_UNKNOWN_VAL)
method = OSM_SA_METHOD_STR_UNKNOWN_VAL;
/* it is a response - use the response table */
- return __ib_sa_resp_method_str[method];
+ return ib_sa_resp_method_str[method];
} else {
if (method > OSM_SA_METHOD_STR_UNKNOWN_VAL)
method = OSM_SA_METHOD_STR_UNKNOWN_VAL;
- return __ib_sa_method_str[method];
+ return ib_sa_method_str[method];
}
}
@@ -474,7 +474,7 @@ const char *ib_get_sm_method_str(IN uint8_t method)
method = (method & 0x0F) | 0x10;
if (method > OSM_SM_METHOD_STR_UNKNOWN_VAL)
method = OSM_SM_METHOD_STR_UNKNOWN_VAL;
- return __ib_sm_method_str[method];
+ return ib_sm_method_str[method];
}
const char *ib_get_sm_attr_str(IN ib_net16_t attr)
@@ -484,7 +484,7 @@ const char *ib_get_sm_attr_str(IN ib_net16_t attr)
if (host_attr > OSM_SM_ATTR_STR_UNKNOWN_VAL)
host_attr = OSM_SM_ATTR_STR_UNKNOWN_VAL;
- return __ib_sm_attr_str[host_attr];
+ return ib_sm_attr_str[host_attr];
}
const char *ib_get_sa_attr_str(IN ib_net16_t attr)
@@ -494,7 +494,7 @@ const char *ib_get_sa_attr_str(IN ib_net16_t attr)
if (host_attr > OSM_SA_ATTR_STR_UNKNOWN_VAL)
host_attr = OSM_SA_ATTR_STR_UNKNOWN_VAL;
- return __ib_sa_attr_str[host_attr];
+ return ib_sa_attr_str[host_attr];
}
const char *ib_get_trap_str(ib_net16_t trap_num)
@@ -1992,7 +1992,6 @@ const char *osm_get_sm_signal_str(IN osm_signal_t signal)
return sm_signal_str[signal];
}
-
static const char *disp_msg_str[] = {
"OSM_MSG_NONE",
"OSM_MSG_MAD_NODE_INFO",
@@ -2210,7 +2209,6 @@ const char *osm_get_lsa_str(IN uint8_t lsa)
return lsa_str_fixed_width[lsa];
}
-
static const char *sm_mgr_signal_str[] = {
"OSM_SM_SIGNAL_NONE", /* 0 */
"OSM_SM_SIGNAL_DISCOVERY_COMPLETED", /* 2 */
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index 2a2c4b3..2531255 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -1212,9 +1212,8 @@ int osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * p_mgr)
to look for any field change and will only send an updated
if required */
OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
- "Assigned port 0x%016" PRIx64
- ", LID [%u,%u]\n", cl_ntoh64(port_guid),
- min_lid_ho, max_lid_ho);
+ "Assigned port 0x%016" PRIx64 ", LID [%u,%u]\n",
+ cl_ntoh64(port_guid), min_lid_ho, max_lid_ho);
/* the proc returns the fact it sent a set port info */
if (lid_mgr_set_physp_pi(p_mgr, p_port, p_port->p_physp,
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index e56b684..03a585b 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -58,10 +58,8 @@
static uint8_t link_mgr_get_smsl(IN osm_sm_t * sm, IN osm_physp_t * p_physp)
{
osm_opensm_t *p_osm = sm->p_subn->p_osm;
- const osm_port_t *p_sm_port;
- const osm_port_t *p_src_port;
- ib_net16_t slid;
- ib_net16_t smlid;
+ const osm_port_t *p_sm_port, *p_src_port;
+ ib_net16_t slid, smlid;
uint8_t sl;
OSM_LOG_ENTER(sm->p_log);
diff --git a/opensm/opensm/osm_node.c b/opensm/opensm/osm_node.c
index ea28c70..5975cf8 100644
--- a/opensm/opensm/osm_node.c
+++ b/opensm/opensm/osm_node.c
@@ -132,9 +132,8 @@ static void node_destroy(IN osm_node_t * p_node)
osm_physp_destroy(&p_node->physp_table[i]);
/* cleanup printable node_desc field */
- if (p_node->print_desc) {
+ if (p_node->print_desc)
free(p_node->print_desc);
- }
}
void osm_node_delete(IN OUT osm_node_t ** p_node)
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index 42637e6..b3e272c 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -183,14 +183,14 @@ static void ni_rcv_set_links(IN osm_sm_t * sm, osm_node_t * p_node,
(2 nodes have the same guid) or a 12x link with lane reversal
that is not configured correctly.
We will try to recover by querying NodeInfo again.
- In order to catch even fast port moving to new location(s) and
- back we will count up to 5.
- Some crazy reconnections (newly created switch loop right before
- targeted CA) will not be catched this way. So in worst case -
- report GUID duplication and request new discovery.
- When switch node is targeted NodeInfo querying will be done in
- opposite order, this is much stronger check, unfortunately it is
- impossible with CAs.
+ In order to catch even fast port moving to new location(s)
+ and back we will count up to 5.
+ Some crazy reconnections (newly created switch loop right
+ before targeted CA) will not be catched this way. So in worst
+ case - report GUID duplication and request new discovery.
+ When switch node is targeted NodeInfo querying will be done
+ in opposite order, this is much stronger check, unfortunately
+ it is impossible with CAs.
*/
p_physp = osm_node_get_physp_ptr(p_node, port_num);
if (p_ni_context->dup_count > 5) {
@@ -430,7 +430,7 @@ static void ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
}
/* If we are a master, then this means the port is new on the subnet.
- Mark it as new - need to send trap 64 on these ports.
+ Mark it as new - need to send trap 64 for these ports.
The condition that we are master is true, since if we are in discovering
state (meaning we woke up from standby or we are just initializing),
then these ports may be new to us, but are not new on the subnet.
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index de79e3d..df2cc20 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -113,8 +113,8 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
&p_pending->index) !=
IB_SUCCESS) {
OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0503: "
- "Failed to obtain P_Key 0x%04x block and index for node "
- "0x%016" PRIx64 " port %u\n",
+ "Failed to obtain P_Key 0x%04x block and index "
+ "for node 0x%016" PRIx64 " port %u\n",
cl_ntoh16(ib_pkey_get_base(pkey)),
cl_ntoh64(osm_node_get_node_guid(p_node)),
osm_physp_get_port_num(p_physp));
diff --git a/opensm/opensm/osm_pkey_rcv.c b/opensm/opensm/osm_pkey_rcv.c
index 7f41748..b637d11 100644
--- a/opensm/opensm/osm_pkey_rcv.c
+++ b/opensm/opensm/osm_pkey_rcv.c
@@ -88,8 +88,7 @@ void osm_pkey_rcv_process(IN void *context, IN void *data)
OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4806: "
"No port object for port with GUID 0x%" PRIx64
"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
- ", TID 0x%" PRIx64 "\n",
- cl_ntoh64(port_guid),
+ ", TID 0x%" PRIx64 "\n", cl_ntoh64(port_guid),
cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
goto Exit;
}
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 9babcd2..8a99064 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -69,7 +69,7 @@ static void pi_rcv_check_and_fix_lid(osm_log_t * log, ib_port_info_t * pi,
if (cl_ntoh16(pi->base_lid) > IB_LID_UCAST_END_HO) {
OSM_LOG(log, OSM_LOG_ERROR, "ERR 0F04: "
"Got invalid base LID %u from the network. "
- "Corrected to %u.\n", cl_ntoh16(pi->base_lid),
+ "Corrected to %u\n", cl_ntoh16(pi->base_lid),
cl_ntoh16(p->port_info.base_lid));
pi->base_lid = p->port_info.base_lid;
}
@@ -352,8 +352,8 @@ static void get_pkey_table(IN osm_log_t * p_log, IN osm_sm_t * sm,
port_num = p_physp->port_num;
if (!p_node->sw || port_num == 0)
- /* The maximum blocks is defined by the node info partition cap for CA,
- router, and switch management ports. */
+ /* The maximum blocks is defined by the node info partition cap
+ for CA, router, and switch management ports. */
max_blocks =
(cl_ntoh16(p_node->node_info.partition_cap) +
IB_NUM_PKEY_ELEMENTS_IN_BLOCK - 1)
diff --git a/opensm/opensm/osm_prtn.c b/opensm/opensm/osm_prtn.c
index f1094e3..f953876 100644
--- a/opensm/opensm/osm_prtn.c
+++ b/opensm/opensm/osm_prtn.c
@@ -145,7 +145,8 @@ ib_api_status_t osm_prtn_add_all(osm_log_t * p_log, osm_subn_t * p_subn,
p_item = cl_qmap_next(p_item);
if (!type || osm_node_get_type(p_port->p_node) == type) {
status = osm_prtn_add_port(p_log, p_subn, p,
- osm_port_get_guid(p_port), full);
+ osm_port_get_guid(p_port),
+ full);
if (status != IB_SUCCESS)
goto _err;
}
diff --git a/opensm/opensm/osm_req.c b/opensm/opensm/osm_req.c
index 462403a..daccc01 100644
--- a/opensm/opensm/osm_req.c
+++ b/opensm/opensm/osm_req.c
@@ -203,8 +203,7 @@ int osm_send_trap144(osm_sm_t * sm, ib_net16_t local)
osm_madw_t *madw;
ib_smp_t *smp;
ib_mad_notice_attr_t *ntc;
- osm_port_t *port;
- osm_port_t *smport;
+ osm_port_t *port, *smport;
ib_port_info_t *pi;
port = osm_get_port_by_guid(sm->p_subn, sm->p_subn->sm_port_guid);
diff --git a/opensm/opensm/osm_sa_informinfo.c b/opensm/opensm/osm_sa_informinfo.c
index d677170..09934ef 100644
--- a/opensm/opensm/osm_sa_informinfo.c
+++ b/opensm/opensm/osm_sa_informinfo.c
@@ -121,8 +121,8 @@ static boolean_t validate_ports_access_rights(IN osm_sa_t * sa,
/* get the destination InformInfo physical port */
p_physp = p_port->p_physp;
- /* make sure that the requester and destination port can access each other
- according to the current partitioning. */
+ /* make sure that the requester and destination port can access
+ each other according to the current partitioning. */
if (!osm_physp_share_pkey
(sa->p_log, p_physp, p_requester_physp)) {
OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
@@ -143,8 +143,8 @@ static boolean_t validate_ports_access_rights(IN osm_sa_t * sa,
cl_ntoh16(p_infr_rec->inform_record.inform_info.
lid_range_end);
- /* lid_range_end is set to zero if no range desired. In this case -
- just make it equal to the lid_range_begin. */
+ /* lid_range_end is set to zero if no range desired. In this
+ case - just make it equal to the lid_range_begin. */
if (lid_range_end == 0)
lid_range_end = lid_range_begin;
@@ -277,8 +277,8 @@ static void sa_inform_info_rec_by_comp_mask(IN osm_sa_t * sa,
/* get the subscriber InformInfo physical port */
p_subscriber_physp = p_subscriber_port->p_physp;
- /* make sure that the requester and subscriber port can access each other
- according to the current partitioning. */
+ /* make sure that the requester and subscriber port can access each
+ other according to the current partitioning. */
if (!osm_physp_share_pkey(sa->p_log, p_req_physp, p_subscriber_physp)) {
OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
"requester and subscriber ports don't share pkey\n");
@@ -558,8 +558,7 @@ void osm_infr_rcv_process(IN void *context, IN void *data)
CL_ASSERT(p_sa_mad->attr_id == IB_MAD_ATTR_INFORM_INFO);
if (p_sa_mad->method != IB_MAD_METHOD_SET) {
- OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
- "Unsupported Method (%s)\n",
+ OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Unsupported Method (%s)\n",
ib_get_sa_method_str(p_sa_mad->method));
osm_sa_send_error(sa, p_madw, IB_MAD_STATUS_UNSUP_METHOD_ATTR);
goto Exit;
diff --git a/opensm/opensm/osm_sa_mad_ctrl.c b/opensm/opensm/osm_sa_mad_ctrl.c
index 8f058fd..bde88fa 100644
--- a/opensm/opensm/osm_sa_mad_ctrl.c
+++ b/opensm/opensm/osm_sa_mad_ctrl.c
@@ -102,11 +102,11 @@ static void sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * p_ctrl,
/*
If the dispatcher is showing us that it is overloaded
- there is no point in placing the request in. We should instead provide
- immediate response - IB_RESOURCE_BUSY
+ there is no point in placing the request in. We should instead
+ provide immediate response - IB_RESOURCE_BUSY
But how do we know?
- The dispatcher reports back the number of outstanding messages and the
- time the last message stayed in the queue.
+ The dispatcher reports back the number of outstanding messages and
+ the time the last message stayed in the queue.
HACK: Actually, we cannot send a mad from within the receive callback;
thus - we will just drop it.
*/
diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c
index 7103f98..dc9d508 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -643,7 +643,7 @@ static ib_api_status_t pr_rcv_get_path_parms(IN osm_sa_t * sa,
}
/*
- * Set PathRecord SL.
+ * Set PathRecord SL
*/
is_lash = (p_osm->routing_engine_used == OSM_ROUTING_ENGINE_TYPE_LASH);
@@ -967,17 +967,15 @@ static void pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
/*
Refine our search if the client specified end-point LIDs
*/
- if (comp_mask & IB_PR_COMPMASK_DLID) {
- dest_lid_min_ho = cl_ntoh16(p_pr->dlid);
- dest_lid_max_ho = cl_ntoh16(p_pr->dlid);
- } else
+ if (comp_mask & IB_PR_COMPMASK_DLID)
+ dest_lid_max_ho = dest_lid_min_ho = cl_ntoh16(p_pr->dlid);
+ else
osm_port_get_lid_range_ho(p_dest_port, &dest_lid_min_ho,
&dest_lid_max_ho);
- if (comp_mask & IB_PR_COMPMASK_SLID) {
- src_lid_min_ho = cl_ntoh16(p_pr->slid);
- src_lid_max_ho = cl_ntoh16(p_pr->slid);
- } else
+ if (comp_mask & IB_PR_COMPMASK_SLID)
+ src_lid_max_ho = src_lid_min_ho = cl_ntoh16(p_pr->slid);
+ else
osm_port_get_lid_range_ho(p_src_port, &src_lid_min_ho,
&src_lid_max_ho);
@@ -1452,7 +1450,7 @@ static ib_api_status_t pr_match_mgrp_attributes(IN osm_sa_t * sa,
comp_mask = p_sa_mad->comp_mask;
- /* check that MLID of the MC group matchs the PathRecord DLID */
+ /* check that MLID of the MC group matches the PathRecord DLID */
if ((comp_mask & IB_PR_COMPMASK_DLID) && p_mgrp->mlid != p_pr->dlid)
goto Exit;
diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index 5753e27..e9394d7 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -252,7 +252,8 @@ static void smi_rcv_process_set_request(IN osm_sm_t * sm,
status = osm_sm_state_mgr_check_legality(sm, sm_signal);
if (status != IB_SUCCESS) {
OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F07: "
- "Failed check of legality of needed SM transition. AttributeModifier:0x%X RemoteState:%s\n",
+ "Failed check of legality of needed SM transition. "
+ "AttributeModifier:0x%X RemoteState:%s\n",
p_smp->attr_mod,
osm_get_sm_mgr_state_str(ib_sminfo_get_state(sm_smi)));
status = osm_resp_send(sm, p_madw, 7, payload);
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index 122a8d4..32b162c 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -174,8 +174,8 @@ static void state_mgr_get_remote_port_info(IN osm_sm_t * sm,
mad_context.pi_context.light_sweep = TRUE;
mad_context.pi_context.active_transition = FALSE;
- /* note that with some negative logic - if the query failed it means that
- * there is no point in going to heavy sweep */
+ /* note that with some negative logic - if the query failed it means
+ * that there is no point in going to heavy sweep */
status = osm_req_get(sm, &rem_node_dr_path,
IB_MAD_ATTR_PORT_INFO, 0, CL_DISP_MSGID_NONE,
&mad_context);
@@ -445,12 +445,12 @@ static ib_api_status_t state_mgr_sweep_hop_1(IN osm_sm_t * sm)
break;
case IB_NODE_TYPE_SWITCH:
- /* Need to go over all the ports of the switch, and send a node_info
- * from them. This doesn't include the port 0 of the switch, which
- * hosts the SM.
- * Note: We'll send another switchInfo on port 0, since if no ports
- * are connected, we still want to get some response, and have the
- * subnet come up.
+ /* Need to go over all the ports of the switch, and send a
+ * node_info from them. This doesn't include the port 0 of the
+ * switch, which hosts the SM.
+ * Note: We'll send another switchInfo on port 0, since if no
+ * ports are connected, we still want to get some response, and
+ * have the subnet come up.
*/
num_ports = osm_node_get_num_physp(p_node);
for (port_num = 1; port_num < num_ports; port_num++) {
@@ -497,6 +497,7 @@ static void query_sm_info(cl_map_item_t * item, void *cxt)
osm_sm_t *sm = cxt;
ib_api_status_t ret;
+OSM_LOG(sm->p_log, OSM_LOG_ERROR, "GUID 0x%" PRIx64 "\n", cl_ntoh64(r_sm->p_port->guid));
context.smi_context.port_guid = r_sm->p_port->guid;
context.smi_context.set_method = FALSE;
context.smi_context.light_sweep = TRUE;
@@ -834,7 +835,7 @@ static void state_mgr_report_new_ports(IN osm_sm_t * sm)
/* details of the notice */
notice.generic_type = 0x83; /* is generic subn mgt type */
ib_notice_set_prod_type_ho(¬ice, 4); /* A Class Manager generator */
- /* endport becomes to be reachable */
+ /* endport becomes reachable */
notice.g_or_v.generic.trap_num = CL_HTON16(64);
/* The sm_base_lid is saved in network order already. */
notice.issuer_lid = sm->p_subn->sm_base_lid;
@@ -1125,7 +1126,7 @@ static void do_sweep(osm_sm_t * sm)
}
/* go to heavy sweep */
-_repeat_discovery:
+repeat_discovery:
/* First of all - unset all flags */
sm->p_subn->force_heavy_sweep = FALSE;
@@ -1162,7 +1163,7 @@ _repeat_discovery:
wait_for_pending_transactions(&sm->p_subn->p_osm->stats))
return;
- /* discovery completed - check other sm presense */
+ /* discovery completed - check other sm presence */
if (sm->master_sm_found) {
/*
* Call the sm_state_mgr with signal
@@ -1179,7 +1180,7 @@ _repeat_discovery:
/* if new sweep requested - don't bother with the rest */
if (sm->p_subn->force_heavy_sweep)
- goto _repeat_discovery;
+ goto repeat_discovery;
OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "HEAVY SWEEP COMPLETE");
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] opensm: Cosmetic changes
@ 2009-10-20 13:35 Hal Rosenstock
[not found] ` <20091020133520.GA5440-Wuw85uim5zDR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hal Rosenstock @ 2009-10-20 13:35 UTC (permalink / raw)
To: sashak-smomgflXvOZWk0Htik3J/w; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Remove some unneeded osm_ prefixes`
Also, some other cosmetic formatting changes
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/opensm/opensm/osm_node.c b/opensm/opensm/osm_node.c
index d7a6e9d..bc42ff2 100644
--- a/opensm/opensm/osm_node.c
+++ b/opensm/opensm/osm_node.c
@@ -127,7 +127,7 @@ osm_node_t *osm_node_new(IN const osm_madw_t * p_madw)
/**********************************************************************
**********************************************************************/
-static void osm_node_destroy(IN osm_node_t * p_node)
+static void node_destroy(IN osm_node_t * p_node)
{
uint16_t i;
@@ -148,7 +148,7 @@ static void osm_node_destroy(IN osm_node_t * p_node)
void osm_node_delete(IN OUT osm_node_t ** p_node)
{
CL_ASSERT(p_node && *p_node);
- osm_node_destroy(*p_node);
+ node_destroy(*p_node);
free(*p_node);
*p_node = NULL;
}
diff --git a/opensm/opensm/osm_prtn.c b/opensm/opensm/osm_prtn.c
index 1821397..ebf6439 100644
--- a/opensm/opensm/osm_prtn.c
+++ b/opensm/opensm/osm_prtn.c
@@ -312,9 +312,8 @@ osm_prtn_t *osm_prtn_make_new(osm_log_t * p_log, osm_subn_t * p_subn,
return p;
}
-static ib_api_status_t osm_prtn_make_default(osm_log_t * p_log,
- osm_subn_t * p_subn,
- boolean_t no_config)
+static ib_api_status_t prtn_make_default(osm_log_t * p_log, osm_subn_t * p_subn,
+ boolean_t no_config)
{
ib_api_status_t status = IB_UNKNOWN_ERROR;
osm_prtn_t *p;
@@ -362,7 +361,7 @@ ib_api_status_t osm_prtn_make_partitions(osm_log_t * p_log, osm_subn_t * p_subn)
global_pkey_counter = 0;
- status = osm_prtn_make_default(p_log, p_subn, !is_config);
+ status = prtn_make_default(p_log, p_subn, !is_config);
if (status != IB_SUCCESS)
goto _err;
diff --git a/opensm/opensm/osm_resp.c b/opensm/opensm/osm_resp.c
index 1e3a474..3241f57 100644
--- a/opensm/opensm/osm_resp.c
+++ b/opensm/opensm/osm_resp.c
@@ -58,11 +58,10 @@
/**********************************************************************
**********************************************************************/
-static void osm_resp_make_resp_smp(IN osm_sm_t * sm,
- IN const ib_smp_t * p_src_smp,
- IN ib_net16_t status,
- IN const uint8_t * p_payload,
- OUT ib_smp_t * p_dest_smp)
+static void resp_make_resp_smp(IN osm_sm_t * sm, IN const ib_smp_t * p_src_smp,
+ IN ib_net16_t status,
+ IN const uint8_t * p_payload,
+ OUT ib_smp_t * p_dest_smp)
{
OSM_LOG_ENTER(sm->p_log);
@@ -133,7 +132,7 @@ ib_api_status_t osm_resp_send(IN osm_sm_t * sm,
*/
p_smp = osm_madw_get_smp_ptr(p_madw);
p_req_smp = osm_madw_get_smp_ptr(p_req_madw);
- osm_resp_make_resp_smp(sm, p_req_smp, mad_status, p_payload, p_smp);
+ resp_make_resp_smp(sm, p_req_smp, mad_status, p_payload, p_smp);
p_madw->mad_addr.dest_lid =
p_req_madw->mad_addr.addr_type.smi.source_lid;
p_madw->mad_addr.addr_type.smi.source_lid =
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index 4035657..77d8707 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -1368,8 +1368,8 @@ _repeat_discovery:
/* if we got a signal to force heavy sweep or errors
* in the middle of the sweep - try another sweep. */
- if (sm->p_subn->force_heavy_sweep
- || sm->p_subn->subnet_initialization_error)
+ if (sm->p_subn->force_heavy_sweep ||
+ sm->p_subn->subnet_initialization_error)
osm_sm_signal(sm, OSM_SIGNAL_SWEEP);
}
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 712d87a..8976b5f 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -839,7 +839,7 @@ static ib_api_status_t append_prefix_route(IN osm_subn_t * p_subn,
return IB_SUCCESS;
}
-static ib_api_status_t osm_parse_prefix_routes_file(IN osm_subn_t * p_subn)
+static ib_api_status_t parse_prefix_routes_file(IN osm_subn_t * p_subn)
{
osm_log_t *log = &p_subn->p_osm->log;
FILE *fp;
@@ -1263,7 +1263,7 @@ int osm_subn_rescan_conf_files(IN osm_subn_t * p_subn)
osm_subn_verify_config(p_opts);
- osm_parse_prefix_routes_file(p_subn);
+ parse_prefix_routes_file(p_subn);
return 0;
}
diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c
index 67e3ede..b05987a 100644
--- a/opensm/opensm/osm_switch.c
+++ b/opensm/opensm/osm_switch.c
@@ -171,10 +171,10 @@ boolean_t osm_switch_get_lft_block(IN const osm_switch_t * p_sw,
/**********************************************************************
**********************************************************************/
static struct osm_remote_node *
-osm_switch_find_guid_common(IN const osm_switch_t * p_sw,
- IN struct osm_remote_guids_count *r,
- IN uint8_t port_num,
- IN int find_sys_guid, IN int find_node_guid)
+switch_find_guid_common(IN const osm_switch_t * p_sw,
+ IN struct osm_remote_guids_count *r,
+ IN uint8_t port_num, IN int find_sys_guid,
+ IN int find_node_guid)
{
struct osm_remote_node *p_remote_guid = NULL;
osm_physp_t *p_physp;
@@ -206,19 +206,19 @@ osm_switch_find_guid_common(IN const osm_switch_t * p_sw,
}
static struct osm_remote_node *
-osm_switch_find_sys_guid_count(IN const osm_switch_t * p_sw,
- IN struct osm_remote_guids_count *r,
- IN uint8_t port_num)
+switch_find_sys_guid_count(IN const osm_switch_t * p_sw,
+ IN struct osm_remote_guids_count *r,
+ IN uint8_t port_num)
{
- return osm_switch_find_guid_common(p_sw, r, port_num, 1, 0);
+ return switch_find_guid_common(p_sw, r, port_num, 1, 0);
}
static struct osm_remote_node *
-osm_switch_find_node_guid_count(IN const osm_switch_t * p_sw,
- IN struct osm_remote_guids_count *r,
- IN uint8_t port_num)
+switch_find_node_guid_count(IN const osm_switch_t * p_sw,
+ IN struct osm_remote_guids_count *r,
+ IN uint8_t port_num)
{
- return osm_switch_find_guid_common(p_sw, r, port_num, 0, 1);
+ return switch_find_guid_common(p_sw, r, port_num, 0, 1);
}
/**********************************************************************
@@ -411,9 +411,9 @@ uint8_t osm_switch_recommend_path(IN const osm_switch_t * p_sw,
*/
} else if (routing_for_lmc) {
/* Is the sys guid already used ? */
- p_remote_guid = osm_switch_find_sys_guid_count(p_sw,
- p_port->priv,
- port_num);
+ p_remote_guid = switch_find_sys_guid_count(p_sw,
+ p_port->priv,
+ port_num);
/* If not update the least hops for this case */
if (!p_remote_guid) {
@@ -424,9 +424,9 @@ uint8_t osm_switch_recommend_path(IN const osm_switch_t * p_sw,
}
} else { /* same sys found - try node */
/* Else is the node guid already used ? */
- p_remote_guid = osm_switch_find_node_guid_count(p_sw,
- p_port->priv,
- port_num);
+ p_remote_guid = switch_find_node_guid_count(p_sw,
+ p_port->priv,
+ port_num);
/* If not update the least hops for this case */
if (!p_remote_guid
@@ -507,7 +507,6 @@ static int alloc_lft(IN osm_switch_t * p_sw, uint16_t lids)
p_sw->lft = new_lft;
p_sw->lft_size = lft_size;
}
-
return 0;
}
@@ -548,7 +547,6 @@ int osm_switch_prepare_path_rebuild(IN osm_switch_t * p_sw, IN uint16_t max_lids
p_sw->num_hops = max_lids + 1;
}
p_sw->max_lid_ho = max_lids;
-
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-04 18:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 18:46 [PATCH] opensm: Cosmetic changes Hal Rosenstock
-- strict thread matches above, loose matches on Subject: below --
2009-11-13 16:37 Hal Rosenstock
[not found] ` <20091113163720.GA13938-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-11-15 11:39 ` Sasha Khapyorsky
2009-11-16 15:30 ` Hal Rosenstock
2009-10-20 13:35 Hal Rosenstock
[not found] ` <20091020133520.GA5440-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-22 12:30 ` Sasha Khapyorsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox