__iavf_chk_linearize(9)
π __iavf_chk_linearize β the kernel API manual, but make it make sense π
okay bestie, welcome to the __iavf_chk_linearize(9) page from the Kernel API Manual β¨ this is the little helper that checks if there are more than 8 buffers per packet, and honestly it's giving "tiny function, huge responsibility" energy π
β¨ NAME β¨
__iavf_chk_linearize β check if there are more than 8 buffers per packet π
πΈ SYNOPSIS πΈ
bool __iavf_chk_linearize (struct sk_buff *skb );
like literally that's it, that's the whole call β¨
π¦ ARGUMENTS π¦
skbβ the send buffer π (yes that's the whole description, she's a woman of few words and we respect it)
π NOTE π (read this one, i'm begging)
okay so here's the tea, and it's important π«
Our HW can't DMA more than 8 buffers to build a packet on the wire, so we need to figure out the cases where we need to linearize the skb. no cap. 8 buffers max, that's the whole vibe check. π
For TSO we need to count the TSO header and segment payload separately. As such we need to check cases where we have 7 fragments or more, because we can potentially require 9 DMA transactions:
- 1 for the TSO header π
- 1 for the segment payload in the first descriptor π
- another 7 for the fragments π
so yeah, 7 fragments + the header + the payload = we already blew past 8 and it's not even close, hence this function existing. the math is mathing β¨
π SEE ALSO π
the kernel file, bestie β go read the source if you want the full lore π
./drivers/net/ethernet/intel/iavf/iavf_txrx.c
and the whole friend group π:
iavf_is_descriptor_done(9)iavf_unmap_and_free_tx_resource(9)iavf_clean_tx_ring(9)iavf_free_tx_resources(9)iavf_get_tx_pending(9)iavf_force_wb(9)iavf_detect_recover_hung(9)iavf_clean_tx_irq(9)iavf_enable_wb_on_itr(9)iavf_update_itr(9)iavf_setup_tx_descriptors(9)iavf_clean_rx_ring(9)iavf_free_rx_resources(9)iavf_setup_rx_descriptors(9)iavf_release_rx_desc(9)iavf_receive_skb(9)iavf_alloc_rx_buffers(9)iavf_rx_csum(9)iavf_legacy_rx_csum(9)iavf_flex_rx_csum(9)iavf_legacy_rx_hash(9)iavf_flex_rx_hash(9)iavf_flex_rx_tstamp(9)iavf_process_skb_fields(9)iavf_cleanup_headers(9)iavf_add_rx_frag(9)iavf_build_skb(9)iavf_is_non_eop(9)iavf_extract_legacy_rx_fields(9)iavf_extract_flex_rx_fields(9)iavf_clean_rx_irq(9)iavf_update_enable_itr(9)iavf_napi_poll(9)iavf_tx_prepare_vlan_flags(9)iavf_tso(9)iavf_tx_enable_csum(9)iavf_create_tx_ctx(9)__iavf_maybe_stop_tx(9)iavf_tx_map(9)iavf_xmit_frame_ring(9)iavf_xmit_frame(9)
reminder bestie: the hardware cap is real, and the 7-fragments threshold is real, don't come for me, come for the DMA engine π
okay that's the page!! this one came from ./drivers/net/ethernet/intel/iavf, dated October 2026, and it's signed __iavf_chk_linearize(9) β slay, go linearize responsibly π§ππΈ
π¦ 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