Lines Matching refs:sw
75 osm_switch_t *sw;
143 for (pn = 1; pn < u->sw->num_ports; pn++) {
151 osm_node_get_remote_node(u->sw->p_node, pn,
155 if (!p_remote_node || !p_remote_node->sw)
158 p_remote_sw = p_remote_node->sw;
170 cl_ntoh64(osm_node_get_node_guid(u->sw->p_node)),
176 current_min_hop = osm_switch_get_least_hops(u->sw, lid);
237 p_sw = u->sw;
259 if (p_remote_physp && p_remote_physp->p_node->sw) {
260 remote_u = p_remote_physp->p_node->sw->priv;
285 static void updn_clear_non_root_hops(updn_t * updn, osm_switch_t * sw)
290 for (i = 0; i < sw->num_hops; i++)
291 if (sw->hops[i]) {
293 if (!port || !port->p_node->sw
294 || ((struct updn_node *)port->p_node->sw->priv)->
296 memset(sw->hops[i], 0xff, sw->num_ports);
387 static struct updn_node *create_updn_node(osm_switch_t * sw)
395 u->sw = sw;
396 u->id = cl_ntoh64(osm_node_get_node_guid(sw->p_node));
403 u->sw->priv = NULL;
442 if (!p_port->p_node->sw) {
444 if (!p_physp || !p_physp->p_node->sw)
513 osm_switch_t *sw = (osm_switch_t *)item;
514 if (!((struct updn_node *)sw->priv)->rank)
516 cl_ntoh64(osm_node_get_node_guid(sw->p_node)));
522 osm_switch_t *sw;
526 sw = osm_get_switch_by_guid(&osm->subn, cl_hton64(guid));
527 if (!sw) {
543 ((struct updn_node *)sw->priv)->id = id;
551 osm_switch_t *sw;
553 sw = osm_get_switch_by_guid(&updn->p_osm->subn, cl_hton64(guid));
554 if (!sw) {
563 ((struct updn_node *)sw->priv)->rank = 0;