tcpreplay icon indicating copy to clipboard operation
tcpreplay copied to clipboard

netmap injector enhancement

Open fklassen opened this issue 10 years ago • 0 comments

I would like to submit an enhancement that in my test environment is achieving full wire-rate with tcpreplay on my Intel 10GigE ixgbe (82599) adapter. I am also able to achieve full wire rate on Intel igb (server i350) GigE adapters. Note that I am only achieving 900Mbps on Intel e1000e (desktop 82574L) adapters, which appears to be the physical limitation of this adapter.

Performance is gained by replacing network drivers with netmap enabled drivers. These drivers by default run in normal mode, but once tcpreplay switches the driver to bypass mode, the network driver is bypassed and tcpreplay can write directly into the network adapter buffers. Netmap is available here http://info.iet.unipi.it/~luigi/netmap/

Typically the injector method is selected at compile time. I propose that in cases where tcpreplay is specifically compiled with netmap functionality, that the injector is dynamically selected. Upon initialization it will query (via ioctl) the adapter's ability to run in netmap mode, in which case the adapter will be switched to bypass mode for the duration of the tcpreplay execution. Otherwise the execution uses the default injector.

I also propose that an informational message be printed that states the injector method uses in cases where netmap functionality is available.

fklassen avatar Nov 21 '13 17:11 fklassen