-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
Description
Describe the bug
when using --xdp, tcpreplay sends traffic at maximum speed. I have a file rec1-4-4.pcap at rate ~153Mbps, but AF_XDP tcpreplay sender sends it at maximum speed:
tcpreplay --xdp --no-flow-stats -W -i veth-replay rec1-4-4.pcap
Actual: 446032 packets (614632096 bytes) sent in 0.936726 seconds
Rated: 656149285.9 Bps, 5249.19 Mbps, 476160.58 pps
Statistics for network device: veth-replay
Successful packets: 446032
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
When I use non-xdp sender variant, it works as expected (sends ~153Mbps):
tcpreplay --no-flow-stats -W -i veth-replay rec1-4-4.pcap
Actual: 446032 packets (614632096 bytes) sent in 32.07 seconds
Rated: 19164560.9 Bps, 153.31 Mbps, 13907.51 pps
Statistics for network device: veth-replay
Successful packets: 446032
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
To Reproduce
Steps to reproduce the behavior:
- Create veth pair (ip link add type veth, ip link set dev veth0 up, ip link set veth1 up)
- Run
tcpreplay --xdp --no-flow-stats -W -i veth0 file.pcap - Check if sending speed is the same as in file, compare xdp and non-xdp sending mode (remove
--xdp)
Expected behavior
xdp mode should respect .pcap timestamps (send at the same speed as it was recorded)
Screenshots
System (please complete the following information):
- OS: Ubuntu
- OS version: 24.04
- Tcpreplay Version 4.5.1
Additional context
tcpreplay version: 4.5.1 (build git:v4.5.1)
Copyright 2013-2024 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta
Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>
The entire Tcpreplay Suite is licensed under the GPLv3
Cache file supported: 04
Not compiled with libdnet.
Compiled against libpcap: 1.10.4
64 bit packet counters: enabled
Verbose printing via tcpdump: disabled
Packet editing: disabled
Fragroute engine: disabled
Injection method: PF_PACKET send()
Not compiled with netmap
Optional injection method: AF_XDP```
Reactions are currently unavailable