opensm/osm_helper: Add osm_dump_guid_info
PATCH 1/1 opensm/osm_helper: Add osm_dump_guid_info
Add routine to dump SM GUIDInfo attribute
---
include/opensm/osm_helper.h +41 -0
@@ -241,6 +241,47 @@ void osm_dump_port_info(IN osm_log_t * p_log, IN ib_net64_t node_guid,* SEE ALSO *********/ +/****f* OpenSM: Helper/osm_dump_guid_info +* NAME +* osm_dump_guid_info +* +* DESCRIPTION +* Dumps the GUIDInfo attribute to the log. +* +* SYNOPSIS +*/ +void osm_dump_guid_info(IN osm_log_t * p_log, IN ib_net64_t node_guid, + IN ib_net64_t port_guid, IN uint8_t block_num, + IN const ib_guid_info_t * p_gi, + IN osm_log_level_t log_level); +/* +* PARAMETERS +* p_log +* [in] Pointer to the osm_log_t object. +* +* node_guid +* [in] Node GUID that owns this port. +* +* port_guid +* [in] Port GUID for this port. +* +* block_num +* [in] Block number. +* +* p_gi +* [in] Pointer to the GUIDInfo attribute. +* +* log_level +* [in] Log verbosity level with which to dump the data. +* +* RETURN VALUES +* None. +* +* NOTES +* +* SEE ALSO +*********/ + void osm_dump_path_record(IN osm_log_t * p_log, IN const ib_path_rec_t * p_pr, IN osm_log_level_t log_level);
opensm/libopensm.map +1 -0
@@ -21,6 +21,7 @@ OPENSM_1.5 { ib_zero_gid; osm_dump_port_info; osm_dump_portinfo_record; + osm_dump_guid_info; osm_dump_guidinfo_record; osm_dump_node_info; osm_dump_node_record;
opensm/osm_helper.c +28 -1
@@ -1,6 +1,6 @@/* * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. -* Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved. +* Copyright (c) 2002-2010 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
@@ -934,6 +934,33 @@ void osm_dump_portinfo_record(IN osm_log_t * p_log, } } +void osm_dump_guid_info(IN osm_log_t * p_log, IN ib_net64_t node_guid, + IN ib_net64_t port_guid, IN uint8_t block_num, + IN const ib_guid_info_t * p_gi, + IN osm_log_level_t log_level) +{ +if (osm_log_is_active (p_log, log_level)) { +osm_log (p_log, log_level, +"GUIDInfo dump:\n" +"\t\t\t\tblock number............%u\n" +"\t\t\t\tnode_guid...............0x%016" PRIx64"\n" +"\t\t\t\tport_guid...............0x%016" PRIx64"\n" +"\t\t\t\tGUID 0..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 1..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 2..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 3..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 4..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 5..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 6..................0x%016" PRIx64"\n" +"\t\t\t\tGUID 7..................0x%016" PRIx64"\n" , + block_num,cl_ntoh64 (node_guid),cl_ntoh64 (port_guid), +cl_ntoh64 (p_gi->guid[0 ]),cl_ntoh64 (p_gi->guid[1 ]), +cl_ntoh64 (p_gi->guid[2 ]),cl_ntoh64 (p_gi->guid[3 ]), +cl_ntoh64 (p_gi->guid[4 ]),cl_ntoh64 (p_gi->guid[5 ]), +cl_ntoh64 (p_gi->guid[6 ]),cl_ntoh64 (p_gi->guid[7 ])); + } +} + void osm_dump_guidinfo_record(IN osm_log_t * p_log, IN const ib_guidinfo_record_t * p_gir, IN osm_log_level_t log_level)
--
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