STRUCT DDCB_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct ddcb_queue(9) 🌸

okay so bestie, welcome to the Kernel API Manual β€” section 9, the kernel API one β€” and today's main character is literally a struct called ddcb_queue. it's giving "the queue data structure that holds ALL the DDCB vibes" πŸ’…


✨ NAME ✨

struct ddcb_queue β€” DDCB queue data πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the whole thing, every single field, no skips, no edits:

struct ddcb_queue {
    int ddcb_max;
    int ddcb_next;
    int ddcb_act;
    u16 ddcb_seq;
    unsigned int ddcbs_in_flight;
    unsigned int ddcbs_completed;
    unsigned int ddcbs_max_in_flight;
    unsigned int return_on_busy;
    unsigned int wait_on_busy;
    dma_addr_t ddcb_daddr;
    struct ddcb *ddcb_vaddr;
    struct ddcb_requ **ddcb_req;
    wait_queue_head_t *ddcb_waitqs;
    spinlock_t ddcb_lock;
    wait_queue_head_t busy_waitq;
    u32 IO_QUEUE_CONFIG;
    u32 IO_QUEUE_STATUS;
    u32 IO_QUEUE_SEGMENT;
    u32 IO_QUEUE_INITSQN;
    u32 IO_QUEUE_WRAP;
    u32 IO_QUEUE_OFFSET;
    u32 IO_QUEUE_WTIME;
    u32 IO_QUEUE_ERRCNTS;
    u32 IO_QUEUE_LRW;
};

that's the whole squad, right there πŸ‘‘


πŸŽ€ Members πŸŽ€

like, the field-by-field tour. buckle up 🫢

  • ddcb_max β€” the number of DDCBs sitting on the queue. the headcount. πŸ’«
  • ddcb_next β€” the next free DDCB, aka who's up next, no cap.
  • ddcb_act β€” the next DDCB that's supposed to finish. manifesting its completion energy ✨
  • ddcb_seq β€” the sequence number of the last DDCB. tracking, iconically.
  • ddcbs_in_flight β€” DDCBs that are currently enqueued. they're out there, in the air, doing their thing πŸ¦‹
  • ddcbs_completed β€” how many DDCBs have already been completed. the success counter, ate πŸ’…
  • return_on_busy β€” the number of -EBUSY returns on a full queue. yes, that's a real counter for the busy-ness 😭
  • wait_on_busy β€” the number of waits on a full queue. she waits, she counts, she keeps receipts.
  • ddcb_daddr β€” the DMA address of the first DDCB in the queue. memory address realness πŸ”₯
  • ddcb_vaddr β€” the kernel virtual address of the first DDCB in the queue. same first DDCB, but the virtual view, iykyk.
  • ddcb_req β€” the associated requests, one per DDCB. a whole matching set, we love a one-to-one πŸ’œ
  • ddcb_waitqs β€” the associated wait queues, one per DDCB. again: one per DDCB. consistent queen 🌈
  • ddcb_lock β€” the lock that protects queuing operations. DO NOT skip the lock bestie, that's the whole safety vibe πŸ”’
ngl the struct up top also has ddcbs_max_in_flight, busy_waitq, and all the IO_QUEUE_* fields (IO_QUEUE_CONFIG, IO_QUEUE_STATUS, IO_QUEUE_SEGMENT, IO_QUEUE_INITSQN, IO_QUEUE_WRAP, IO_QUEUE_OFFSET, IO_QUEUE_WTIME, IO_QUEUE_ERRCNTS, IO_QUEUE_LRW) β€” this page doesn't describe those, so I'm not out here making stuff up about them πŸ™ˆ they're in the struct, that's what we know, periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, fr fr β€” all of them, from the kernel file ./drivers/misc/genwqe/card_base.h:


that's the whole page, bestie πŸ’–βœ¨πŸŽ€πŸ¦‹ this lil masterpiece lives in ./drivers/misc/genwqe and it's dated October 2026 β€” so like, future iconic. mwah πŸ’‹

πŸ“¦ where this page comes from