drop

command
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

drop is a UDP packet sink: it receives every packet sent to a UDP port and throws it away. Because it does almost no work per packet, it's a handy way to measure how fast this library (and your NIC) can pull packets into userspace — i.e. raw receive packets-per-second.

go build -o drop ./examples/drop
sudo ./drop -iface eth0 -port 9999

Then blast it from another machine, e.g. with a UDP flood generator:

# small packets stress pps; large packets stress bandwidth
sudo pktgen / udpblast / iperf3 -u -c <host> -p 9999 -b 0 -l 64

It prints receive pps and bit/s once a second, plus drop counters split into nic-side (the NIC ran out of rx descriptors) and app-side (this program didn't drain its rx ring fast enough, broken out per queue) so you can see whether you're losing packets and which stage is the bottleneck.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL