libeth_rx_sync_for_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a const struct libeth_fqe *, so hands off the contents, we're just here to look πŸ¦‹
  • len β€” the frame length, the u32 you 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 true when there's data to process πŸ”₯
  • returns false otherwise πŸŽ€

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:

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