1IBND_DISCOVER_FABRIC(3) OpenIB Programmer's Manual IBND_DISCOVER_FABRIC(3)
2
3
4
6 ibnd_discover_fabric, ibnd_destroy_fabric, ibnd_debug
7 ibnd_show_progress - initialize ibnetdiscover library.
8
10 #include <infiniband/ibnetdisc.h>
11
12 ibnd_fabric_t *ibnd_discover_fabric(struct ibmad_port *ibmad_port, int timeout_ms, ib_portid_t *from, int hops)
13 void ibnd_destroy_fabric(ibnd_fabric_t *fabric)
14 void ibnd_debug(int i)
15 void ibnd_show_progress(int i)
16 int ibnd_set_max_smps_on_wire(int i)
17
19 ibnd_discover_fabric() Discover the fabric connected to the port speci‐
20 fied by ibmad_port, using a timeout specified. The "from" and "hops"
21 parameters are optional and allow one to scan part of a fabric by spec‐
22 ifying a node "from" and a number of hops away from that node to scan,
23 "hops". This gives the user a "sub-fabric" which is "centered" any‐
24 where they chose.
25
26 ibmad_port must be opened with at least IB_SMI_CLASS and
27 IB_SMI_DIRECT_CLASS classes for ibnd_discover_fabric to work.
28
29 ibnd_destroy_fabric() free all memory and resources associated with the
30 fabric.
31
32 ibnd_debug() Set the debug level to be printed as library operations
33 take place.
34
35 ibnd_show_progress() Indicate that the library should print debug out‐
36 put which shows it's progress through the fabric.
37
38 ibnd_set_max_smps_on_wire() Set the number of SMP's which will be
39 issued on the wire simultaneously.
40
41
43 ibnd_discover_fabric() return NULL on failure, otherwise a valid
44 ibnd_fabric_t object.
45
46 ibnd_destory_fabric(), ibnd_debug() NONE
47
48 ibnd_set_max_smps_on_wire() The previous value is returned
49
50
52 Discover the entire fabric connected to device mthca0 , port 1.
53
54 int mgmt_classes[2] = {IB_SMI_CLASS, IB_SMI_DIRECT_CLASS};
55 struct ibmad_port *ibmad_port = mad_rpc_open_port(ca, ca_port,
56 mgmt_classes, 2); ibnd_fabric_t *fabric = ibnd_discover_fab‐
57 ric(ibmad_port, 100, NULL, 0); ... ibnd_destroy_fabric(fab‐
58 ric); mad_rpc_close_port(ibmad_port);
59
60 Discover only a single node and those nodes connected to it.
61
62 ... str2drpath(&(port_id.drpath), from, 0, 0); ...
63 ibnd_discover_fabric(ibmad_port, 100, &port_id, 1); ...
64
66 libibmad, mad_rpc_open_port
67
69 Ira Weiny <weiny2@llnl.gov>
70
71
72
73OpenIB July 25, 2008 IBND_DISCOVER_FABRIC(3)