ib_get_ucaps(9)
π 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 π
- Kernel file
./drivers/infiniband/core/ucaps.c ib_ucaps_init(9)ib_create_ucap(9)ib_remove_ucap(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms