[ofa-general] [PATCH] opensm/osm_port_info_rcv: node instead of port as parameter for osm_pi_rcv_process_set()
Sasha Khapyorsky
sashak at voltaire.com
Sat Dec 15 12:39:42 PST 2007
osm_pi_rcv_process_set() function does not require osm_port_t object,
but osm_node_t instead.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/opensm/osm_port_info_rcv.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 1a2a200..1987e2c 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -505,11 +505,10 @@ osm_pi_rcv_init(IN osm_pi_rcv_t * const p_rcv,
**********************************************************************/
void
osm_pi_rcv_process_set(IN const osm_pi_rcv_t * const p_rcv,
- IN osm_port_t * const p_port,
+ IN osm_node_t * const p_node,
IN const uint8_t port_num, IN osm_madw_t * const p_madw)
{
osm_physp_t *p_physp;
- osm_node_t *p_node;
ib_net64_t port_guid;
ib_smp_t *p_smp;
ib_port_info_t *p_pi;
@@ -520,7 +519,6 @@ osm_pi_rcv_process_set(IN const osm_pi_rcv_t * const p_rcv,
p_context = osm_madw_get_pi_context_ptr(p_madw);
- p_node = p_port->p_node;
CL_ASSERT(p_node);
p_physp = osm_node_get_physp_ptr(p_node, port_num);
@@ -647,6 +645,9 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
goto Exit;
}
+ p_node = p_port->p_node;
+ CL_ASSERT(p_node);
+
/*
If we were setting the PortInfo, then receiving
this attribute was not part of sweeping the subnet.
@@ -659,7 +660,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
boolean around to determine if we were doing Get() or Set().
*/
if (p_context->set_method)
- osm_pi_rcv_process_set(p_rcv, p_port, port_num, p_madw);
+ osm_pi_rcv_process_set(p_rcv, p_node, port_num, p_madw);
else {
p_port->discovery_count++;
@@ -678,9 +679,6 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
cl_ntoh64(node_guid),
cl_ntoh64(p_smp->trans_id));
- p_node = p_port->p_node;
- CL_ASSERT(p_node);
-
p_physp = osm_node_get_physp_ptr(p_node, port_num);
/*
--
1.5.3.4.206.g58ba4
More information about the general
mailing list