UMAD_GET_CA_PORTGUIDS(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_GET_CA_PORTGUIDS πŸ’–

okay bestie, welcome to the OpenIB Programmer's Manual page for umad_get_ca_portguids (that's section 3, the library-calls girlies ✨). grab a strawberry πŸ“, we're getting port GUIDs.


🌸 NAME 🌸

umad_get_ca_portguids β€” the one that gets you the InfiniBand device ports GUIDs. yes, plural. multiple. a whole squad of GUIDs. πŸ’…


✨ SYNOPSIS ✨

#include <infiniband/umad.h>

int umad_get_ca_portguids(char *ca_name, __be64 *portguids, int max);

look at her. three little arguments. iconic. no cap. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, fr fr: umad_get_ca_portguids() fills the portguids array with up to max port GUIDs, and those GUIDs belong to the IB device you named in ca_name. 🫢

and if you pass ca_name as NULL? no worries bestie, it just uses the default IB device instead. main character energy, honestly.

okay and important β€” the portguids argument is an array of max uint64_t entries. so like, that's your buffer, that's your capacity, be responsible with it. 🧚


πŸ‘‘ RETURN VALUE πŸ‘‘

on success, umad_get_ca_portguids() returns a non-negative value that equals the number of port GUIDs it actually filled. slay. βœ…

⚠️ but NOT all the filled entries may be valid, bestie. invalid entries will be 0. so don't just trust every slot, okay?? πŸ’€

for example β€” and this is the part that trips people up β€” on a CA node with only one port, this function returns a value of 2. yep, two. not one. the value at index 0 will be invalid, because it's reserved for switches. so the count is the count, not the number of valid entries. iykyk. 😭

on failure, a negative value is returned. that's it, that's the whole vibe check. πŸ™ˆ


🌈 SEE ALSO 🌈


πŸ’ AUTHORS πŸ’

  • Hal Rosenstock <halr@voltaire.com>
  • Dotan Barak <dotanb@mellanox.co.il>

give them their flowers, they wrote this and they ate. πŸ‘‘


that's the whole page bestie, thanks for reading!! this gem came to you from OpenIB, dated August 8, 2016 🌸 β€” and yes, it lives at UMAD_GET_CA_PORTGUIDS(3) in case you need to find her again. mwah. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from