fm10k_add_rx_frag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ fm10k_add_rx_frag(9) β€” the group chat edition πŸŽ€

okay so real talk, bestie: we're in the fm10k section 9 kernel API manual, and today's main character is fm10k_add_rx_frag. she's a tiny little helper in drivers/net/ethernet/intel/fm10k/fm10k_main.c and honestly? she eats. let's get into it πŸ’…


✨ NAME ✨

fm10k_add_rx_frag β€” Add contents of Rx buffer to sk_buff

like, literally what it says on the tin: the Rx buffer's contents get added into the sk_buff. no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

bool fm10k_add_rx_frag (struct fm10k_rx_buffer *rx_buffer , unsigned int
size , union fm10k_rx_desc *rx_desc , struct sk_buff *skb );

she takes four things and gives you back a bool. iconic signature tbh. returns true/false, not a struct, not a pointer, just vibes and a boolean. 🫢


πŸ’– ARGUMENTS πŸ’–

  • rx_buffer β€” the buffer containing the page to add. that's her whole moment, she's holding a page and she's ready to hand it over πŸŽ€
  • size β€” packet size from rx_desc. yes, the size comes from the descriptor, keep up bestie ✨
  • rx_desc β€” the descriptor containing the length of the buffer written by hardware. hardware did the writing, rx_desc is the receipt πŸ”₯
  • skb β€” the sk_buff to place the data into. this is the destination, the final boss, the place where the data lives πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. this function will add the data contained in rx_buffer->page to the skb. that's the whole assignment. πŸ“š

how she does it is genuinely kind of clever β€” it depends:

  • if the data in the buffer is less than the skb header size, she does a direct copy. simple, straightforward, no drama.
  • otherwise, she just attaches the page as a frag to the skb. not me avoiding the copy… lowkey efficient πŸ’…

then, the function will update the page offset if necessary β€” like, if things shifted, she handles it, don't worry β€” and return true if the buffer can be reused by the interface. so that bool wasn't decorative! it's a whole vibe check on whether your buffer lives to see another packet. ⭐

bestie psa: the return value is not a "did it work" β€” it's a "can the interface reuse this buffer now". read it right or you WILL be confused. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/ethernet/intel/fm10k/fm10k_main.c

and the whole extended fam, in the order they were listed (yes, all of them, I'm not skipping anyone, everyone gets their moment πŸ’–):

fm10k_init_module(9), fm10k_exit_module(9), fm10k_alloc_rx_buffers(9), fm10k_reuse_rx_page(9), fm10k_process_skb_fields(9), fm10k_is_non_eop(9), fm10k_cleanup_headers(9), fm10k_receive_skb(9), fm10k_get_tx_pending(9), fm10k_tx_timeout_reset(9), fm10k_clean_tx_irq(9), fm10k_update_itr(9), fm10k_set_qos_queues(9), fm10k_set_rss_queues(9), fm10k_set_num_queues(9), fm10k_reset_num_queues(9), fm10k_alloc_q_vector(9), fm10k_free_q_vector(9), fm10k_alloc_q_vectors(9), fm10k_free_q_vectors(9), fm10k_reset_msix_capability(9), fm10k_init_msix_capability(9), fm10k_cache_ring_qos(9), fm10k_cache_ring_rss(9), fm10k_assign_rings(9), fm10k_init_queueing_scheme(9), fm10k_clear_queueing_scheme(9)

go read them. all of them. you'll be smarter, i promise. 🌈


and that's the whole page, bestie!! πŸ“ source is that lil abbreviated path ./drivers/net/ethernet/intel/f... and the date is October 2026 β€” so yes, this manual page is from the future, and she's still serving fm10k_add_rx_frag(9) realness. mwah πŸ’‹πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from