STRUCT EF4_RX_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 be NULL if the buffer slot is currently free. so if you see a NULL in 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 = NULL when free, page_offset and len mean different things depending on pending vs completed, and flags only 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