opensm: added function that dumps PathRecords
PATCH 1/4 opensm: added function that dumps PathRecords
Dumping SL, MTU and Rate for all the
non-switch-2-non-switch paths in the subnet.
PRs that are dumped:
for every non-switch source port
for every non-switch target LID in the subnet
dump PR between source port and target LID
This way number of sources is equal to number of physical non-switch ports in the subnet, and only number of targets depends on LMC that is used.
--- opensm/include/opensm/osm_sa.h | 21 +++++++++ opensm/opensm/osm_sa.c | 81 ++++++++++++++++++++++++++++++++++++ opensm/opensm/osm_sa_path_record.c | 12 +++++ 3 files changed, 114 insertions(+), 0 deletions(-)
opensm/include/opensm/osm_sa.h +21 -0
@@ -462,6 +462,27 @@ int osm_sa_db_file_load(struct osm_opensm *p_osm);* *********/ +/****f* OpenSM: SA/osm_sa_path_records_file_dump +* NAME +* osm_sa_path_records_file_dump +* +* DESCRIPTION +* Dumps the SA Path Records to the dump file. +* +* SYNOPSIS +*/ +int osm_sa_path_records_file_dump (struct osm_opensm *p_osm); +/* +* PARAMETERS +* p_osm +* [in] Pointer to an osm_opensm_t object. +* +* RETURN VALUES +* 0 on success +* !0 if some error occurred. +* +*********/ +/****f* OpenSM: MC Member Record Receiver/osm_mcmr_rcv_find_or_create_new_mgrp * NAME * osm_mcmr_rcv_find_or_create_new_mgrp
opensm/opensm/osm_sa.c +81 -0
87 lines not on this page · raw message
opensm/opensm/osm_sa_path_record.c +12 -0
@@ -743,6 +743,18 @@ Exit:return status; } +ib_api_status_t osm_get_path_params(IN osm_sa_t * sa, + IN const osm_port_t * p_src_port, + IN const osm_port_t * p_dest_port, + IN const uint16_t dlid_ho, + OUT osm_path_parms_t * p_parms) +{ +ib_path_rec_t pr; +memset (&pr,0 ,sizeof (ib_path_rec_t)); +return pr_rcv_get_path_parms (sa, &pr, + p_src_port, p_dest_port, dlid_ho,0 , p_parms); +} + static void pr_rcv_build_pr(IN osm_sa_t * sa, IN const osm_port_t * p_src_port, IN const osm_port_t * p_dest_port, IN const ib_gid_t * p_dgid,
Signature · 6 lines
1.5.1.4 -- 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
A message that is not in the archive (sent off-list or not yet received): 4BBDDA1E.7030102-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Hi Yevgeny,
Quoted 15 lines · Yevgeny Kliteynik
Dumping SL, MTU and Rate for all the
non-switch-2-non-switch paths in the subnet.PRs that are dumped:
for every non-switch source port
for every non-switch target LID in the subnet
dump PR between source port and target LIDThis way number of sources is equal to number of physical non-switch ports in the subnet, and only number of targets depends on LMC that is used.
Signed-off-by Yevgeny Kliteynik <[email protected]>---
[snip]
Quoted 36 lines
opensm/include/opensm/osm_sa.h +1
-0+/****f* OpenSM: MC Member Record Receiver/osm_mcmr_rcv_find_or_create_new_mgrp * NAME * osm_mcmr_rcv_find_or_create_new_mgrp opensm/opensm/osm_sa.c +24
-0@@ -718,6 +718,87 @@ int osm_sa_db_file_dump(osm_opensm_t * p_osm)return res; } +typedef struct _path_parms { +ib_net16_t pkey; +uint8_t mtu; +uint8_t rate; +uint8_t sl; +uint8_t pkt_life; +boolean_t reversible; +}path_parms_t ; + +extern ib_api_status_t osm_get_path_params(IN osm_sa_t * sa, + IN const osm_port_t * p_src_port, + IN const osm_port_t * p_dest_port, + IN const uint16_t dlid_ho, + OUT path_parms_t * p_parms); + +static void sa_dump_path_records (osm_opensm_t * p_osm,FILE * file) +{ +osm_port_t *p_src_port; +osm_port_t *p_dest_port; +osm_node_t *p_node; +uint16_t dlid_ho; +uint32_t vector_size; +osm_physp_t *p_physp; +path_parms_t path_parms;
opensm/opensm/osm_sa.c int osm_sa_db_file_dump(osm_opensm_t * p_osm) · line 754
Quoted 10 lines
opensm/opensm/osm_sa.c +10
-0+ib_api_status_t status; + + vector_size =cl_ptr_vector_get_size (&p_osm->subn.port_lid_tbl); +for (p_src_port = (osm_port_t *)cl_qmap_head (&p_osm->subn.port_guid_tbl); + p_src_port != (osm_port_t *)cl_qmap_end (&p_osm->subn.port_guid_tbl); + p_src_port = (osm_port_t *)cl_qmap_next (&p_src_port->map_item)) { + + p_node = p_src_port->p_node; +if (p_node->node_info.node_type ==IB_NODE_TYPE_SWITCH ) +return ;
- return;
+ continue;
Otherwise we stop dumping at the first switch we encounter?
-- Jim
--
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
A message that is not in the archive (sent off-list or not yet received): 1271283366.4092.145.camel-mgfCWIlwujvg4c9jKm7R2O1ftBKYq+Ku@public.gmane.org
Hi Jim,
Quoted 18 lines · Jim Schutt
Hi Yevgeny,
Quoted 15 lines · Yevgeny Kliteynik
Dumping SL, MTU and Rate for all the
non-switch-2-non-switch paths in the subnet.PRs that are dumped:
for every non-switch source port
for every non-switch target LID in the subnet
dump PR between source port and target LIDThis way number of sources is equal to number of physical non-switch ports in the subnet, and only number of targets depends on LMC that is used.
Signed-off-by Yevgeny Kliteynik<[email protected]>---
[snip]
Quoted 8 lines
Quoted 3 lines
opensm/opensm/osm_sa.c +3
-0+ p_node = p_src_port->p_node; +if (p_node->node_info.node_type ==IB_NODE_TYPE_SWITCH ) +return ;(quoted diff) +1
-1- return; + continue;Otherwise we stop dumping at the first switch we encounter?
Correct, thanks :)
-- Yevgeny
Quoted 9 lines
-- Jim
--
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
--
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