netdev_completed_queue(9)
π 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):
gro_node(9)napi_is_scheduled(9)napi_schedule(9)napi_schedule_irqoff(9)napi_complete_done(9)napi_synchronize(9)napi_if_scheduled_mark_missed(9)enum netdev_priv_flags(9)struct net_device(9)netdev_priv(9)netdev_from_priv(9)netif_napi_add(9)netif_napi_add_config(9)netif_napi_add_tx(9)__netif_napi_del(9)netif_napi_del(9)netif_start_queue(9)netif_wake_queue(9)netif_stop_queue(9)netif_queue_stopped(9)netdev_queue_set_dql_min_limit(9)netdev_txq_bql_enqueue_prefetchw(9)netdev_txq_bql_complete_prefetchw(9)netdev_tx_sent_queue(9)netdev_sent_queue(9)netdev_tx_completed_queue(9)netdev_tx_reset_subqueue(9)netdev_reset_queue(9)netdev_cap_txqueue(9)netif_running(9)netif_start_subqueue(9)netif_stop_subqueue(9)__netif_subqueue_stopped(9)netif_subqueue_stopped(9)netif_wake_subqueue(9)netif_attr_test_mask(9)netif_attr_test_online(9)netif_attrmask_next(9)netif_attrmask_next_and(9)netif_is_multiqueue(9)dev_hold(9)dev_put(9)linkwatch_sync_dev(9)netif_carrier_ok(9)netif_dormant_on(9)netif_dormant_off(9)netif_dormant(9)netif_testing_on(9)netif_testing_off(9)netif_testing(9)netif_oper_up(9)netif_device_present(9)netif_tx_lock(9)__dev_uc_sync(9)__dev_uc_unsync(9)__dev_mc_sync(9)__dev_mc_unsync(9)
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
- 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