STRUCT IB_USER_MAD_REG_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

struct ib_user_mad_reg_req β€” the MAD registration request, aka the little form you fill out when you want the kernel to slide unsolicited MADs your way 🫢

(this is from the Kernel API Manual, bestie β€” yes we're in kernel-land now, stay with me)


✨ SYNOPSIS

struct ib_user_mad_reg_req {
    __u32 id;
    packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
    __u8 qpn;
    __u8 mgmt_class;
    __u8 mgmt_class_version;
    __u8 oui[3];
    __u8 rmpp_version;
 };

okay so that's the actual struct, copied character for character because I would never mess with a struct definition on you πŸ’€


πŸŽ€ Members

Let's do a vibe check on every single field, one by one, no skipping πŸ‘‘

  • id β€” set by the kernel, not you. It's how the kernel identifies your agent in future requests. So like, the kernel picked your name and you just have to live with it πŸ’…
  • method_mask β€” you'll receive unsolicited MADs for any method where method_mask = 1. That's the whole deal, fr fr. It's an array of IB_USER_MAD_LONGS_PER_METHOD_MASK packed ulongs, so it's giving "bitmap behaviour" πŸ¦‹
  • qpn β€” queue pair number. Must be 0 or 1. That's it. Those are the only two options, no cap πŸ™ˆ
  • mgmt_class β€” tells the kernel which management class of MADs the caller should receive. This field is only required if you actually want to receive unsolicited MADs β€” otherwise it should be 0. So if you're not here for the unsolicited ones, leave it at zero and move on ✨
  • mgmt_class_version β€” indicates which version of MADs, for the given management class, you want to receive πŸŽ€
  • oui β€” indicates the IEEE OUI when mgmt_class is a vendor class in the range from 0x30 to 0x4f. Otherwise it's not used. Not used! Iconic honestly. It's 3 bytes of __u8 and it's doing nothing 🌸
  • rmpp_version β€” if set, indicates the RMPP version used. That's the whole sentence, she's short but she ate πŸ”₯

πŸ‘€ SEE ALSO

  • The kernel file itself: ./include/uapi/rdma/ib_user_mad.h πŸ’–
  • struct ib_user_mad_hdr_old(9)
  • struct ib_user_mad_hdr(9)
  • struct ib_user_mad(9)
  • struct ib_user_mad_reg_req2(9) β€” yes there's a sequel, main character energy πŸ‘‘

ok bestie real talk: this is kernel API territory, so the fields mean exactly what they say and nothing more. I'm not out here inventing behaviour for you 🫢

and that's the page! shoutout to ./include/uapi/rdma for being the source, October 2026 for the date, and the whole Kernel API Manual for having us. mwah πŸ’‹πŸ§šπŸ’œ

πŸ“¦ where this page comes from