UMAD_REGISTER2(3)
β¨ UMAD_REGISTER2 β¨
okay bestie, welcome to the umad_register2(3) page from the OpenIB Programmer's Manual π this is the one that registers a management class + version for a port, and it's giving very important plumbing energy. let's get into it π«Ά
πΈ NAME πΈ
umad_register2 β register the specified management class and version for port π
π¦ SYNOPSIS π¦
#include <infiniband/umad.h>
int umad_register2(int port_fd, struct umad_reg_attr *attr, uint32_t *agent_id);
π DESCRIPTION π
so basically, umad_register2() registers for a MAD agent using the registration attributes you hand it. no cap. π₯
port_fdβ the port on which to register the agent πattrβ the registration attributes, as defined by the structure you pass in. the deets on that structure are right below, bestie πagent_idβ returned on success β¨agent_ididentifies the kernel MAD agent that a MAD is received by or is to be sent by. it comes back in the umad header"struct ib_user_mad"on recv, and you specify it inumad_sendwhen sending. iykyk π«
π REGISTRATION ATTRIBUTE STRUCTURE π
struct umad_reg_attr {
uint8_t mgmt_class;
uint8_t mgmt_class_version;
uint32_t flags;
uint64_t method_mask[2];
uint32_t oui;
uint8_t rmpp_version;
};
mgmt_classβ management class to register for πmgmt_class_versionβ management class version to register for πflagsβ registration flags. okay so here's the tea: if a flag you specified is not supported by the kernel, an error is returned, and the supported flags come back in this field. π
current flags are:
UMAD_USER_RMPPβ flag to indicate the kernel should not process RMPP packets. all RMPP packets will be treated like individual MADs. the user is responsible for implementing the RMPP protocol. no pressure, bestie π
method_maskβ a bit mask which indicates which unsolicited methods this agent should receive. setting this array to0will result in the agent only receiving response MADs for which a request was sent πouiβ the oui (in host order) to use for vendor classes0x30-0x4f. otherwise ignored πrmpp_versionβ if the class supports RMPP and kernel RMPP is enabled (the default), indicate whichrmpp_versionto use β
π« RETURN VALUE π«
umad_register2() returns 0 on success and +ERRNO on failure. slay when it's 0, sad girl hours when it's not π
π SEE ALSO π
umad_unregister(3)β the breakup page, go say bye to your agent π
π AUTHOR π
Ira Weiny <ira.weiny@intel.com> β iconic behavior, honestly π
and that's the whole page, bestie!! this one was written by the OpenIB crew, and the version you're looking at is dated March 25, 2014 β yeah she's an elder but she still serves π β¨ go register something and be the main character of your own MAD agent ππ¦
π¦ 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: libibumad-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibumad-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: libibumad-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibumad-dev 56.1-1ubuntu1
- ubuntu resolute: libibumad-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibumad-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