[openib-general] [PATCH 1/4] OpenSM/osm_switch.h: Add some missing multicast table routines
Hal Rosenstock
halr at voltaire.com
Fri Dec 29 09:07:15 PST 2006
OpenSM/osm_switch.h: Add some missing multicast table routines
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
diff --git a/osm/include/opensm/osm_switch.h b/osm/include/opensm/osm_switch.h
index 32fc547..71b3c8a 100644
--- a/osm/include/opensm/osm_switch.h
+++ b/osm/include/opensm/osm_switch.h
@@ -1054,6 +1054,122 @@ osm_switch_set_mft_block(
* SEE ALSO
*********/
+/****f* OpenSM: Switch/osm_switch_get_mft_block
+* NAME
+* osm_switch_get_mft_block
+*
+* DESCRIPTION
+* Retrieve a block of multicast port masks from the multicast table.
+*
+* SYNOPSIS
+*/
+static inline boolean_t
+osm_switch_get_mft_block(
+ IN osm_switch_t* const p_sw,
+ IN const uint16_t block_num,
+ IN const uint8_t position,
+ OUT ib_net16_t* const p_block )
+{
+ CL_ASSERT( p_sw );
+ return( osm_mcast_tbl_get_block( &p_sw->mcast_tbl,
+ block_num, position, p_block ) );
+}
+/*
+* PARAMETERS
+* p_sw
+* [in] Pointer to the switch object.
+*
+* block_num
+* [in] Block number (0-511) to set.
+*
+* position
+* [in] Port mask position (0-15) to set.
+*
+* p_block
+* [out] Pointer to the block of port masks stored.
+*
+* RETURN VALUES
+* Returns true if there are more blocks necessary to
+* configure all the MLIDs reachable from this switch.
+* FALSE otherwise.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+
+/****f* OpenSM: Switch/osm_switch_get_mft_max_block
+* NAME
+* osm_switch_get_mft_max_block
+*
+* DESCRIPTION
+* Get the max_block from the associated multicast table.
+*
+* SYNOPSIS
+*/
+static inline uint16_t
+osm_switch_get_mft_max_block(
+ IN osm_switch_t* const p_sw )
+{
+ CL_ASSERT( p_sw );
+ return( osm_mcast_tbl_get_max_block( &p_sw->mcast_tbl ) );
+}
+/*
+* PARAMETERS
+* p_sw
+* [in] Pointer to the switch object.
+*
+* RETURN VALUE
+*/
+
+/****f* OpenSM: Switch/osm_switch_get_mft_max_block_in_use
+* NAME
+* osm_switch_get_mft_max_block_in_use
+*
+* DESCRIPTION
+* Get the max_block_in_use from the associated multicast table.
+*
+* SYNOPSIS
+*/
+static inline uint16_t
+osm_switch_get_mft_max_block_in_use(
+ IN osm_switch_t* const p_sw )
+{
+ CL_ASSERT( p_sw );
+ return( osm_mcast_tbl_get_max_block_in_use( &p_sw->mcast_tbl ) );
+}
+/*
+* PARAMETERS
+* p_sw
+* [in] Pointer to the switch object.
+*
+* RETURN VALUE
+*/
+
+/****f* OpenSM: Switch/osm_switch_get_mft_max_position
+* NAME
+* osm_switch_get_mft_max_position
+*
+* DESCRIPTION
+* Get the max_position from the associated multicast table.
+*
+* SYNOPSIS
+*/
+static inline uint8_t
+osm_switch_get_mft_max_position(
+ IN osm_switch_t* const p_sw )
+{
+ CL_ASSERT( p_sw );
+ return( osm_mcast_tbl_get_max_position( &p_sw->mcast_tbl ) );
+}
+/*
+* PARAMETERS
+* p_sw
+* [in] Pointer to the switch object.
+*
+* RETURN VALUE
+*/
+
/****f* OpenSM: Switch/osm_switch_recommend_path
* NAME
* osm_switch_recommend_path
More information about the general
mailing list