UMAD_GET_MAD_ADDR(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_MAD_ADDR ✨

okay so bestie, we're in the OpenIB Programmer's Manual today and the page we're vibing with is UMAD_GET_MAD_ADDR(3) πŸ’– it's a little one but it's a useful one, trust.


🌸 NAME 🌸

umad_get_mad_addr β€” get the address of the ib_mad_addr from a umad buffer πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <infiniband/umad.h>

ib_mad_addr_t * umad_get_mad_addr(void *umad);

πŸ’… DESCRIPTION πŸ’…

so like, you hand it a umad buffer, right? and umad_get_mad_addr() gives you back a pointer to the ib_mad_addr struct that's chillin' inside that specified umad buffer. that's it. that's the whole job. iconic behavior honestly πŸ‘‘


⭐ RETURN VALUE ⭐

the return value is a pointer to an ib_mad_addr_t struct, exactly as it's specified in <infiniband/umad.h> 🫢

and here's the whole struct so you can see the shape of it, no gatekeeping here:

typedef struct ib_mad_addr {
        uint32_t qpn;
        uint32_t qkey;
        uint16_t lid;
        uint8_t  sl;
        uint8_t  path_bits;
        uint8_t  grh_present;
        uint8_t  gid_index;
        uint8_t  hop_limit;
        uint8_t  traffic_class;
        uint8_t  gid[16];
        uint32_t flow_label;
} ib_mad_addr_t;

look at all those fields living their best lives 😭 qpn, qkey, lid, sl, path_bits, grh_present, gid_index, hop_limit, traffic_class, gid[16], and flow_label β€” the whole squad is accounted for πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Hal Rosenstock <halr@voltaire.com> β€” the main character who wrote this ✨


and that's the page, bestie!! this one came from the OpenIB crew, dated May 21, 2007, and it's still out here doing its thing. go forth and get that mad address πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from