ib_get_ucaps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ib_get_ucaps β€” the one where you ask "which ucaps are in this fd pile?" πŸ’–

okay so real talk, this is from the Kernel API Manual, section 9 β€” yes, the big-kid kernel-functions section, main character energy only ✨


🌸 NAME 🌸

ib_get_ucaps β€” get a bitmask of ucap types out of a bunch of file descriptors πŸŽ€


✨ SYNOPSIS ✨

int ib_get_ucaps (int *fds , int fd_count , uint64_t *idx_mask );

that's it, that's the whole vibe check πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fds β€” an array of file descriptors. like, a whole squad of them 🫢
  • fd_count β€” how many file descriptors are actually in that array. don't lie about this number bestie, it's literally the headcount 😭
  • idx_mask β€” the bitmask that gets updated based on the ucaps living in the fd list. it's the thing you're here to fill in 🌈

πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: you hand it an array of file descriptors, and it gives you back a bitmask of the ucaps β€” where a bit is set if an FD for that ucap type was in the array. that's it. that's the whole function. lowkey iconic 🧚

no cap, it's giving "tell me which ucap types showed up to the party" and honestly? obsessed πŸ”₯


⭐ RETURN ⭐

0 on success, or a negative errno value on failure. so like, if you see a negative number, something went wrong and you should respectfully panic πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

go read those, iykyk πŸ“šβœ¨


and that's the page bestie!! this one comes straight out of ./drivers/infiniband/core, dated October 2026, and it's filed under ib_get_ucaps(9) β€” periodt πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from