hfi1_rcd_get_by_index_safe(9)
hiii bestie π welcome to the hfi1_rcd_get_by_index_safe(9) page from the Kernel API Manual. This one is short and sweet: itβs the safe little vibe-check wrapper that validates the ctxt index before the code goes poking at the array β¨
π NAME π
hfi1_rcd_get_by_index_safe β validate the ctxt index before accessing the array π
πΈ SYNOPSIS πΈ
struct hfi1_ctxtdata * hfi1_rcd_get_by_index_safe (struct hfi1_devdata
*dd , u16 ctxt );
π ARGUMENTS π
ddβ pointer to a valid devdata structure. Valid is the whole point, bestie π«Άctxtβ the index of an possilbe rcd. And yes,possilbeis literally the spelling on the page β keeping it 100% as-is π
π¦ DESCRIPTION π¦
This is a wrapper for hfi1_rcd_get_by_index to validate that the given ctxt index is valid. Itβs giving βlook before you leapβ in kernel form β no touching the array until that index has passed the vibe check π
β¨
The caller is responsible for making the _put. Periodt. Donβt forget the _put, bestie β thatβs the rule π
π SEE ALSO π
Kernel file ./drivers/infiniband/hw/hfi1/init.c is where the whole friend group lives. Go say hi to:
hfi1_rcd_free(9)hfi1_rcd_put(9)hfi1_rcd_get(9)allocate_rcd_index(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)
mwah π β signed off from source/version ./drivers/infiniband/hw/hfi1 / Kernel API Manual, dated October 2026. Thatβs the whole page, bestie β go validate those indexes responsibly π«Άπ
π¦ 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