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.
Click to show internal directories.
Click to hide internal directories.