STRUCT EF4_TX_QUEUE(9)
π struct ef4_tx_queue(9) π
okay so bestie, welcome to the Kernel API Manual page for struct ef4_tx_queue β aka "An Efx TX queue" β¨ this is the whole glow-up of one TX queue, every field laid out, and honestly it's giving main character energy for the falcon driver π¦
π NAME π
struct ef4_tx_queue β An Efx TX queue π
β¨ SYNOPSIS β¨
here's the whole struct, copied exactly, don't touch a single character bestie π
struct ef4_tx_queue {
struct ef4_nic *efx;
unsigned queue;
struct ef4_channel *channel;
struct netdev_queue *core_txq;
struct ef4_tx_buffer *buffer;
struct ef4_buffer *cb_page;
struct ef4_special_buffer txd;
unsigned int ptr_mask;
bool initialised;
unsigned int tx_min_size;
int (*handle_tso)(struct ef4_tx_queue*, struct sk_buff*, bool *);
unsigned int read_count;
unsigned int old_write_count;
unsigned int merge_events;
unsigned int bytes_compl;
unsigned int pkts_compl;
unsigned int insert_count;
unsigned int write_count;
unsigned int old_read_count;
unsigned int pushes;
bool xmit_more_available;
unsigned int cb_packets;
unsigned long tx_packets;
unsigned int empty_read_count;
#define EF4_EMPTY_COUNT_VALID 0x80000000;
atomic_t flush_outstanding;
};
πΈ Members πΈ
efxβ the Efx NIC this queue is attached to π«Άqueueβ the DMA queue number π’channelβ the associated channel π«core_txqβ the networking core TX queue structure, like the netdev's own bookkeeping for this queue πbufferβ the software buffer ring π§cb_pageβ array of pages of copy buffers. it gets carved up according toEF4_TX_CB_ORDERintoEF4_TX_CB_SIZE-sized chunks π° (yes, sliced like a cake, no cap)txdβ the hardware descriptor ring π the real oneptr_maskβ the size of the ring minus 1. classic mask move, iconicinitialisedβ has the hardware queue been initialised? π€ yes/no vibes onlytx_min_sizeβ minimum transmit size for this queue. it depends on HW, so don't come for her π«Ά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 π (yes literally ping-pong, that's the actual term, iykyk)merge_eventsβ number of TX merged completion events π₯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 πΎ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 π again. same energy, opposite condition, obsessedpushesβ number of times the TX push feature has been used πxmit_more_availableβ are any packets waiting to be pushed to the NIC? π¬cb_packetsβ number of times the TX copybreak feature has been used π¦empty_read_countβ if the completion path has seen the queue as empty and the transmission path has not yet checked this, then it's the value ofread_countbitwise-added toEF4_EMPTY_COUNT_VALID; otherwise0π«
ngl, the struct also carrieshandle_tso,bytes_compl,pkts_complandflush_outstandingβ they're up there in the synopsis fr fr, this Members list just doesn't say anything about them. no cap, that's literally all the page gives you π
π Description π
so what actually is this thing? it's a ring buffer of TX fragments π periodt.
since the TX completion path always executes on the same CPU, but the xmit path can operate on different CPUs, performance gets 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. like, highkey crucial π
there's also a cache line for members which are read but not written on the fast path π everyone gets their own space, no crowding, we love boundaries.
π¦ SEE ALSO π¦
- kernel file
./drivers/net/ethernet/sfc/falcon/net_driver.h struct ef4_buffer(9)struct ef4_special_buffer(9)struct ef4_tx_buffer(9)struct ef4_rx_buffer(9)struct ef4_rx_page_state(9)struct ef4_rx_queue(9)struct ef4_channel(9)struct ef4_msi_context(9)struct ef4_channel_type(9)struct ef4_link_state(9)struct ef4_phy_operations(9)enum ef4_phy_mode(9)struct ef4_hw_stat_desc(9)struct ef4_nic(9)struct ef4_nic_type(9)
and that's the whole page bestie, go forth and read those TX fragments π
this icon was brought to you by ./drivers/net/ethernet/sfc/falcon, dated October 2026, and it says struct ef4_tx_queue(9) at the bottom like a little signature π mwah π
π¦ 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