sdma_txadd_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 destination
  • page β€” the actual page to map πŸ‘‘
  • offset β€” where inside the page you're pointing, offset within the page, yes
  • len β€” length in bytes, no cap πŸ“
  • pinning_ctx β€” the context that gets stored on struct sdma_desc .pinning_ctx. Not added if coalesce buffer is used. E.g. pointer to pinned-page cache entry for the sdma_desc. iykyk πŸ™ˆ
  • ctx_get β€” optional function to take a reference to pinning_ctx. Not called if pinning_ctx is NULL. optional queen behavior only
  • ctx_put β€” optional function to release the reference to pinning_ctx after sdma_desc completes. ⚠️ May be called in interrupt context so must not sleep. Not called if pinning_ctx is NULL. 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