UMAD_OPEN_PORT(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_OPEN_PORT ✨

okay bestie, gather round, because today we're opening an InfiniBand device port for umad access and it's genuinely not that deep πŸ’… this little function lives in the OpenIB Programmer's Manual and it's the glow-up your HPC code has been waiting for.


🌸 NAME 🌸

umad_open_port β€” open an InfiniBand device port so you can do umad things with it πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <infiniband/umad.h>

int umad_open_port(char *ca_name, int portnum);

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: umad_open_port() opens port portnum of the IB device ca_name for umad access. That's it. That's the whole job. She's a simple girl with a simple dream πŸ™ˆ

And like, if you don't hand over all the parameters? No stress. The library will pick the port for you β€” it's giving very "I got you, bestie" energy. (The deets on how that selection actually works live over in umad_get_port(), so go peek there if you're nosy. πŸ‘€)


⭐ RETURN VALUE ⭐

On success you get 0 or a unique positive value β€” that's your umad device descriptor, your little ticket to ride 🎟️✨

On error you get a negative value, and which negative value is honestly a whole mood board:

  • -EOPNOTSUPP β€” the ABI version doesn't match 😭 they're not on the same wavelength, it's giving incompatible
  • -ENODEV β€” the IB device can't be resolved πŸ’€ can't find her anywhere
  • -EINVAL β€” the port is not valid (bad portnum or no umad device) 🚫 nope, not it
  • -EIO β€” the umad device for this port can't be opened πŸ˜” so close and yet so far
lowkey check your return values, bestie. negative means something went wrong and the kernel is NOT being subtle about it.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Hal Rosenstock <halr@voltaire.com> β€” an actual icon, we stan 🌈


and that's the whole page, periodt πŸ’œ this beauty shipped as part of OpenIB back on May 21, 2007, and the manual name is UMAD_OPEN_PORT in section 3 β€” so if you ever forget, just man 3 umad_open_port and she'll be right there waiting for you. mwah πŸ’‹

πŸ“¦ where this page comes from