Lines Matching full:sw

121  * The "sw" argument is only relevant when the port is on a
126 static int is_port_inactive(Node * node, Port * port, Switch * sw) in is_port_inactive() argument
131 (node->type == IB_NODE_SWITCH && sw->enhsp0))) in is_port_inactive()
175 static int switch_lookup(Switch * sw, ib_portid_t * portid, int lid) in switch_lookup() argument
177 void *si = sw->switchinfo, *fdb = sw->fdb; in switch_lookup()
179 memset(si, 0, sizeof(sw->switchinfo)); in switch_lookup()
184 mad_decode_field(si, IB_SW_LINEAR_FDB_CAP_F, &sw->linearcap); in switch_lookup()
185 mad_decode_field(si, IB_SW_LINEAR_FDB_TOP_F, &sw->linearFDBtop); in switch_lookup()
186 mad_decode_field(si, IB_SW_ENHANCED_PORT0_F, &sw->enhsp0); in switch_lookup()
188 if (lid >= sw->linearcap && lid > sw->linearFDBtop) in switch_lookup()
191 memset(fdb, 0, sizeof(sw->fdb)); in switch_lookup()
197 portid2str(portid), lid, sw->fdb[lid % 64]); in switch_lookup()
198 return sw->fdb[lid % 64]; in switch_lookup()
269 Switch sw; in find_route() local
298 next_sw_outport = switch_lookup(&sw, from, to->lid); in find_route()
307 if (is_port_inactive(node, port, &sw)) in find_route()
366 next_sw_outport = switch_lookup(&sw, from, to->lid); in find_route()
376 if (is_port_inactive(&nextnode, port, &sw)) in find_route()
401 clean_nodedesc(node->nodedesc), to->lid, outport, sw.linearFDBtop); in find_route()
490 Switch sw; in switch_mclookup() local
492 void *si = sw.switchinfo; in switch_mclookup()
498 memset(si, 0, sizeof(sw.switchinfo)); in switch_mclookup()
505 mad_decode_field(si, IB_SW_MCAST_FDB_CAP_F, &sw.mccap); in switch_mclookup()
507 if (mlid >= sw.mccap) in switch_mclookup()