sdma_txadd_page(9)
π« sdma_txadd_page(9) β the Kernel API Manual era π«
okay bestie, buckle up, because this one lives in the Kernel API Manual and it's literally the function that goes "yeah just toss that page in there" π
β¨ NAME β¨
sdma_txadd_page β adds a page to the sdma_txreq π¦
πΈ SYNOPSIS πΈ
int sdma_txadd_page (struct hfi1_devdata *dd , struct sdma_txreq *tx ,
struct page *page , unsigned long offset , u16 len , void *pinning_ctx ,
void (*ctx_get)(void *) , void (*ctx_put)(void *) );
π ARGUMENTS π
ddβ the device we're using for mapping, like, the whole vibe check of where this is going down π₯txβ the tx request that the page is getting added to, bestie, it's the destinationpageβ the actual page to map πoffsetβ where inside the page you're pointing, offset within the page, yeslenβ length in bytes, no cap πpinning_ctxβ the context that gets stored onstruct sdma_desc.pinning_ctx. Not added if coalesce buffer is used. E.g. pointer to pinned-page cache entry for thesdma_desc. iykyk πctx_getβ optional function to take a reference topinning_ctx. Not called ifpinning_ctxisNULL. optional queen behavior onlyctx_putβ optional function to release the reference topinning_ctxaftersdma_desccompletes. β οΈ May be called in interrupt context so must not sleep. Not called ifpinning_ctxisNULL. like, do NOT sleep in there, fr fr π
π DESCRIPTION π
So this is the one you use to add a page/offset/length descriptor. simple as that π
And the mapping/unmapping of the page/offset/len is automatically handled. not you doing it. it's handled. slay β¨
π RETURN π
0β success, we ate π-ENOSPCβ mapping fail π-ENOMEMβ couldn't extend/coalesce descriptor array π
π§ SEE ALSO π§
Kernel file ./drivers/infiniband/hw/hfi1/sdma.h sdma exported routines(9), sdma PSM/verbs API(9), Infrastructure calls(9), struct sdma_engine(9), sdma_empty(9), sdma_running(9), sdma_txinit_ahg(9), sdma_txinit(9), sdma_txadd_daddr(9), sdma_txadd_kvaddr(9), sdma_progress(9), struct sdma_map_elem(9), sdma_engine_progress_schedule(9)
like, go read those too, they're all linked in the group chat π«Ά
π okay that's the whole page, go forth and add your pages
this icon of a manpage came from ./drivers/infiniband/hw/hfi1, dated October 2026, and it signs off as sdma_txadd_page(9) β periodt, no notes π
β
π¦ 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