STRUCT IDPF_TX_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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} β€” anonymous
  • base_tx β€” base Tx descriptor array
  • base_ctx β€” base Tx context descriptor array
  • flex_tx β€” flex Tx descriptor array
  • flex_ctx β€” flex Tx context descriptor array
  • desc_ring β€” virtual descriptor ring address
  • tx_buf β€” See struct idpf_tx_buf
  • {unnamed_union} β€” anonymous
  • txq_grp β€” See struct idpf_txq_group
  • complq β€” corresponding completion queue in XDP mode
  • {unnamed_union} β€” anonymous
  • dev β€” Device back pointer for DMA mapping
  • pool β€” corresponding XSk pool if installed
  • tail β€” Tail offset. Used for both queue models single and split
  • flags β€” See enum idpf_queue_flags_t
  • idx β€” 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} β€” anonymous
    • tx_min_pkt_len β€” Min supported packet length
    • thresh β€” XDP queue cleaning threshold
  • netdev β€” net_device corresponding to this queue
  • next_to_use β€” Next descriptor to use
  • next_to_clean β€” Next descriptor to clean
  • {unnamed_union} β€” anonymous
    • {unnamed_struct} β€” anonymous
      • last_re β€” last descriptor index that RE bit was set
      • tx_max_bufs β€” Max buffers that can be transmitted with scatter-gather
      • {unnamed_union} β€” anonymous
        • cleaned_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|pkts tracks 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 case
      • refillq β€” Pointer to refill queue
    • {unnamed_struct} β€” anonymous
      • pending β€” number of pending descriptors to send in QB
      • xdp_tx β€” number of pending xdp_buff or xdp_frame buffers
      • timer β€” timer for XDP Tx queue cleanup
      • xdp_lock β€” lock for XDP Tx queues sharing
  • cached_tstamp_caps β€” Tx timestamp capabilities negotiated with the CP
  • tstamp_task β€” Work that handles Tx timestamp read
  • stats_sync β€” See struct u64_stats_sync
  • q_stats β€” See union idpf_tx_queue_stats
  • q_id β€” Queue id
  • size β€” Length of descriptor ring in bytes
  • dma β€” Physical address of ring
  • q_vector β€” Backreference to associated vector
  • buf_pool_size β€” Total number of idpf_tx_buf
  • rel_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:


fr fr bestie, this page lives in ./drivers/net/ethernet/intel/idpf, dated October 2026, and it's the struct idpf_tx_queue(9) page β€” go read the whole series, it's a vibe πŸŒˆπŸ’œ

ily, go write some drivers πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from