From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B61087F35 for ; Mon, 27 Oct 2014 02:39:11 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 26 Oct 2014 18:46:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,792,1406617200"; d="scan'208";a="625948341" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by orsmga002.jf.intel.com with ESMTP; 26 Oct 2014 18:47:40 -0700 Received: from pgsmsx104.gar.corp.intel.com (10.221.44.91) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 27 Oct 2014 09:45:27 +0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 27 Oct 2014 09:45:27 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.207]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.44]) with mapi id 14.03.0195.001; Mon, 27 Oct 2014 09:45:26 +0800 From: "Liu, Yong" To: "Liang, Cunming" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6 0/3] app/test: unit test to measure cycles per packet Thread-Index: AQHP8YRRoLVotOZmVE2Psh407qGVJ5xDLDtQ Date: Mon, 27 Oct 2014 01:45:25 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10CF7A38@SHSMSX103.ccr.corp.intel.com> References: <1414130282-17981-1-git-send-email-cunming.liang@intel.com> <1414372809-14044-1-git-send-email-cunming.liang@intel.com> In-Reply-To: <1414372809-14044-1-git-send-email-cunming.liang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v6 0/3] app/test: unit test to measure cycles per packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2014 01:39:12 -0000 Tested-by: Yong Liu - Tested Commit: 1ab07743b21b785a71fa334641ab58e779532600 - OS: Fedora20 3.15.8-200.fc20.x86_64 - GCC: gcc version 4.8.3 20140624 - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [80= 86:10fb] - Default x86_64-native-linuxapp-gcc configuration - Total 2 cases, 2 passed, 0 failed - Case: Continuous Mode Performance Description: Measure continous mode cycles/packet in NIC loopback mode=20 Command / instruction: Start sample test application. ./app/test/test -n 1 -c ffff 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 Choose the area of measurement RTE>>set_rxtx_anchor rxtx Start pmd performance measurement RTE>>pmd_perf_autotest Expected test result: Test result is OK and output cycle number for each packet. =09 - Case: Burst Mode Performance Description: Measure burst mode cycles/packet in NIC loopback mode Command / instruction: Start sample test application. ./app/test/test -n 1 -c ffff Set stream control mode to poll_before_xmit or poll_after_xmit.=09 RTE>>set_rxtx_sc poll_before_xmit Start pmd performance measurement RTE>>pmd_perf_autotest Expected test result: Test result is OK and output cycle number for each packet. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Cunming Liang > Sent: Monday, October 27, 2014 9:20 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v6 0/3] app/test: unit test to measure cycles = per > packet >=20 > v6 update: > # leave FUNC_PTR_OR_*_RET unmodified >=20 > v5 update: > # fix the confusing of retval in some API of rte_ethdev >=20 > v4 ignore >=20 > 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 >=20 > v2 update: > Rebase code to the latest master branch. >=20 > 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. >=20 > There's two stream control mode support, one is continues, another is bur= st. > The former continues to forward the injected packets until reaching a cer= tain > 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. >=20 > 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 configu= re > 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=3Dy 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 >=20 > 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. >=20 >=20 > BTW, [1/3] is the same patch as below one. > http://dpdk.org/dev/patchwork/patch/817 >=20 > *** BLURB HERE *** >=20 > Cunming Liang (3): > app/test: allow to create packets in different sizes > app/test: measure the cost of rx/tx routines by cycle number > ethdev: fix wrong error return refere to API definition >=20 > 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_ethdev.c | 6 +- > lib/librte_ether/rte_ether.h | 25 + > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 + > 10 files changed, 1117 insertions(+), 36 deletions(-) > create mode 100644 app/test/test_pmd_perf.c >=20 > -- > 1.7.4.1