allocate_rcd_index(9)
β¨ allocate_rcd_index(9) β¨
okay bestie so this one lives in the Kernel API Manual (section 9, kernel-space girlies only π ) and honestly? it's giving "tiny function, big responsibilities". let's get into it π
πΈ NAME πΈ
allocate_rcd_index β grab an rcd index out of the rcd array, like reserving your seat in the group chat πͺ
π¦ SYNOPSIS π¦
int allocate_rcd_index (struct hfi1_devdata *dd , struct hfi1_ctxtdata
*rcd , u16 *index );
π ARGUMENTS π
ddβ pointer to a validdevdatastructure. has to be valid fr fr, don't be out here passing garbage πrcdβ the rcd data structure you want to assign. this is the one getting a home πindexβ pointer to the index that gets allocated. it's an out-param situation, she writes back to you β¨
π DESCRIPTION π
so here's the vibe: the function goes looking for an empty slot in the rcd array, and when it finds one it assigns the rcd you handed it to that slot. match made in heaven π«Ά
and if the array is full? bestie it's over, we are EBUSY π no space, no index, that's the whole story. busy means busy, periodt.
π SEE ALSO π
kernel file ./drivers/infiniband/hw/hfi1/init.c, plus the whole friend group:
hfi1_rcd_free(9)hfi1_rcd_put(9)hfi1_rcd_get(9)hfi1_rcd_get_by_index_safe(9)hfi1_rcd_get_by_index(9)hfi1_free_ctxt(9)init_after_reset(9)create_workqueues(9)destroy_workqueues(9)enable_general_intr(9)hfi1_init(9)shutdown_device(9)hfi1_free_ctxtdata(9)hfi1_free_devdata(9)hfi1_alloc_devdata(9)hfi1_create_rcvhdrq(9)hfi1_setup_eagerbufs(9)
heads up babe: if the array's full you're getting EBUSY back, not a silent failure. check your return value, i'm begging π«Ά
okay that's the whole page, no cap π this icon lives over in ./drivers/infiniband/hw/hfi1, and this particular glow-up is dated October 2026 β catch you in the next manpage, mwah πΈπ
π
π¦ 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