STRUCT DDCB_QUEUE(9)
πΈ 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-EBUSYreturns 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 hasddcbs_max_in_flight,busy_waitq, and all theIO_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:
struct genwqe_reg(9)struct dma_mapping(9)struct genwqe_dev(9)enum genwqe_requ_state(9)struct genwqe_sgl(9)struct ddcb_requ(9)struct genwqe_file(9)genwqe_get_slu_id(9)genwqe_write_vreg(9)genwqe_read_vreg(9)__genwqe_execute_ddcb(9)__genwqe_execute_raw_ddcb(9)genwqe_is_privileged(9)
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
- 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