STRUCT EFX_TX_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct efx_tx_queue(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this is the page for struct efx_tx_queue, aka An Efx TX queue ✨. It's giving kernel-struct main character energy, and we're gonna go through every single field, no cap πŸ’….


✨ NAME ✨

struct efx_tx_queue β€” An Efx TX queue πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

       struct efx_tx_queue {
           struct efx_nic *efx;
           unsigned int queue;
           unsigned int label;
           unsigned int type;
           unsigned int tso_version;
           bool tso_encap;
           struct efx_channel *channel;
           struct netdev_queue *core_txq;
           struct efx_tx_buffer *buffer;
           struct efx_buffer *cb_page;
           struct efx_special_buffer txd;
           unsigned int ptr_mask;
           void __iomem *piobuf;
           unsigned int piobuf_offset;
           bool initialised;
           bool timestamping;
           bool xdp_tx;
           unsigned int read_count;
           unsigned int old_write_count;
           unsigned int merge_events;
           unsigned int bytes_compl;
           unsigned int pkts_compl;
           u32 completed_timestamp_major;
           u32 completed_timestamp_minor;
           unsigned int insert_count;
           unsigned int write_count;
           unsigned int packet_write_count;
           unsigned int old_read_count;
           unsigned int tso_bursts;
           unsigned int tso_long_headers;
           unsigned int tso_packets;
           unsigned int tso_fallbacks;
           unsigned int pushes;
           unsigned int pio_packets;
           bool xmit_pending;
           unsigned int cb_packets;
           unsigned int notify_count;
           unsigned long tx_packets;
           unsigned int empty_read_count;
         #define EFX_EMPTY_COUNT_VALID 0x80000000;
           atomic_t flush_outstanding;
        };

πŸŽ€ Members πŸŽ€

  • efx β€” The associated Efx NIC πŸ‘‘
  • queue β€” DMA queue number πŸ”’
  • label β€” Label for TX completion events. Is our index within channel->tx_queue array 🏷️
  • type β€” configuration type of this TX queue. A bitmask of EFX_TXQ_TYPE_* flags.
  • tso_version β€” Version of TSO in use for this queue.
  • tso_encap β€” Is encapsulated TSO supported? Supported in TSOv2 on 8000 series ✨
  • channel β€” The associated channel πŸ¦‹
  • core_txq β€” The networking core TX queue structure.
  • buffer β€” The software buffer ring.
  • cb_page β€” Array of pages of copy buffers. Carved up according to EFX_TX_CB_ORDER into EFX_TX_CB_SIZE-sized chunks.
  • txd β€” The hardware descriptor ring.
  • ptr_mask β€” The size of the ring minus 1.
  • piobuf β€” PIO buffer region for this TX queue (shared with its partner).
  • piobuf_offset β€” Buffer offset to be specified in PIO descriptors.
  • initialised β€” Has hardware queue been initialised?
  • timestamping β€” Is timestamping enabled for this channel?
  • xdp_tx β€” Is this an XDP tx queue?
  • read_count β€” Current read pointer. This is the number of buffers that have been removed from both rings.
  • old_write_count β€” The value of write_count when last checked. This is here for performance reasons. The xmit path will only get the up-to-date value of write_count if this variable indicates that the queue is empty. This is to avoid cache-line ping-pong between the xmit path and the completion path πŸ“
  • merge_events β€” Number of TX merged completion events.
  • bytes_compl β€” (struct field, no member blurb in this page β€” see the note below πŸ’…)
  • pkts_compl β€” (struct field, no member blurb in this page β€” see the note below πŸ’…)
  • completed_timestamp_major β€” Top part of the most recent tx timestamp.
  • completed_timestamp_minor β€” Low part of the most recent tx timestamp.
  • insert_count β€” Current insert pointer This is the number of buffers that have been added to the software ring.
  • write_count β€” Current write pointer This is the number of buffers that have been added to the hardware ring.
  • packet_write_count β€” Completable write pointer This is the write pointer of the last packet written. Normally this will equal write_count, but as option descriptors don't produce completion events, they won't update this. Filled in iff efx->type->option_descriptors; only used for PIO. Thus, this is written and used on EF10, and neither on farch.
  • old_read_count β€” The value of read_count when last checked. This is here for performance reasons. The xmit path will only get the up-to-date value of read_count if this variable indicates that the queue is full. This is to avoid cache-line ping-pong between the xmit path and the completion path πŸ“
  • tso_bursts β€” Number of times TSO xmit invoked by kernel.
  • tso_long_headers β€” Number of packets with headers too long for standard blocks.
  • tso_packets β€” Number of packets via the TSO xmit path.
  • tso_fallbacks β€” Number of times TSO fallback used.
  • pushes β€” Number of times the TX push feature has been used.
  • pio_packets β€” Number of times the TX PIO feature has been used.
  • xmit_pending β€” Are any packets waiting to be pushed to the NIC.
  • cb_packets β€” Number of times the TX copybreak feature has been used.
  • notify_count β€” Count of notified descriptors to the NIC.
  • tx_packets β€” (struct field, no member blurb in this page β€” see the note below πŸ’…)
  • empty_read_count β€” If the completion path has seen the queue as empty and the transmission path has not yet checked this, the value of read_count bitwise-added to EFX_EMPTY_COUNT_VALID; otherwise 0.
  • flush_outstanding β€” (struct field, no member blurb in this page β€” see the note below πŸ’…)
psst bestie 🫢 β€” these struct fields show up in the synopsis but don't get their own little paragraph in the original Members list: bytes_compl, pkts_compl, tx_packets, flush_outstanding. I'm not inventing lore for them, that's the whole tea β˜•

πŸ’… Description πŸ’…

This is a ring buffer of TX fragments ✨. Since the TX completion path always executes on the same CPU and the xmit path can operate on different CPUs, performance is increased by ensuring that the completion path and the xmit path operate on different cache lines. This is particularly important if the xmit path is always executing on one CPU which is different from the completion path. There is also a cache line for members which are read but not written on the fast path πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/net/ethernet/sfc/siena/net_driver.h is the source vibe β€” go see these besties:

  • struct efx_buffer(9)
  • struct efx_special_buffer(9)
  • struct efx_tx_buffer(9)
  • struct efx_rx_buffer(9)
  • struct efx_rx_page_state(9)
  • struct efx_rx_queue(9)
  • struct efx_channel(9)
  • struct efx_msi_context(9)
  • struct efx_channel_type(9)
  • struct efx_link_state(9)
  • enum efx_phy_mode(9)
  • struct efx_hw_stat_desc(9)
  • struct efx_rss_context(9)
  • struct efx_arfs_rule(9)
  • struct efx_async_filter_insertion(9)
  • struct efx_nic(9)
  • struct efx_nic_type(9)

mwah πŸ’‹ β€” this came from source/version ./drivers/net/ethernet/sfc/siena, dated October 2026, and the page is struct efx_tx_queue(9). That's the whole footer tea, bestie 🫢

πŸ“¦ where this page comes from