[dpdk-users] Howto control sending IFG

Paul Emmerich emmericp at net.in.tum.de
Tue Nov 15 15:56:21 CET 2016


> VERDOUX, Sylvain <s.verdoux at evs.com>:
> Using i40e pmd i'm currently trying to control precisely packets emission rate. When dealing with an IFG (inter frame gap) of 1ms it works fine, but dealing with IFG under 100us I'm seeing bursts on the receiver. I was wondering if there was a better way to be close to the wanted IFG instead of waiting and using rte_eth_tx_burst with 1 packet at a time. I did not see anything relevant in mbuf structure, and I was wondering if tx queue threshold could help, but I'm not sure to understand well the impact of those thresholds.
> Any advice is welcome :)

precision of IFGs is a tough problem for software packet generators.
You can get to about +/- 1 us for >= 99.9% of the packets with carefully timed busy waits and RDTSC and avoiding doing anything else in the tx thread.
You can even get to +/- 0.2us for ~99% of the packets.

One possible hack is to fill the gaps with invalid packets instead of real gaps. This relies on your device under test detecting and dropping these
invalid packets early in hardware. Incorrect CRC checksums work well for this (requires a patched driver).

I've implemented both in my packet generator: https://github.com/emmericp/MoonGen
You can read more about in Section 7 and 8 of our paper: https://www.net.in.tum.de/fileadmin/bibtex/publications/papers/MoonGen_IMC2015.pdf
(Hardware rate control described there does not work on i40e if precision is required (it generates bursty traffic)).


More information about the users mailing list