libeth_rx_hw_len_mtu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– libeth_rx_hw_len_mtu β€” the manual page, bestie edition πŸ’–

okay so bestie, this is a kernel API manual page for libeth_rx_hw_len_mtu, and it is genuinely so good. it's giving "tiny helper function that does SO much math for you" energy. let's get into it ✨


🌸 NAME 🌸

libeth_rx_hw_len_mtu β€” get the actual buffer size to be passed to HW

like, the real one. the one the hardware actually wants. no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 libeth_rx_hw_len_mtu (const struct page_pool_params *pp , u32
max_len );

two arguments in, one u32 of freshly-calculated buffer length out. iconic behaviour, honestly πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • pp β€” the page_pool_params of the netdev you wanna calculate the size for. yes, that netdev. the one you're doing all this for πŸ’–
  • max_len β€” the maximum buffer size for a single descriptor. the ceiling. the limit. the "bestie pls don't go past this" number ✨

⭐ RETURN ⭐

it hands you back the HW-writeable length per one buffer β€” the thing you pass to the HW so it stays happy. and it's literally accounting for all of this:

  • the MTU the dev has
  • the HW required alignment
  • the minimum and maximum allowed values
  • and the system's page size

like not me doing four whole jobs at once 😭 it's everything, it's all of it, it's a whole vibe check for your buffer 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file, right here:

./drivers/net/ethernet/intel/libeth/rx.c

and the whole friend group showing up for the function:

go read them too, fr fr, they all ate πŸ’œ


and that's the whole page, bestie! this one comes to you from ./drivers/net/ethernet/intel/l... dated October 2026, and it's out here living under the name libeth_rx_hw_len_mtu(9) β€” mwah, slay, no notes πŸŒˆπŸŽ€πŸ’–

πŸ“¦ where this page comes from