UMAD_REGISTER2(3)

πŸ“¦
version 65.0 Β· 2 versions
  • 65.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.3.10.2 Β· nixos 26.05, nixpkgs unstable
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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_id identifies 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 in umad_send when 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 to 0 will result in the agent only receiving response MADs for which a request was sent πŸ‘€
  • oui β€” the oui (in host order) to use for vendor classes 0x30 - 0x4f. otherwise ignored πŸ“
  • rmpp_version β€” if the class supports RMPP and kernel RMPP is enabled (the default), indicate which rmpp_version to 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 🌈


πŸ’œ 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