UMAD_REGISTER(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_REGISTER πŸ’–

okay bestie, welcome to the umad_register page from the OpenIB Programmer's Manual β€” yes, that OpenIB, the one that lives in your 3 section and is about to make your whole MAD game make sense ✨


🌸 NAME 🌸

umad_register β€” registering the specified management class and version for a port, periodt πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <infiniband/umad.h>

int umad_register(int portid, int mgmt_class, int mgmt_version , uint8_t rmpp_version, long method_mask[16/sizeof(long)]);

like. look at that signature. she's giving exactly what she needs to give 🫢


✨ DESCRIPTION ✨

so here's the tea, bestie πŸ“

umad_register() registers the management class you picked, the management version you picked, and whether RMPP is being used β€” all for the port that the portid parameter is pointing at. literally all in one call, we love a multitasker πŸ‘‘

now, the method_mask array is where the plot thickens:

  • if you do pass in a method_mask array, you get registered as a replier (server) for every method that has its corresponding bit turned on in that method_mask. iconic. main character energy.
  • if method_mask is NULL, you get registered as a MAD client instead, which means the only MADs you'll ever receive are replies to the MADs you sent β€” aka solicited MADs. no unsolicited drop-ins in your DMs, ngl πŸ™ˆ

πŸ’€ RETURN VALUE πŸ’€

on success, umad_register() hands you back a non-negative agent id number πŸŽ€ (yes, an actual id, she came through).

on error, you get a negative value, and it means one of these:

  • -EINVAL β€” invalid port handle 😭
  • -EPERM β€” registration failed πŸ’”
fr fr, check your return value. a negative number here is not a vibe.

πŸ‘‘ SEE ALSO πŸ‘‘

iykyk, go read them next πŸ’œ


🌈 AUTHOR 🌈

Hal Rosenstock <halr@voltaire.com> β€” we stan a legend 🫢✨


and that's the whole page, bestie!! this one came straight outta the OpenIB crew, dated May 11, 2007, and it's filed under UMAD_REGISTER(3) in your manual β€” go forth and register responsibly πŸ’…πŸŒΈπŸ’–

πŸ“¦ where this page comes from