Home
last modified time | relevance | path

Searched refs:p_sw (Results 1 – 24 of 24) sorted by relevance

/trueos/contrib/ofed/management/opensm/opensm/
HDosm_switch.c56 osm_switch_set_hops(IN osm_switch_t * const p_sw, in osm_switch_set_hops() argument
60 if (lid_ho > p_sw->max_lid_ho) in osm_switch_set_hops()
62 if (!p_sw->hops[lid_ho]) { in osm_switch_set_hops()
63 p_sw->hops[lid_ho] = malloc(p_sw->num_ports); in osm_switch_set_hops()
64 if (!p_sw->hops[lid_ho]) in osm_switch_set_hops()
66 memset(p_sw->hops[lid_ho], OSM_NO_PATH, p_sw->num_ports); in osm_switch_set_hops()
69 p_sw->hops[lid_ho][port_num] = num_hops; in osm_switch_set_hops()
70 if (p_sw->hops[lid_ho][0] > num_hops) in osm_switch_set_hops()
71 p_sw->hops[lid_ho][0] = num_hops; in osm_switch_set_hops()
79 osm_switch_init(IN osm_switch_t * const p_sw, in osm_switch_init() argument
[all …]
HDosm_ucast_ftree.c116 struct ftree_sw_t_ *p_sw; member
141 struct ftree_sw_t_ *p_sw; member
252 p_sw), in __osm_ftree_compare_port_groups_by_remote_switch_index()
254 p_sw)); in __osm_ftree_compare_port_groups_by_remote_switch_index()
328 p_sw) in __osm_ftree_sw_tbl_element_create()
336 p_element->p_sw = p_sw; in __osm_ftree_sw_tbl_element_create()
418 p_group->hca_or_sw.p_sw = (ftree_sw_t *) p_hca_or_sw; in __osm_ftree_port_group_create()
432 p_group->remote_hca_or_sw.p_sw = in __osm_ftree_port_group_create()
539 ftree_sw_t *p_sw; in __osm_ftree_sw_create() local
546 p_sw = (ftree_sw_t *) malloc(sizeof(ftree_sw_t)); in __osm_ftree_sw_create()
[all …]
HDosm_ucast_cache.c83 static uint16_t __cache_sw_get_base_lid_ho(cache_switch_t * p_sw) in __cache_sw_get_base_lid_ho() argument
85 return p_sw->ports[0].remote_lid_ho; in __cache_sw_get_base_lid_ho()
91 static boolean_t __cache_sw_is_leaf(cache_switch_t * p_sw) in __cache_sw_is_leaf() argument
93 return p_sw->ports[0].is_leaf; in __cache_sw_is_leaf()
99 static void __cache_sw_set_leaf(cache_switch_t * p_sw) in __cache_sw_set_leaf() argument
101 p_sw->ports[0].is_leaf = TRUE; in __cache_sw_set_leaf()
129 static void __cache_sw_destroy(cache_switch_t * p_sw) in __cache_sw_destroy() argument
131 if (!p_sw) in __cache_sw_destroy()
134 if (p_sw->lft) in __cache_sw_destroy()
135 free(p_sw->lft); in __cache_sw_destroy()
[all …]
HDosm_sw_info_rcv.c62 __osm_si_rcv_get_port_info(IN osm_sm_t * sm, IN osm_switch_t * const p_sw) in __osm_si_rcv_get_port_info() argument
73 CL_ASSERT(p_sw); in __osm_si_rcv_get_port_info()
75 p_node = p_sw->p_node; in __osm_si_rcv_get_port_info()
111 __osm_si_rcv_get_fwd_tbl(IN osm_sm_t * sm, IN osm_switch_t * const p_sw)
123 CL_ASSERT(p_sw);
125 p_node = p_sw->p_node;
132 max_block_id_ho = osm_switch_get_max_block_id_in_use(p_sw);
158 __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm, IN osm_switch_t * const p_sw)
174 CL_ASSERT(p_sw);
176 p_node = p_sw->p_node;
[all …]
HDosm_ucast_file.c79 osm_switch_t * p_sw, uint16_t lid, uint8_t port_num, in add_path() argument
86 old_port = osm_switch_get_port_by_lid(p_sw, new_lid); in add_path()
91 cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)), in add_path()
95 p_sw->new_lft[new_lid] = port_num; in add_path()
98 osm_switch_count_path(p_sw, port_num); in add_path()
104 cl_ntoh64(osm_node_get_node_guid(p_sw->p_node))); in add_path()
107 static void add_lid_hops(osm_opensm_t * p_osm, osm_switch_t * p_sw, in add_lid_hops() argument
115 if (len > p_sw->num_ports) in add_lid_hops()
116 len = p_sw->num_ports; in add_lid_hops()
119 osm_switch_set_hops(p_sw, lid, i, hops[i]); in add_lid_hops()
[all …]
HDosm_mcast_mgr.c136 const osm_switch_t * const p_sw) in osm_mcast_mgr_compute_avg_hops() argument
173 hops += osm_switch_get_port_least_hops(p_sw, p_port); in osm_mcast_mgr_compute_avg_hops()
196 const osm_switch_t * const p_sw) in osm_mcast_mgr_compute_max_hops() argument
232 hops = osm_switch_get_port_least_hops(p_sw, p_port); in osm_mcast_mgr_compute_max_hops()
259 const osm_switch_t *p_sw; in __osm_mcast_mgr_find_optimal_switch() local
275 for (p_sw = (osm_switch_t *) cl_qmap_head(p_sw_tbl); in __osm_mcast_mgr_find_optimal_switch()
276 p_sw != (osm_switch_t *) cl_qmap_end(p_sw_tbl); in __osm_mcast_mgr_find_optimal_switch()
277 p_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item)) { in __osm_mcast_mgr_find_optimal_switch()
278 if (!osm_switch_supports_mcast(p_sw)) in __osm_mcast_mgr_find_optimal_switch()
282 hops = osm_mcast_mgr_compute_avg_hops(sm, p_mgrp, p_sw); in __osm_mcast_mgr_find_optimal_switch()
[all …]
HDosm_ucast_mgr.c113 osm_switch_t *const p_sw = (osm_switch_t *) p_map_item; in __osm_ucast_mgr_process_hop_0_1() local
118 lid = osm_node_get_base_lid(p_sw->p_node, 0); in __osm_ucast_mgr_process_hop_0_1()
120 osm_switch_set_hops(p_sw, lid, 0, 0); in __osm_ucast_mgr_process_hop_0_1()
122 for (i = 1; i < p_sw->num_ports; i++) { in __osm_ucast_mgr_process_hop_0_1()
124 osm_node_get_remote_node(p_sw->p_node, i, &remote_port); in __osm_ucast_mgr_process_hop_0_1()
127 (p_remote_node != p_sw->p_node)) { in __osm_ucast_mgr_process_hop_0_1()
130 osm_switch_set_hops(p_sw, remote_lid, i, 1); in __osm_ucast_mgr_process_hop_0_1()
146 osm_switch_t *p_sw, *p_next_sw; in __osm_ucast_mgr_process_neighbor() local
162 p_sw = p_next_sw; in __osm_ucast_mgr_process_neighbor()
163 p_next_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item); in __osm_ucast_mgr_process_neighbor()
[all …]
HDosm_ucast_updn.c111 IN osm_switch_t * p_sw) in updn_bfs_by_node() argument
121 lid = osm_node_get_base_lid(p_sw->p_node, 0); in updn_bfs_by_node()
123 osm_switch_set_hops(p_sw, lid, 0, 0); in updn_bfs_by_node()
127 cl_ntoh64(p_sw->p_node->node_info.port_guid), lid); in updn_bfs_by_node()
129 u = p_sw->priv; in updn_bfs_by_node()
212 osm_switch_t *p_sw; in updn_subn_rank() local
228 p_sw = (osm_switch_t *)item; in updn_subn_rank()
229 u = p_sw->priv; in updn_subn_rank()
238 p_sw = u->sw; in updn_subn_rank()
239 num_ports = p_sw->num_ports; in updn_subn_rank()
[all …]
HDosm_mtree.c54 IN const osm_switch_t * const p_sw) in osm_mtree_node_init() argument
59 CL_ASSERT(p_sw); in osm_mtree_node_init()
63 p_mtn->p_sw = (osm_switch_t *) p_sw; in osm_mtree_node_init()
64 p_mtn->max_children = p_sw->num_ports; in osm_mtree_node_init()
72 osm_mtree_node_t *osm_mtree_node_new(IN const osm_switch_t * const p_sw) in osm_mtree_node_new() argument
77 sizeof(void *) * (p_sw->num_ports - 1)); in osm_mtree_node_new()
80 osm_mtree_node_init(p_mtn, p_sw); in osm_mtree_node_new()
114 cl_ntoh64(p_mtn->p_sw->p_node->node_info.node_guid),
HDosm_dump.c69 osm_switch_t *p_sw = (osm_switch_t *) p_map_item; in dump_ucast_path_distribution() local
71 p_node = p_sw->p_node; in dump_ucast_path_distribution()
72 num_ports = p_sw->num_ports; in dump_ucast_path_distribution()
79 num_paths = osm_switch_path_count_get(p_sw, i); in dump_ucast_path_distribution()
126 osm_switch_t *p_sw = (osm_switch_t *) p_map_item; in dump_ucast_routes() local
129 p_node = p_sw->p_node; in dump_ucast_routes()
131 max_lid_ho = p_sw->max_lid_ho; in dump_ucast_routes()
148 port_num = osm_switch_get_port_by_lid(p_sw, lid_ho); in dump_ucast_routes()
171 osm_switch_get_hop_count(p_sw, base_lid, port_num); in dump_ucast_routes()
176 osm_switch_get_hop_count(p_sw, lid_ho, port_num); in dump_ucast_routes()
[all …]
HDosm_sa_mft_record.c74 IN osm_switch_t * const p_sw, in __osm_mftr_rcv_new_mftr() argument
96 cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)), in __osm_mftr_rcv_new_mftr()
108 osm_switch_get_mft_block(p_sw, block, position, p_rec_item->rec.mft); in __osm_mftr_rcv_new_mftr()
125 osm_switch_t *const p_sw = (osm_switch_t *) p_map_item; in __osm_mftr_rcv_by_comp_mask() local
139 osm_get_port_by_guid(sa->p_subn, p_sw->p_node->node_info.port_guid); in __osm_mftr_rcv_by_comp_mask()
143 "\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_mftr_rcv_by_comp_mask()
154 cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_mftr_rcv_by_comp_mask()
174 if (!osm_switch_supports_mcast(p_sw)) in __osm_mftr_rcv_by_comp_mask()
178 if (osm_switch_get_mft_max_block_in_use(p_sw) == -1) in __osm_mftr_rcv_by_comp_mask()
187 if (max_block > osm_switch_get_mft_max_block_in_use(p_sw)) in __osm_mftr_rcv_by_comp_mask()
[all …]
HDosm_ucast_lash.c88 osm_switch_t *p_sw; member
651 static switch_t *switch_create(lash_t * p_lash, unsigned id, osm_switch_t * p_sw) in switch_create() argument
654 unsigned num_ports = p_sw->num_ports; in switch_create()
705 sw->p_sw = p_sw; in switch_create()
706 if (p_sw) in switch_create()
707 p_sw->priv = sw; in switch_create()
1026 static unsigned get_lash_id(osm_switch_t * p_sw) in get_lash_id() argument
1028 return ((switch_t *) p_sw->priv)->id; in get_lash_id()
1036 osm_switch_t *p_sw, *p_next_sw, *p_dst_sw; in populate_fwd_tbls() local
1048 p_sw = p_next_sw; in populate_fwd_tbls()
[all …]
HDosm_sa_sw_info_record.c74 IN const osm_switch_t * const p_sw, in __osm_sir_rcv_new_sir() argument
96 p_rec_item->rec.switch_info = p_sw->switch_info; in __osm_sir_rcv_new_sir()
109 IN const osm_switch_t * const p_sw, in __osm_sir_rcv_create_sir() argument
128 osm_get_port_by_guid(sa->p_subn, p_sw->p_node->node_info.port_guid); in __osm_sir_rcv_create_sir()
132 "\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_sir_rcv_create_sir()
143 cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_sir_rcv_create_sir()
166 __osm_sir_rcv_new_sir(sa, p_sw, p_list, osm_port_get_base_lid(p_port)); in __osm_sir_rcv_create_sir()
180 const osm_switch_t *const p_sw = (osm_switch_t *) p_map_item; in __osm_sir_rcv_by_comp_mask() local
190 &p_sw->switch_info, OSM_LOG_VERBOSE); in __osm_sir_rcv_by_comp_mask()
198 __osm_sir_rcv_create_sir(sa, p_sw, p_ctxt->p_list, in __osm_sir_rcv_by_comp_mask()
HDosm_sa_lft_record.c74 IN const osm_switch_t * const p_sw, in __osm_lftr_rcv_new_lftr() argument
94 cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)), in __osm_lftr_rcv_new_lftr()
103 osm_switch_get_lft_block(p_sw, block, p_rec_item->rec.lft); in __osm_lftr_rcv_new_lftr()
120 const osm_switch_t *const p_sw = (osm_switch_t *) p_map_item; in __osm_lftr_rcv_by_comp_mask() local
132 p_sw->p_node->node_info.port_guid); in __osm_lftr_rcv_by_comp_mask()
136 "\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_lftr_rcv_by_comp_mask()
147 cl_ntoh64(p_sw->p_node->node_info.node_guid)); in __osm_lftr_rcv_by_comp_mask()
168 max_block = osm_switch_get_max_block_id_in_use(p_sw); in __osm_lftr_rcv_by_comp_mask()
179 __osm_lftr_rcv_new_lftr(sa, p_sw, p_ctxt->p_list, in __osm_lftr_rcv_by_comp_mask()
HDosm_console.c757 osm_switch_t * p_sw, FILE * out, int verbose) in switchbalance_check() argument
794 port_num = osm_switch_get_port_by_lid(p_sw, lid_ho); in switchbalance_check()
802 num_ports = p_sw->num_ports; in switchbalance_check()
804 p_physp = osm_node_get_physp_ptr(p_sw->p_node, port_num); in switchbalance_check()
835 cl_ntoh64(p_sw->p_node->node_info.node_guid), in switchbalance_check()
836 p_sw->p_node->print_desc); in switchbalance_check()
840 cl_ntoh64(p_sw->p_node->node_info.node_guid), in switchbalance_check()
841 p_sw->p_node->print_desc); in switchbalance_check()
855 osm_switch_t *p_sw; in switchbalance_parse() local
879 p_sw = osm_get_switch_by_guid(&p_osm->subn, cl_hton64(guid)); in switchbalance_parse()
[all …]
HDosm_lin_fwd_rcv.c60 osm_switch_t *p_sw; in osm_lft_rcv_process() local
83 p_sw = osm_get_switch_by_guid(sm->p_subn, node_guid); in osm_lft_rcv_process()
85 if (!p_sw) { in osm_lft_rcv_process()
90 status = osm_switch_set_lft_block(p_sw, p_block, block_num); in osm_lft_rcv_process()
HDosm_mcast_fwd_rcv.c67 osm_switch_t *p_sw; in osm_mft_rcv_process() local
99 p_sw = osm_get_switch_by_guid(sm->p_subn, node_guid); in osm_mft_rcv_process()
101 if (!p_sw) { in osm_mft_rcv_process()
106 status = osm_switch_set_mft_block(p_sw, p_block, in osm_mft_rcv_process()
HDosm_drop_mgr.c275 osm_switch_t *p_sw; in __osm_drop_mgr_remove_switch() local
284 p_sw = (osm_switch_t *) cl_qmap_remove(p_sw_guid_tbl, node_guid); in __osm_drop_mgr_remove_switch()
285 if (p_sw == (osm_switch_t *) cl_qmap_end(p_sw_guid_tbl)) { in __osm_drop_mgr_remove_switch()
291 osm_switch_delete(&p_sw); in __osm_drop_mgr_remove_switch()
HDosm_state_mgr.c116 osm_switch_t *p_sw = (osm_switch_t *) p_map_item; in __osm_state_mgr_reset_switch_count() local
118 p_sw->discovery_count = 0; in __osm_state_mgr_reset_switch_count()
119 p_sw->need_update = 1; in __osm_state_mgr_reset_switch_count()
130 osm_switch_t *const p_sw = (osm_switch_t *) p_object; in __osm_state_mgr_get_sw_info() local
136 p_node = p_sw->p_node; in __osm_state_mgr_get_sw_info()
HDosm_subnet.c98 osm_switch_t *p_sw, *p_next_sw; in osm_subn_destroy() local
123 p_sw = p_next_sw; in osm_subn_destroy()
124 p_next_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item); in osm_subn_destroy()
125 osm_switch_delete(&p_sw); in osm_subn_destroy()
HDosm_perfmgr.c727 osm_switch_t *p_sw = (osm_switch_t *) p_map_item; in reset_switch_count() local
728 p_sw->discovery_count = 0; in reset_switch_count()
729 p_sw->need_update = 0; in reset_switch_count()
/trueos/contrib/ofed/management/opensm/include/opensm/
HDosm_switch.h252 osm_switch_get_hop_count(IN const osm_switch_t * const p_sw, in osm_switch_get_hop_count() argument
255 return (lid_ho > p_sw->max_lid_ho || !p_sw->hops[lid_ho]) ? in osm_switch_get_hop_count()
256 OSM_NO_PATH : p_sw->hops[lid_ho][port_num]; in osm_switch_get_hop_count()
287 osm_switch_set_hops(IN osm_switch_t * const p_sw,
321 void osm_switch_clear_hops(IN osm_switch_t * p_sw);
343 osm_switch_get_least_hops(IN const osm_switch_t * const p_sw, in osm_switch_get_least_hops() argument
346 return (lid_ho > p_sw->max_lid_ho || !p_sw->hops[lid_ho]) ? in osm_switch_get_least_hops()
347 OSM_NO_PATH : p_sw->hops[lid_ho][0]; in osm_switch_get_least_hops()
378 osm_switch_get_port_least_hops(IN const osm_switch_t * const p_sw,
409 osm_switch_get_port_by_lid(IN const osm_switch_t * const p_sw, in osm_switch_get_port_by_lid() argument
[all …]
HDosm_mtree.h101 osm_switch_t *p_sw; member
140 osm_mtree_node_t *osm_mtree_node_new(IN const osm_switch_t * const p_sw);
254 return (p_mtn->p_sw); in osm_mtree_node_get_switch_ptr()
HDosm_ucast_mgr.h246 IN osm_switch_t * const p_sw);