[dpdk-dev] [PATCH v3 0/2] app/test: unit test to measure cycles per packet

Liu, Yong yong.liu at intel.com
Tue Oct 21 04:40:39 CEST 2014


Patch name:		PMD performance unit test
Brief description:	unit test to measure cycles per	packet
Test Flag:		Tested-by 
Tester name:		yong.liu at intel.com
Test environment:
			OS: Fedora20 3.11.10-301.fc20.x86_64
			GCC: gcc version 4.8.3 20140911
			CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
			NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb]

			
Commit ID:		455d09e54b92a4626e178b020fe9c23e43ede3f7

Detailed Testing information	
DPDK SW Configuration:
			Default x86_64-native-linuxapp-gcc configuration
Test Result Summary: 	Total 2 cases, 2 passed, 0 failed

Test Case - name:
			Continuous Mode Performance
Test Case - Description:
			Measure continuous mode cycles/packet in NIC loopback mode
Test Case -command / instruction:
			
			Set stream control mode to continuous
					RTE>>set_rxtx_sc continuous
					
			Choose rx/tx pair between vector|scalar|full|hybrid
					RTE>>set_rxtx_mode vector
					
			Start pmd performance measurement
					RTE>>pmd_perf_autotest
		
Test Case - expected test result:
			Test result is OK and output cycle number for each packet.

Test Case - name:
			Burst Mode Performance
Test Case - Description:
			Measure burst mode cycles/packet in NIC loopback mode
Test Case -command / instruction:
			Start unit test sample
			
			Set stream control mode to poll_before_xmit or  poll_after_xmit
					RTE>>set_rxtx_sc poll_before_xmit
					
			Start pmd performance measurement
					RTE>>pmd_perf_autotest
					
			Start pmd performance measurement
					RTE>>pmd_perf_autotest					
					
Test Case - expected test result:
			Test result is OK and output cycle number for each packet.

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Cunming Liang
> Sent: Monday, October 20, 2014 4:14 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v3 0/2] app/test: unit test to measure cycles per
> packet
> 
> v3 update:
> # Codes refine according to the feedback.
>   1. add ether_format_addr to rte_ether.h
>   2. fix typo in code comments.
>   3. %lu to %PRIu64, fixing 32-bit targets compilation err
> # merge 2 small incremental patches to the first one.
>   The whole unit test as a single patch in [PATCH v3 2/2]
> # rebase code to the latest master
> 
> v2 update:
> Rebase code to the latest master branch.
> 
> Tested-by: Zhaochen Zhan <zhaochen.zhan at intel.com>
> This patch has been verified on ixgbe and it is ready to be integrated to
> dpdk.org.
> For e1000 and i40e, lacking loopback supporting, this patch can't support
> them for now.
> 
> --------------
> 
> It provides unit test to measure cycles/packet in NIC loopback mode.
> It simply gives the average cycles of IO used per packet without test
> equipment.
> When doing the test, make sure the link is UP.
> 
> There's two stream control mode support, one is continues, another is burst.
> The former continues to forward the injected packets until reaching a certain
> amount of number.
> The latter one stop when all the injected packets are received.
> In burst stream, now measure two situations, with or without desc. cache
> conflict.
> By default, it runs in continues stream mode to measure the whole rxtx.
> 
> Usage Example:
> 1. Run unit test app in interactive mode
>     app/test -c f -n 4 -- -i
> 2. Set stream control mode, by default is continuous
>     set_rxtx_sc [continuous|poll_before_xmit|poll_after_xmit]
> 3. If choose continuous stream, there are another two options can configure
>     3.1 choose rx/tx pair, default is vector
>         set_rxtx_mode [vector|scalar|full|hybrid]
>         Note: To get acurate scalar fast, plz choose 'vector' or 'hybrid' without
> INC_VEC=y in config
>     3.2 choose the area of masurement, default is rxtx
>         set_rxtx_anchor [rxtx|rxonly|txonly]
> 4. Run and wait for the result
>     pmd_perf_autotest
> 
> For who simply just want to see how much cycles cost per packet.
> Compile DPDK, Run 'app/test', and type 'pmd_perf_autotest', that's it.
> Nothing else needs to configure.
> Using other options when you understand and what to measures more.
> 
> *** BLURB HERE ***
> 
> Cunming Liang (2):
>   app/test: allow to create packets in different sizes
>   app/test: measure the cost of rx/tx routines by cycle number
> 
>  app/test/Makefile                   |    1 +
>  app/test/commands.c                 |  111 +++++
>  app/test/packet_burst_generator.c   |   26 +-
>  app/test/packet_burst_generator.h   |   11 +-
>  app/test/test.h                     |    6 +
>  app/test/test_link_bonding.c        |   39 +-
>  app/test/test_pmd_perf.c            |  922
> +++++++++++++++++++++++++++++++++++
>  lib/librte_ether/rte_ether.h        |   25 +
>  lib/librte_pmd_ixgbe/ixgbe_ethdev.c |    6 +
>  9 files changed, 1114 insertions(+), 33 deletions(-)
>  create mode 100644 app/test/test_pmd_perf.c
> 
> --
> 1.7.4.1



More information about the dev mailing list