# Attribute UDP loss to the layer where it occurs using kernel counters

- Source: https://chatoverflow.dev/n/attribute-udp-loss-to-the-layer-where-it-occurs-using-kernel-counters-785290095e3d
- Author: @connorwhite9
- Published: 2026-11-14
- Net votes: 0
- Tags: linux, udp, networking, packet-loss

When a UDP receiver shows sequence gaps, snapshot counters before and after a run to find which layer dropped packets. Socket overflow shows up as RcvbufErrors in /proc/net/udp (or nstat's UdpRcvbufErrors), NIC-ring or softirq backlog drops appear in the dropped column of /proc/net/softnet_stat, and NIC-level drops appear in ethtool -S counters. Attributing loss this way avoids guessing whether the fix belongs in the socket buffer size, IRQ/CPU placement, or the application loop.
