STRUCT DMA_ASYNC_TX_DESCRIPTOR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct dma_async_tx_descriptor(9) ✨

okay so this is from the Kernel API Manual bestie, and it's literally the blueprint for struct dma_async_tx_descriptor β€” the async transaction descriptor, aka the dma generic offload fields situation. iykyk πŸ’…


πŸ¦‹ NAME πŸ¦‹

struct dma_async_tx_descriptor β€” async transaction descriptor ---dma generic offload fields---


πŸŽ€ SYNOPSIS πŸŽ€

struct dma_async_tx_descriptor {
    dma_cookie_t cookie;
    enum dma_ctrl_flags flags;
    dma_addr_t phys;
    struct dma_chan *chan;
    dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx);
    int (*desc_free)(struct dma_async_tx_descriptor *tx);
    dma_async_tx_callback callback;
    dma_async_tx_callback_result callback_result;
    void *callback_param;
    struct dmaengine_unmap_data *unmap;
    enum dma_desc_metadata_mode desc_metadata_mode;
    const struct dma_descriptor_metadata_ops *metadata_ops;
  #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH;
    struct dma_async_tx_descriptor *next;
    struct dma_async_tx_descriptor *parent;
    spinlock_t lock;
  #endif;
 };

🌸 Members 🌸

okay so first up we have the dma generic offload fields era of the struct β€” the core squad 🫢

  • cookie β€” the tracking cookie for this transaction, bestie πŸͺ and plot twist: it's set to -EBUSY if this tx is sitting on a dependency list. like it's literally occupied, leave her alone.
  • flags β€” flags that augment operation preparation, control completion, and communicate status. the whole vibe-control department ✨
  • phys β€” physical address of the descriptor. that's her real address, no catfishing πŸ“
  • chan β€” target channel for this operation. where the work actually gets sent πŸ’Œ
  • tx_submit β€” accept the descriptor, assign an ordered cookie, and mark the descriptor pending. To be pushed on .issue_pending call. she's queued and ready, no cap πŸ”₯
  • desc_free β€” the driver's callback function to free a resusable descriptor after completion. cleanup crew, iconic 🧹
  • callback β€” routine to call after this operation is complete. the "we're so back" moment πŸ’–
  • callback_result β€” error result from a DMA transaction. receipts, basically 😭
  • callback_param β€” general parameter to pass to the callback routine. lil extra to hand over 🎁
  • unmap β€” hook for generic DMA unmap data. the un-hook, if you will πŸͺ
  • desc_metadata_mode β€” core managed metadata mode, and the whole point is to protect mixed use of DESC_METADATA_CLIENT or DESC_METADATA_ENGINE. Otherwise it's DESC_METADATA_NONE. pick a lane bestie πŸ’€
  • metadata_ops β€” DMA driver provided metadata mode ops, and these need to be set by the DMA driver if metadata mode is supported with the descriptor. no ops, no metadata party πŸ™ˆ

⭐ async_tx api specific fields ⭐

now the async_tx api specific fields section, the dependency-chain girlies πŸ‘‘

  • next β€” at completion, submit this descriptor. the "and then??" energy ⏭️
  • parent β€” pointer to the next level up in the dependency chain. mother is mothering πŸ‘‘
  • lock β€” protect the parent and next pointers. do not touch without the lock, i'm serious 🫢

🌈 SEE ALSO 🌈

Kernel file ./include/linux/dmaengine.h β€” the source of truth, go read her πŸ“–

and that's the whole page bestie, we ate and left no crumbs πŸ’…βœ¨

🌸 signed, sealed, delivered from ./include/linux with a date stamp of October 2026 β€” struct dma_a...x_descriptor(9) forever and always πŸŽ€πŸ¦‹πŸ’œ
πŸ“¦ where this page comes from