From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9D8D16A80 for ; Wed, 12 Aug 2015 09:15:53 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 12 Aug 2015 00:15:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,659,1432623600"; d="scan'208";a="782498434" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 12 Aug 2015 00:15:53 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t7C7FnPU000793; Wed, 12 Aug 2015 15:15:49 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t7C7Fl4K011801; Wed, 12 Aug 2015 15:15:49 +0800 Received: (from qxu10@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t7C7FlrR011797; Wed, 12 Aug 2015 15:15:47 +0800 From: Qian Xu To: dts@dpdk.org Date: Wed, 12 Aug 2015 15:15:45 +0800 Message-Id: <1439363745-11764-1-git-send-email-qian.q.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] Update performance test part for 40G case. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2015 07:15:54 -0000 Signed-off-by: Qian Xu For FVL40G NICs, we need 2 queues per port and the --rss-ip options for best performance, also the traffic needs to be changed, not fixed one. diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index 7acf937..afb2450 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -42,9 +42,9 @@ from plotting import Plotting from time import sleep from settings import HEADER_SIZE from pmd_output import PmdOutput +from etgen import IxiaPacketGenerator - -class TestPmd(TestCase): +class TestPmd(TestCase,IxiaPacketGenerator): def plot_results(self, number_ports): @@ -76,15 +76,17 @@ class TestPmd(TestCase): PMD prerequisites. """ + self.tester.extend_external_packet_generator(TestPmd, self) + self.frame_sizes = [64, 65, 128, 256, 512, 1024, 1280, 1518] self.rxfreet_values = [0, 8, 16, 32, 64, 128] self.test_cycles = [{'cores': '1S/1C/1T', 'Mpps': {}, 'pct': {}}, - {'cores': '1S/1C/2T', 'Mpps': {}, 'pct': {}}, {'cores': '1S/2C/1T', 'Mpps': {}, 'pct': {}}, {'cores': '1S/2C/2T', 'Mpps': {}, 'pct': {}}, - {'cores': '1S/4C/2T', 'Mpps': {}, 'pct': {}} + {'cores': '1S/4C/1T', 'Mpps': {}, 'pct': {}}, + {'cores': '1S/8C/1T', 'Mpps': {}, 'pct': {}} ] self.table_header = ['Frame Size'] @@ -151,7 +153,7 @@ class TestPmd(TestCase): core_mask = dts.create_mask(core_list) port_mask = dts.create_mask(self.dut.get_ports()) - self.pmdout.start_testpmd("all", "--coremask=%s --rxq=%d --txq=%d --portmask=%s" % (core_mask, queues, queues, port_mask)) + self.pmdout.start_testpmd("all", "--coremask=%s --rxq=%d --txq=%d --portmask=%s --rss-ip" % (core_mask, queues, queues, port_mask)) info = "Executing PMD (mac fwd) using %s\n" % test_cycle['cores'] dts.report(info, annex=True) @@ -167,9 +169,9 @@ class TestPmd(TestCase): # create pcap file self.logger.info("Running with frame size %d " % frame_size) - payload_size = frame_size - self.headers_size + payload_size = frame_size - HEADER_SIZE['eth'] - HEADER_SIZE['ip'] self.tester.scapy_append( - 'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP()/UDP()/("X"*%d)])' % payload_size) + 'wrpcap("test.pcap", [Ether(src="52:00:00:00:00:00")/IP(src="1.2.3.4",dst="1.1.1.1")/("X"*%d)])' % payload_size) self.tester.scapy_execute() # run traffic generator @@ -410,7 +412,22 @@ class TestPmd(TestCase): "packet pass assert error, expected %d TX bytes, actual %d" % (frame_size, p0tx_bytes)) return out - + + def ip(self, port, frag, src, proto, tos, dst, chksum, len, options, version, flags, ihl, ttl, id): + self.add_tcl_cmd("protocol config -name ip") + self.add_tcl_cmd('ip config -sourceIpAddr "%s"' % src) + self.add_tcl_cmd("ip config -sourceIpAddrMode ipRandom") + self.add_tcl_cmd('ip config -destIpAddr "%s"' % dst) + self.add_tcl_cmd("ip config -destIpAddrMode ipIdle") + self.add_tcl_cmd("ip config -ttl %d" % ttl) + self.add_tcl_cmd("ip config -totalLength %d" % len) + self.add_tcl_cmd("ip config -fragment %d" % frag) + self.add_tcl_cmd("ip config -ipProtocol ipV4ProtocolReserved255") + self.add_tcl_cmd("ip config -identifier %d" % id) + self.add_tcl_cmd("stream config -framesize %d" % (len + 18)) + self.add_tcl_cmd("ip set %d %d %d" % (self.chasId, port['card'], port['port'])) + + def tear_down(self): """ Run after each test case. -- 2.1.0