hwrm_req_alloc_flags(9)
π hwrm_req_alloc_flags β the kernel API manual, but make it make sense π
okay so bestie, this is a page from the Kernel API Manual, and it's about hwrm_req_alloc_flags. it's literally the function that sets your GFP allocation flags for slices. that's the whole vibe. ngl it's a little niche but we're gonna slay it anyway π«Ά
β¨ SYNOPSIS β¨
void hwrm_req_alloc_flags (struct bnxt *bp , void *req , gfp_t gfp );
like, that's it. three args, no return value, no drama. π
π ARGUMENTS π
bpβ the driver context. that's your main character right there πreqβ the request for which calls tohwrm_req_dma_slicewill have altered allocation flags. so like, you're telling this specific request "hey bestie, your slice allocations are gonna behave different from now on" π¦gfpβ a bitmask of GFP flags. these flags get passed todma_alloc_coherentwhenever it's used to allocate backing memory for slices. β οΈ important caveat though: calls tohwrm_req_dma_slicewill not always result in new allocations β but memory suballocated from the request buffer is already__GFP_ZERO, so you're covered there anyway. no cap. π
πΈ DESCRIPTION πΈ
so what does it actually do? it sets the GFP allocation flags associated with the request for subsequent calls to hwrm_req_dma_slice. that's the entire plot. π
and like, why do you care? because this is genuinely useful for specifying __GFP_ZERO for slice allocations. yes queen, zeroed memory on demand β¨
lowkey just remember: the flags live on the request, not on the individual slice call. set once, vibe forever. π§
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.cβ go read the source, iykyk π __hwrm_req_init(9)hwrm_req_timeout(9)hwrm_req_replace(9)hwrm_req_flags(9)hwrm_req_hold(9)hwrm_req_drop(9)hwrm_req_send(9)hwrm_req_send_silent(9)hwrm_req_dma_slice(9)
like the whole hwrm_req friend group, fr fr. go say hi to all of them π
and that's the page!! mwah π this came from ./drivers/net/ethernet/broadco..., dated October 2026, and yes the header and footer both said hwrm_req_alloc_flags(9) because it's that iconic. 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