[openib-general] [PATCHv2] osm: adding max_lid_ho field to osm_switch_t

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Dec 20 00:51:56 PST 2006


Hi Hal

[V2 of the patch - removed setter and unnecessary initialization]

Adding max_lid_ho field to osm_switch_t to allow routing
engines that don't use lid matrices to explicitly set the
max lid (in host order) that is reachable from the switch.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 osm/include/opensm/osm_switch.h |   6 ++++++
 1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/osm/include/opensm/osm_switch.h b/osm/include/opensm/osm_switch.h
index 4570f61..d2089bd 100644
--- a/osm/include/opensm/osm_switch.h
+++ b/osm/include/opensm/osm_switch.h
@@ -107,6 +107,7 @@ typedef struct _osm_switch
 	ib_switch_info_t			switch_info;
 	osm_fwd_tbl_t				fwd_tbl;
 	osm_lid_matrix_t			lmx;
+	uint16_t				max_lid_ho;
 	osm_port_profile_t			*p_prof;
 	osm_mcast_tbl_t				mcast_tbl;
 	uint32_t				discovery_count;
@@ -129,6 +130,9 @@ typedef struct _osm_switch
 *		LID Matrix for this switch containing the hop count
 *		to every LID from every port.
 *
+*	max_lid_ho
+*		Max LID that is accessible from this switch
+* 
 *	p_pro
 *		Pointer to array of Port Profile objects for this switch.
 *
@@ -793,6 +797,8 @@ static inline uint16_t
 osm_switch_get_max_lid_ho(
 	IN const osm_switch_t* const p_sw )
 {
+	if (p_sw->max_lid_ho != 0)
+		return p_sw->max_lid_ho;
 	return( osm_lid_matrix_get_max_lid_ho( &p_sw->lmx ) );
 }
 /*
-- 
1.4.4.1.GIT





More information about the general mailing list