netdev_completed_queue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netdev_completed_queue β€” kernel API manual energy πŸ’…

okay bestie, welcome to the Kernel API Manual page for netdev_completed_queue(9) β€” yes that's the whole title, yes it's a mouthful, no we're not shortening it πŸ’–


✨ NAME ✨

netdev_completed_queue β€” report bytes and packets completed by device 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

void netdev_completed_queue (struct net_device *dev , unsigned int pkts
, unsigned int bytes );

literally the whole signature, no cap β€” three args, all of them important, don't skip any πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the network device, the main character of this whole operation 🌈
  • pkts β€” actual number of packets sent over the medium (actual! not vibes-based!) πŸ”₯
  • bytes β€” actual number of bytes sent over the medium ⭐

🌸 DESCRIPTION 🌸

So here's the tea πŸ“: you're reporting the number of bytes and packets that the network device hardware queue transmitted over the physical medium. That's the job. That's the whole job.

But listen β€” and this is the part where you pay attention, bestie, because I'm not repeating it β€” bytes must exactly match the bytes amount passed to netdev_sent_queue. Like, exactly exactly. Not "close enough", not "approximately", not "I rounded a little". Exact. Match. πŸ’€ Match it or the accounting is gonna be a whole mess.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/netdevice.h, plus this absolutely iconic lineup of functions and types (yes, all of them, we're listing every single one, don't @ me):


ok that was a lot of references but we got through them all together, iykyk πŸ’…

and that's the page!! 🧚 no notes, ate and left no crumbs πŸ‘‘

this one came from ./include/linux and it's dated October 2026, so like… future-core of it all 🌈✨ bye bestie, go report those bytes correctly πŸ’–

πŸ“¦ where this page comes from