STRUCT IDPF_COMPL_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 array
  • comp_4b β€” 4-byte completion descriptor array
  • desc_ring β€” virtual descriptor ring address
πŸ’‘ psst β€” comp, comp_4b and desc_ring all live in the same union up there, so it's one-or-the-other energy, not all three at once.
  • txq_grp β€” see struct idpf_txq_group
  • flags β€” see enum idpf_queue_flags_t
  • desc_count β€” number of descriptors
  • clean_budget β€” queue cleaning budget 🧹 (she's on a budget, respect it)
  • netdev β€” the net_device corresponding to this queue
  • next_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 id
  • size β€” length of descriptor ring in bytes
  • dma β€” physical address of ring
  • q_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:


🫢 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