From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 15B9558D2 for ; Mon, 25 Aug 2014 08:09:17 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 24 Aug 2014 23:13:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,395,1406617200"; d="scan'208";a="472215980" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by azsmga001.ch.intel.com with ESMTP; 24 Aug 2014 23:13:08 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s7P6D7nL009907; Mon, 25 Aug 2014 14:13:07 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s7P6D3SV011375; Mon, 25 Aug 2014 14:13:05 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s7P6D3V9011371; Mon, 25 Aug 2014 14:13:03 +0800 From: Cunming Liang To: dev@dpdk.org Date: Mon, 25 Aug 2014 14:12:49 +0800 Message-Id: <1408947174-11323-1-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH 0/5] 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, 25 Aug 2014 06:09:18 -0000 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. Cunming Liang (5): app/test: unit test for rx and tx cycles/packet app/test: measure standalone rx or tx cycles/packet ixgbe/vpmd: add fix to store unaligned mbuf point array app/test: add unit test to measure RX burst cycles app/test: allow to create packets in different sizes app/test/Makefile | 1 + app/test/commands.c | 114 +++++ app/test/packet_burst_generator.c | 26 +- app/test/packet_burst_generator.h | 11 +- app/test/test.h | 8 + app/test/test_link_bonding.c | 39 +- app/test/test_pmd_perf.c | 918 ++++++++++++++++++++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 6 + lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 4 +- 9 files changed, 1092 insertions(+), 35 deletions(-) create mode 100644 app/test/test_pmd_perf.c -- 1.8.1.4