STRUCT EFX_TX_QUEUE(9)
π 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 withinchannel->tx_queuearray π·οΈtypeβ configuration type of this TX queue. A bitmask ofEFX_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 toEFX_TX_CB_ORDERintoEFX_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 ofwrite_countwhen last checked. This is here for performance reasons. The xmit path will only get the up-to-date value ofwrite_countif 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 equalwrite_count, but as option descriptors don't produce completion events, they won't update this. Filled in iffefx->type->option_descriptors; only used for PIO. Thus, this is written and used on EF10, and neither on farch.old_read_countβ The value ofread_countwhen last checked. This is here for performance reasons. The xmit path will only get the up-to-date value ofread_countif 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 ofread_countbitwise-added toEFX_EMPTY_COUNT_VALID; otherwise0.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
- 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