app/test: measure cycles per packet in Rx/Tx
authorCunming Liang <cunming.liang@intel.com>
Wed, 12 Nov 2014 06:24:35 +0000 (14:24 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 12 Nov 2014 23:52:29 +0000 (00:52 +0100)
commit002ade70e93391ec43bd3653bfac01253343d111
treee5713d13a62966d21f4bc4833b3228ee313fe9b4
parenta9c9e9698d5e8260b2c7f627ac9ae3c73ebbb8cb
app/test: measure cycles per packet in Rx/Tx

The unit test can be used to measure cycles per packet in different rx/tx routines.
The NIC works in loopback mode. So it doesn't require test equipment to measure throughput.
As result, the unit test shows the average cycles per packet consuming.
When doing the test, make sure the link is UP.

Usage Example:
1. Run unit test app in interactive mode
    app/test -c f -n 4 -- -i
2. Run and wait for the result
    pmd_perf_autotest

There's option to choose rx/tx pair, default is vector.
    set_rxtx_mode [vector|scalar|full|hybrid]
Note: To get acurate scalar fast, please choose 'vector' or 'hybrid' without INC_VEC=y in config

It supports to measure standalone rx or tx.
Usage Example:
Choose rx or tx standalone, default is both
    set_rxtx_anchor [rxtx|rxonly|txonly]

It also supports to measure standalone RX burst cycles.
In this way, it won't repeat re-send received packets.
Now it measures two situations, poll before/after xmit(w or w/o desc. cache conflict)
Usage Example:
Set stream control mode, by default is continuous
    set_rxtx_sc [continuous|poll_before_xmit|poll_after_xmit]

Test report: http://dpdk.org/ml/archives/dev/2014-October/007145.html

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Yong Liu <yong.liu@intel.com>
app/test/Makefile
app/test/commands.c
app/test/test.h
app/test/test_pmd_perf.c [new file with mode: 0644]