opensm: Add routing specific update_vlarb hook routine
PATCH 2/8 opensm: Add routing specific update_vlarb hook routine
Signed-off-by Jim Schutt <[email protected]>
--- include/opensm/osm_opensm.h | 12 ++++++++++++ opensm/osm_qos.c | 6 ++++++ 2 files changed, 18 insertions(+), 0 deletions(-)
include/opensm/osm_opensm.h +12 -0
@@ -136,6 +136,10 @@ struct osm_routing_engine { void (*update_sl2vl)(void *context, IN osm_physp_t *port, IN uint8_t in_port_num, IN uint8_t out_port_num, IN OUT ib_slvl_table_t *t); + void (*update_vlarb)(void *context, IN osm_physp_t *port, + IN uint8_t port_num, + IN OUT ib_vl_arb_table_t *block, +unsigned block_length,unsigned block_num); uint8_t (*path_sl)(void *context, IN uint8_t path_sl_hint, IN const ib_net16_t slid, IN const ib_net16_t dlid); ib_api_status_t (*mcast_build_stree)(void *context,
@@ -170,6 +174,14 @@ struct osm_routing_engine {* which part of the SL2VL map to update. For router/HCA ports, * in_port_num/out_port_num should be ignored. * +* update_vlarb(void *context, IN osm_physp_t *port, +* IN uint8_t port_num, +* IN OUT ib_vl_arb_table_t *block, +* unsigned block_length, unsigned block_num) +* The callback to allow routing engine input for VLArbitration. +* *port is the physical port for which the VLArb table is to be +* updated. +* * path_sl * The callback for computing path SL. *
opensm/osm_qos.c +6 -0
@@ -144,6 +144,7 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,unsigned block_num, cl_qlist_t *mad_list) { + struct osm_routing_engine *re = sm->p_subn->p_osm->routing_engine_used;ib_vl_arb_table_t block;uint32_t attr_mod;unsigned vl_mask, i;
@@ -152,6 +153,11 @@ static ib_api_status_t vlarb_update_table_block(osm_sm_t * sm,memset (&block,0 ,sizeof (block));memcpy (&block, table_block, block_length *sizeof (block.vl_entry[0 ])); + +if (re && re->update_vlarb) + re->update_vlarb (re->context, p, port_num, &block, + block_length, block_num); +for (i =0 ; i < block_length; i++) block.vl_entry[i].vl &= vl_mask;
Signature · 6 lines
1.7.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html