STRUCT IDPF_COMPL_QUEUE(9)
π¦ struct idpf_compl_queue(9) π¦
okay bestie, so this one's from the Kernel API Manual (section 9, the kernel internals girlies π ) and it's genuinely such a serve β it's the whole blueprint for the software structure that represents a completion queue. no cap, it's a lot of fields, but we're gonna get through it together. grab a lil snack π
π NAME π
struct idpf_compl_queue β the software structure representing a completion queue β¨
πΈ SYNOPSIS πΈ
struct idpf_compl_queue {
__cacheline_group_begin_aligned(read_mostly);
union {
struct idpf_splitq_tx_compl_desc *comp;
struct idpf_splitq_4b_tx_compl_desc *comp_4b;
void *desc_ring;
};
struct idpf_txq_group *txq_grp;
unsigned long flags[BITS_TO_LONGS( __IDPF_Q_FLAGS_NBITS)];
u32 desc_count;
u32 clean_budget;
struct net_device *netdev;
__cacheline_group_end_aligned(read_mostly);
__cacheline_group_begin_aligned(read_write);
u32 next_to_use;
u32 next_to_clean;
aligned_u64 num_completions;
__cacheline_group_end_aligned(read_write);
__cacheline_group_begin_aligned(cold);
u32 q_id;
u32 size;
dma_addr_t dma;
struct idpf_q_vector *q_vector;
__cacheline_group_end_aligned(cold);
};
like, look at her. the cacheline groups?? the way she's organized into read_mostly, read_write and cold?? main character energy fr fr π
π Members π
okay so here's the whole cast, one by one, no skips:
{unnamed_union}β anonymous π» (yes, literally has no name, she's mysterious like that)compβ 8-byte completion descriptor arraycomp_4bβ 4-byte completion descriptor arraydesc_ringβ virtual descriptor ring address
π‘ psst βcomp,comp_4banddesc_ringall live in the same union up there, so it's one-or-the-other energy, not all three at once.
txq_grpβ seestruct idpf_txq_groupflagsβ seeenum idpf_queue_flags_tdesc_countβ number of descriptorsclean_budgetβ queue cleaning budget π§Ή (she's on a budget, respect it)netdevβ thenet_devicecorresponding to this queuenext_to_useβ next descriptor to use. relevant in both split & single txq and bufq.next_to_cleanβ next descriptor to clean π«§num_completionsβ only relevant for the TX completion queue. it tracks the number of completions received to compare against the number of completions pending, as accumulated by the TX queues. (lowkey the most niche field here and I'm obsessed π)q_idβ queue idsizeβ length of descriptor ring in bytesdmaβ physical address of ringq_vectorβ backreference to the associated vector π
π SEE ALSO π
kernel file ./drivers/net/ethernet/intel/idpf/idpf_txrx.h β go read it, it's giving lore π
and the whole friend group:
struct idpf_tx_offload_params(9)struct idpf_tx_splitq_params(9)enum idpf_queue_flags_t(9)struct idpf_vec_regs(9)struct idpf_intr_reg(9)struct idpf_q_vector(9)struct idpf_rx_queue(9)struct idpf_tx_queue(9)struct idpf_buf_queue(9)struct idpf_sw_queue(9)struct idpf_rxq_set(9)struct idpf_bufq_set(9)struct idpf_rxq_group(9)struct idpf_txq_group(9)idpf_size_to_txd_count(9)idpf_tx_singleq_build_ctob(9)idpf_tx_splitq_build_desc(9)idpf_vport_intr_set_wb_on_itr(9)idpf_tx_splitq_get_free_bufs(9)
π«Ά that's the whole page bestie, you ate that. go forth and queue your completions.
and that's a wrap!! brought to you by ./drivers/net/ethernet/intel/idpf, dated October 2026 β mwah, stan, periodt π
ππ
π¦ 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