STRUCT IDPF_TX_QUEUE(9)
π struct idpf_tx_queue(9) π
okay bestie, so this is the kernel API manual page for struct idpf_tx_queue β it's the software structure that represents a transmit queue, and honestly? it's giving main character energy. it's a big struct, there's a lot going on, and we're gonna go through every single member together, no skips, no cap π
β¨ NAME β¨
struct idpf_tx_queue β the software structure representing a transmit queue π«Ά
π¦ SYNOPSIS π¦
struct idpf_tx_queue {
__cacheline_group_begin_aligned(read_mostly);
union {
struct idpf_base_tx_desc *base_tx;
struct idpf_base_tx_ctx_desc *base_ctx;
union idpf_tx_flex_desc *flex_tx;
union idpf_flex_tx_ctx_desc *flex_ctx;
void *desc_ring;
};
struct libeth_sqe *tx_buf;
union {
struct idpf_txq_group *txq_grp;
struct idpf_compl_queue *complq;
};
union {
struct device *dev;
struct xsk_buff_pool *pool;
};
void __iomem *tail;
unsigned long flags[BITS_TO_LONGS( __IDPF_Q_FLAGS_NBITS)];
u16 idx;
u16 desc_count;
union {
u16 tx_min_pkt_len;
u32 thresh;
};
struct net_device *netdev;
__cacheline_group_end_aligned(read_mostly);
__cacheline_group_begin_aligned(read_write);
u32 next_to_use;
u32 next_to_clean;
union {
struct {
u16 last_re;
u16 tx_max_bufs;
union {
u32 cleaned_bytes;
u32 clean_budget;
};
u16 cleaned_pkts;
struct idpf_sw_queue *refillq;
};
struct {
u32 pending;
u32 xdp_tx;
struct libeth_xdpsq_timer *timer;
struct libeth_xdpsq_lock xdp_lock;
};
};
struct idpf_ptp_vport_tx_tstamp_caps *cached_tstamp_caps;
struct work_struct *tstamp_task;
struct u64_stats_sync stats_sync;
struct idpf_tx_queue_stats q_stats;
__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;
u32 buf_pool_size;
u32 rel_q_id;
__cacheline_group_end_aligned(cold);
};
literally so many fields, but we're gonna get through them all together, i promise π§
πΈ Members πΈ
{unnamed_union}β anonymousbase_txβ base Tx descriptor arraybase_ctxβ base Tx context descriptor arrayflex_txβ flex Tx descriptor arrayflex_ctxβ flex Tx context descriptor arraydesc_ringβ virtual descriptor ring addresstx_bufβ Seestruct idpf_tx_buf{unnamed_union}β anonymoustxq_grpβ Seestruct idpf_txq_groupcomplqβ corresponding completion queue in XDP mode{unnamed_union}β anonymousdevβ Device back pointer for DMA mappingpoolβ corresponding XSk pool if installedtailβ Tail offset. Used for both queue models single and splitflagsβ Seeenum idpf_queue_flags_tidxβ For TX queue, it is used as index to map between TX queue group and hot path TX pointers stored in vport. Used in both singleq/splitq.desc_countβ Number of descriptors{unnamed_union}β anonymoustx_min_pkt_lenβ Min supported packet lengththreshβ XDP queue cleaning threshold
netdevβ net_device corresponding to this queuenext_to_useβ Next descriptor to usenext_to_cleanβ Next descriptor to clean{unnamed_union}β anonymous{unnamed_struct}β anonymouslast_reβ last descriptor index that RE bit was settx_max_bufsβ Max buffers that can be transmitted with scatter-gather{unnamed_union}β anonymouscleaned_bytesβ Splitq only, TXQ only: When a TX completion is received on the TX completion queue, it can be for any TXQ associated with that completion queue. This means we can clean up to N TXQs during a single call to clean the completion queue.cleaned_bytes|pktstracks the clean stats per TXQ during that single call to clean the completion queue. By doing so, we can update BQL with aggregate cleaned stats for each TXQ only once at the end of the cleaning routine.clean_budgetβ singleq only, queue cleaning budget
cleaned_pktsβ Number of packets cleaned for the above said caserefillqβ Pointer to refill queue
{unnamed_struct}β anonymouspendingβ number of pending descriptors to send in QBxdp_txβ number of pendingxdp_bufforxdp_framebufferstimerβ timer for XDP Tx queue cleanupxdp_lockβ lock for XDP Tx queues sharing
cached_tstamp_capsβ Tx timestamp capabilities negotiated with the CPtstamp_taskβ Work that handles Tx timestamp readstats_syncβ Seestruct u64_stats_syncq_statsβ Seeunion idpf_tx_queue_statsq_idβ Queue idsizeβ Length of descriptor ring in bytesdmaβ Physical address of ringq_vectorβ Backreference to associated vectorbuf_pool_sizeβ Total number ofidpf_tx_bufrel_q_idβ relative virtchnl queue index
ok that was a lot but we ate and left no crumbs πβ¨
π SEE ALSO π
Kernel file ./drivers/net/ethernet/intel/idpf/idpf_txrx.h β and all these other iconic structs/functions you should lowkey check out:
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_buf_queue(9)struct idpf_compl_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)
fr fr bestie, this page lives in./drivers/net/ethernet/intel/idpf, dated October 2026, and it's thestruct idpf_tx_queue(9)page β go read the whole series, it's a vibe ππ
ily, go write some drivers ππ¦πΈ
π¦ 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