IBND_DISCOVER_FABRIC(3)
β¨ IBND_DISCOVER_FABRIC β¨
okay bestie so this is from the OpenIB Programmer's Manual, and it's literally the whole ibnetdiscover library glow-up. manual page name is IBND_DISCOVER_FABRIC(3), in case you were wondering π«Ά
π NAME π
ibnd_discover_fabric, ibnd_destroy_fabric, ibnd_debug ibnd_show_progress β initialize the ibnetdiscover library. that's it, that's the job, no cap β¨
π SYNOPSIS π
#include <infiniband/ibnetdisc.h>
ibnd_fabric_t *ibnd_discover_fabric(struct ibmad_port *ibmad_port, int timeout_ms, ib_portid_t *from, int hops)
void ibnd_destroy_fabric(ibnd_fabric_t *fabric)
void ibnd_debug(int i)
void ibnd_show_progress(int i)
int ibnd_set_max_smps_on_wire(int i)
π¦ DESCRIPTION π¦
ibnd_discover_fabric() π
so this one goes out and discovers the fabric connected to the port you hand it in ibmad_port, using the timeout you specified. it's giving main character energy fr fr.
the "from" and "hops" parameters are optional and they let you scan just a part of a fabric β you say "start at this node "from"" and "go this many "hops" away from it" and boom π₯. what you get back is a "sub-fabric" that's "centered" literally wherever you felt like choosing. iconic behavior honestly.
β οΈ heads up bestie:ibmad_portmust be opened with at leastIB_SMI_CLASSandIB_SMI_DIRECT_CLASSclasses oribnd_discover_fabricwill simply not work. not optional. periodt.
ibnd_destroy_fabric() π§Ή
frees all memory and resources associated with the fabric. clean up after yourself, bestie, we don't leave mess π
ibnd_debug() π
sets the debug level that gets printed while library operations are taking place. turn it up if you want the tea β
ibnd_show_progress() π
tells the library "yes queen, print debug output showing your progress through the fabric." you get to watch it vibe its way node by node π
ibnd_set_max_smps_on_wire() π‘
sets the number of SMP's that will be issued on the wire simultaneously. more at once = more chaos, your call.
π₯ RETURN VALUE π₯
ibnd_discover_fabric()β returnsNULLon failure, otherwise you get a validibnd_fabric_tobject. slay β¨ibnd_destory_fabric(),ibnd_debug()βNONE(yes,ibnd_destory_fabric, that's literally how it's spelled up in here, we don't make the rules π)ibnd_set_max_smps_on_wire()β the previous value is returned
πΈ EXAMPLES πΈ
discover the entire fabric connected to device mthca0 , port 1 π
int mgmt_classes[2] = {IB_SMI_CLASS, IB_SMI_DIRECT_CLASS};
struct ibmad_port *ibmad_port = mad_rpc_open_port(ca, ca_port,
mgmt_classes, 2); ibnd_fabric_t *fabric =
ibnd_discover_fabric(ibmad_port, 100, NULL, 0); ...
ibnd_destroy_fabric(fabric); mad_rpc_close_port(ibmad_port);
discover only a single node and those nodes connected to it π¦
... str2drpath(&(port_id.drpath), from, 0, 0); ...
ibnd_discover_fabric(ibmad_port, 100, &port_id, 1); ...
β SEE ALSO β
libibmad, mad_rpc_open_port β go read those too, iykyk π
π AUTHORS π
Ira Weiny <weiny2@llnl.gov> β thank you for your service, legend π«Ά
that's the whole page bestie, go discover a fabric and be iconic about it πβ¨
OpenIB Β· July 25, 2008 Β· IBND_DISCOVER_FABRIC(3) β mwah, signing off π
π
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: libibnetdisc-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibnetdisc-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: libibnetdisc-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibnetdisc-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibnetdisc-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibnetdisc-dev 56.1-1ubuntu1
- ubuntu resolute: libibnetdisc-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibnetdisc-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms