STRUCT EFX_TX_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual β€” this lil' page is all about struct efx_tx_buffer, aka the buffer state for a TX descriptor. it's giving "small struct, big responsibilities" and honestly? we stan. πŸŽ€


✨ NAME ✨

struct efx_tx_buffer β€” buffer state for a TX descriptor. that's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

struct efx_tx_buffer {
    union {
      const struct sk_buff *skb;
      struct xdp_frame *xdpf;
    };
    union {
      efx_qword_t option;
      dma_addr_t dma_addr;
    };
    unsigned short flags;
    unsigned short len;
    unsigned short unmap_len;
    unsigned short dma_offset;
 };

no cap, that's the whole thing. two anonymous unions, four unsigned shorts, and a whole lotta main character energy. πŸ‘‘


πŸ’… Members πŸ’…

  • {unnamed_union} β€” anonymous. yes babes, it literally just says anonymous and honestly same. πŸ™ˆ (this is the skb / xdpf union, and there's a matching one below β€” read on, i gotchu.)
  • skb β€” when flags & EFX_TX_BUF_SKB, this is the associated socket buffer, and it gets freed once the descriptor completes. so like, it's the guest of honor at the free-the-skb party. πŸŽ‰
  • xdpf β€” when flags & EFX_TX_BUF_XDP, this is the XDP frame info; its data member is the associated buffer that we drop a page reference on. lowkey important, don't forget the data member, iykyk. πŸ’€
  • {unnamed_union} β€” anonymous, again. second anonymous union, same energy. 🫢 (this one's the option / dma_addr union.)
  • option β€” when flags & EFX_TX_BUF_OPTION, it's an EF10-specific option descriptor. EF10 girlies rise. ⭐
  • dma_addr β€” DMA address of the fragment. 🎯
  • flags β€” flags for allocation and DMA mapping type. that's the allocation type and the DMA mapping type, both in one. iconic. πŸ”₯
  • len β€” length of this fragment. heads up though: this field is zero when the queue slot is empty. like, literally 0. so if you see a zero, that slot's not home. 🏚️
  • unmap_len β€” length of this fragment to unmap. 🌈
  • dma_offset β€” offset of dma_addr from the address of the backing DMA mapping. ⚠️ only valid if unmap_len != 0 β€” so check that unmap_len != 0 first, babes, fr fr. don't be out here reading it when it's not valid. 😭

🌟 SEE ALSO 🌟

the squad, the whole entire squad. 🧚 these all live in the kernel file ./drivers/net/ethernet/sfc/siena/net_driver.h:

  • struct efx_buffer(9)
  • struct efx_special_buffer(9)
  • struct efx_tx_queue(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)

go read them all, bestie. ttyl. πŸ’œ


mwah πŸ’‹ that's a wrap! this page was brought to you by ./drivers/net/ethernet/sfc/siena and is dated way out there in October 2026 β€” slay, see you in the future, and remember: struct efx_tx_buffer(9) always ate. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from