hwrm_req_hold(9)
π hwrm_req_hold(9) β the Kernel API Manual glow-up π
okay so bestie, we're reading hwrm_req_hold(9) from the Kernel API Manual today, and honestly? it's giving "small function, big responsibility" energy. let's get into it β¨
β¨ NAME β¨
hwrm_req_hold β claim ownership of the request's resources. that's it, that's the whole vibe. you're basically adopting a request and now it's your problem π«Ά
πΈ SYNOPSIS πΈ
void * hwrm_req_hold (struct bnxt *bp , void *req );
look at that signature. void * in, void * out, no cap π
π¦ ARGUMENTS π¦
bpβ the driver context. you know her, you love her, she's the whole driver situation πreqβ a pointer to the request you wanna own. once you hold it, calls tohwrm_req_sendwill no longer consume it. it's yours now, bestie, like officially π
π₯ DESCRIPTION π₯
so. you're taking ownership of the request. and ownership is not just a cute word here β it literally places the responsibility on the caller (that's you π) to free the resources associated with the request by calling hwrm_req_drop. no ghosting your responsibilities, okay?
when the caller takes ownership, that implies a subsequent call to hwrm_req_send will not consume the request β like, sending will not free the associated resources if the request is owned by the caller. iykyk π
taking ownership also returns a reference to the response. and ngl, retaining and accessing that response data is the most common reason to take ownership of the request in the first place. it's kinda the whole point π
ownership can also be acquired in order to reuse the same request object across multiple invocations of hwrm_req_send. so like, one request, many send, main character energy honestly β
the resources associated with the response stay available to the caller until ownership of the request is relinquished via a call to hwrm_req_drop. periodt. π
and here's the tea: it is not possible for hwrm_req_hold to return NULL if a valid request is provided. a returned NULL value would imply a driver bug, and the implementation will complain loudly in the logs to aid in detection. loud. in the logs. like a whole scene ππ
so it should not be necessary to check the result for NULL. you can just... not. slay β¨
lowkey important: this is a warning, not a flex β if you ever do see that NULL, something is genuinely broken and the logs will be screaming about it. π
π RETURN π
a pointer to the response object. that's the whole return value, iconic behavior π
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/broadcom/bnxt/bnxt_hwrm.c __hwrm_req_init(9)hwrm_req_timeout(9)hwrm_req_alloc_flags(9)hwrm_req_replace(9)hwrm_req_flags(9)hwrm_req_drop(9)hwrm_req_send(9)hwrm_req_send_silent(9)hwrm_req_dma_slice(9)
the whole friend group fr fr π«Ά
okay and finally, credits where credits are due: this page came out of ./drivers/net/ethernet/broadco... β yes, it's abbreviated like that in the source, don't come for me π β and it's dated October 2026. mwah, thanks for reading bestie, go free those requests ππ
π¦ 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