STRUCT EF4_RX_BUFFER(9)
π struct ef4_rx_buffer(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β today's main character is struct ef4_rx_buffer, and honestly? she's giving "one little buffer, so much lore." let's get into it π«Ά
πΈ NAME πΈ
struct ef4_rx_buffer β an Efx RX data buffer π
like, literally the struct that holds one receive buffer's info. that's her. that's the whole vibe check.
β¨ SYNOPSIS β¨
here's the whole glow-up, exactly as it lives in the kernel β no cap, copy it character for character:
struct ef4_rx_buffer {
dma_addr_t dma_addr;
struct page *page;
u16 page_offset;
u16 len;
u16 flags;
};
five fields. that's it. small struct, big energy π
π¦ Members π¦
dma_addrβ the DMA base address of the buffer. like, where it lives in DMA-land. lowkey the whole point πpageβ the associated page buffer. important: this will beNULLif the buffer slot is currently free. so if you see aNULLin here, don't panic β she's just off duty rn πpage_offsetβ okay this one changes based on the state, so listen up:- if pending: offset in page of the DMA base address
- if completed: offset in page of the Ethernet header
two different meanings, same field. iykyk π
lenβ also state-dependent, bestie:- if pending: length for DMA descriptor
- if completed: received length, excluding the hash prefix
yes the exclusion matters. don't forget it π₯
flagsβ flags for buffer and packet state. but here's the tea β: these are only set on the first buffer of a scattered packet. so if you're looking at buffer #2 and wondering where the flags wentβ¦ they were never there, bestie π
π SEE ALSO π
go read these next, fr fr β the whole friend group:
- 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_tx_queue(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)
that's sixteen refs. sixteen! she knows everybody π
remember:page=NULLwhen free,page_offsetandlenmean different things depending on pending vs completed, andflagsonly show up on the first buffer of a scattered packet. memorize that and you're golden β
mwah, that's the page! this lil gem lives in ./drivers/net/ethernet/sfc/falcon and the version vibes are dated October 2026 π slay, go read some kernel source, ily, bye π§π
π¦ 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