UMAD_GET_CA(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 β€” the umad_get_ca(3) page, bestie edition πŸ’–

okay so we're in the OpenIB Programmer's Manual section 3, and today's main characters are umad_get_ca and umad_release_ca. no cap, this is the glow-up your InfiniBand device attributes deserved. πŸ¦‹


✨ NAME ✨

umad_get_ca, umad_release_ca β€” get and release InfiniBand device port attributes πŸŽ€


✨ SYNOPSIS ✨

#include <infiniband/umad.h>

int umad_get_ca(char *ca_name, umad_ca_t *ca);

int umad_release_ca(umad_ca_t *ca);

✨ DESCRIPTION ✨

so umad_get_ca() literally goes and gets the attributes of the InfiniBand device called ca_name. it fills in that ca structure with the device attributes that ca_name points at β€” or, and this is the iconic part, with the default device attributes if ca_name is NULL. lowkey a serve. πŸ’…

then umad_release_ca() β€” you have GOT to call it before the ca structure gets deallocated. that's the vibe check. don't skip it. πŸ™ˆ

the argument ca is an umad_ca_t struct, exactly as specified in <infiniband/umad.h>. here she is in all her glory:

typedef struct umad_ca {
        char ca_name[UMAD_CA_NAME_LEN];                 /* Name of the device */
        uint node_type;                                 /* Type of the device */
        int numports;                                   /* Number of physical ports */
        char fw_ver[20];                                /* FW version */
        char ca_type[40];                               /* CA type (e.g. MT23108, etc.) */
        char hw_ver[20];                                /* Hardware version */
        uint64_t node_guid;                             /* Node GUID */
        uint64_t system_guid;                           /* System image GUID */
        umad_port_t *ports[UMAD_CA_MAX_PORTS];          /* Array of device port properties */
} umad_ca_t;

and fr fr: umad_release_ca() releases the resources that were allocated back in umad_get_ca(). that's the whole point of her. it's giving cleanup era. 🧚


✨ RETURN VALUE ✨

both umad_get_ca() and umad_release_ca() return 0 on success, and a negative value on error. simple as that, periodt. ⭐


✨ AUTHORS ✨

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

and that's the page, bestie!! this was the OpenIB manual, dated May 21, 2007, and the page itself is UMAD_GET_CA(3) β€” yes the title and the footer said the same thing, iconic behaviour honestly. go call umad_release_ca(), drink some water, and slay the rest of your day. πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from