libeth_rx_sync_for_cpu(9)
π libeth_rx_sync_for_cpu β the kernel API manual, but make it make sense
okay so bestie, welcome to the libeth_rx_sync_for_cpu(9) page, straight out of the Kernel API Manual β¨ this one's short and sweet and honestly kind of iconic β it's the little helper that decides whether a freshly-DMA'd buffer has actual data in it or is just gonna get yeeted right back. no cap, let's get into it π«Ά
πΈ NAME πΈ
libeth_rx_sync_for_cpu β synchronize or recycle a buffer post DMA. like, after the hardware's done writing to it, this is the vibe-check function π
β¨ SYNOPSIS β¨
bool libeth_rx_sync_for_cpu(const struct libeth_fqe *fqe, u32 len);
one function, two args, returns a bool. simple. elegant. we love her π
π ARGUMENTS π
fqeβ the buffer to process, bestie. it's aconst struct libeth_fqe *, so hands off the contents, we're just here to look π¦lenβ the frame length, theu32you pulled straight off the descriptor. this is how much the HW said it wrote β¨
π DESCRIPTION π
so here's the tea π΅ this function processes the buffer after the hardware has written to it β like, HW already did its thing, the DMA is done, we're in the post-game now.
the regular path? it synchronizes DMA for the CPU so we can actually read the bytes without everything going sideways π that's the main character path, that's the one you know and love.
but β and this is the part where it gets cute β if there's no data, the buffer doesn't just sit there awkwardly. nope. it gets immediately recycled back to its PP. instant. no waiting, no small talk. it's giving "thank u, next" π¦
fr fr there are two outcomes here and the function picks one for you: sync-for-CPU, or yeet-back-to-PP. that's the whole plot π
β RETURN β
- returns
truewhen there's data to process π₯ - returns
falseotherwise π
that's it. that's the return value. flow control via vibes π
π SEE ALSO π
if you're the kind of person who reads the whole series (and honestly? obsessed), go look at:
- the kernel file
./include/net/libeth/rx.h struct libeth_fqe(9)enum libeth_fqe_type(9)struct libeth_fq(9)libeth_rx_alloc(9)struct libeth_rx_csum(9)struct libeth_rqe_info(9)libeth_rx_pt_get_ip_ver(9)libeth_rx_pt_set_hash(9)
all of these are literally in the same friend group, iykyk π§π
and that's the whole page, bestie!! this one lives in ./include/net/libeth, dated October 2026 β so mark your calendars and go sync some buffers πβ¨π
π¦ 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