infiniband-diags: libibnetdisc add port interface
PATCH 1/3 infiniband-diags: libibnetdisc add port interface
Add ability to find port's based on PortGUID and DRPath
Signed-off-by Ira Weiny <[email protected]>
--- libibnetdisc/include/infiniband/ibnetdisc.h | 11 +++ libibnetdisc/libibnetdisc.ver | 2 +- libibnetdisc/src/ibnetdisc.c | 112 ++++++++++++++++++++------- libibnetdisc/src/libibnetdisc.map | 3 + 4 files changed, 98 insertions(+), 30 deletions(-)
libibnetdisc/include/infiniband/ibnetdisc.h +11 -0
@@ -213,6 +213,17 @@ IBND_EXPORT void ibnd_iter_nodes_type(ibnd_fabric_t * fabric, int node_type, void *user_data);/** ========================================================================= +* Port operations +*/ +IBND_EXPORT ibnd_port_t *ibnd_find_port_guid(ibnd_fabric_t * fabric, +uint64_t guid); +IBND_EXPORT ibnd_port_t *ibnd_find_port_dr(ibnd_fabric_t * fabric, + char *dr_str); +typedef void (*ibnd_iter_port_func_t ) (ibnd_port_t * port,void *user_data); +IBND_EXPORT void ibnd_iter_ports(ibnd_fabric_t * fabric, +ibnd_iter_port_func_t func,void *user_data); + +/** ========================================================================= * Chassis queries */ IBND_EXPORT uint64_t ibnd_get_chassis_guid(ibnd_fabric_t * fabric,
libibnetdisc/libibnetdisc.ver +1 -1
@@ -6,4 +6,4 @@ # API_REV - advance on any added API # RUNNING_REV - advance any change to the vendor files # AGE - number of backward versions the API still supports -LIBVERSION=5:1:0 +LIBVERSION=6:0:1
libibnetdisc/src/ibnetdisc.c +83 -29
123 lines not on this page · raw message
libibnetdisc/src/libibnetdisc.map +3 -0
@@ -14,5 +14,8 @@ IBNETDISC_1.0 { ibnd_get_chassis_slot_str; ibnd_iter_nodes; ibnd_iter_nodes_type; + ibnd_find_port_guid; + ibnd_find_port_dr; + ibnd_iter_ports; local: *; };
Signature · 6 lines
1.7.1 -- 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