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