libeth_rx_hw_len_truesize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… libeth_rx_hw_len_truesize(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real talk, this is a page straight out of the Kernel API Manual and we're about to get into it. the function is libeth_rx_hw_len_truesize, yes the whole mouthful, and honestly? she's iconic for it. πŸ¦‹


✨ NAME ✨

libeth_rx_hw_len_truesize β€” literally just get the short buffer size that you pass to HW. that's the whole vibe check. πŸ’«


🌸 SYNOPSIS 🌸

u32 libeth_rx_hw_len_truesize (const struct page_pool_params *pp , u32
max_len , u32 truesize );

not me copying this character for character because bestie, accuracy is the moment. πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • pp β€” the page_pool_params of the netdev you're calculating the size for. like, whose page pool are we doing this for, be specific. πŸ‘‘
  • max_len β€” the maximum buffer size for a single descriptor. the ceiling, the limit, the "don't @ me" number. πŸ’œ
  • truesize β€” the desired truesize for the buffers. what you want, not necessarily what you get. manifesting, but with math. 🧚

⭐ RETURN ⭐

so this returns the HW-writeable length per one buffer, which you then pass to the HW, and the way it does that is by ignoring the MTU and getting as close as it can to the truesize you passed in. lowkey chaotic of it, but that's the assignment. 😭

and what's the point? it's for "short" buffer queues, so you can fragment pages more efficiently. slay, honestly. more efficient fragmentation is main character energy. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

all of these are her friends, iykyk. πŸ’…


ngl this all lives in ./drivers/net/ethernet/intel/l... and the page is dated October 2026, so like, mark your calendars bestie. ⭐

and that's the whole page, no cap. hope this helped fr fr β€” go fragment some pages efficiently, you absolute legend. πŸŒˆπŸ’–πŸ“

πŸ“¦ where this page comes from