rdma_cap_opa_mad(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– rdma_cap_opa_mad(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes the Kernel API Manual, we're in the big leagues now β€” and today's main character is rdma_cap_opa_mad. It's a tiny little bool-returning function and honestly it ate. Let's get into it πŸŽ€


✨ NAME ✨

rdma_cap_opa_mad β€” the vibe check that tells you whether a device port actually supports OPA Management Datagrams. that's it, that's the whole job πŸ¦‹


🌸 SYNOPSIS 🌸

bool rdma_cap_opa_mad (struct ib_device *device , u32 port_num );

look at her. short, sweet, returns a bool. no notes πŸ’…


🫢 ARGUMENTS 🫢

  • device β€” the device you wanna check, bestie. that's the one.
  • port_num β€” and the port number on it you're checking. specific port, specific vibes ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the lore 😭 β€” Intel OmniPath devices go ahead and extend and/or replace the InfiniBand Management datagrams with their own versions. These OPA MADs share many but not all of the characteristics of InfiniBand MADs. so like, cousins. not twins. iykyk.

OPA MADs differ in the following ways, and yes i'm numbering them because this is important:

  1. MADs are variable size up to 2K. meanwhile the IBTA defined MADs remain fixed at 256 bytes. not me being flexible while you're stuck at 256 🧚
  2. OPA SMPs must carry valid PKeys β€” non-negotiable, periodt.
  3. OPA SMP packets are a different format entirely. it's giving "same energy, different font" πŸ’€

⭐ RETURN ⭐

returns true if the port supports OPA MAD packet formats. that's it. that's the answer. simple, clean, iconic 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file ./include/rdma/ib_verbs.h is the plug for all of this, and then there is literally a whole friend group of siblings you should also go meet:

like… that's the whole extended friend group. go say hi πŸ’œ


sign-off szn πŸŽ€ β€” this page lives in ./include/rdma, it's dated October 2026, and it goes by rdma_cap_opa_mad(9). mwah, ily, go read your headers πŸ’‹

πŸ“¦ where this page comes from