From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C43CC567C for ; Mon, 14 Dec 2015 10:38:22 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 14 Dec 2015 01:36:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,426,1444719600"; d="scan'208";a="873090530" Received: from shilc102.sh.intel.com ([10.239.39.44]) by fmsmga002.fm.intel.com with ESMTP; 14 Dec 2015 01:36:20 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com with ESMTP id tBE9aIpE009195; Mon, 14 Dec 2015 17:36:18 +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 tBE9aFVk002015; Mon, 14 Dec 2015 17:36:17 +0800 Received: (from hengdinx@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tBE9aFkY002011; Mon, 14 Dec 2015 17:36:15 +0800 From: Ding Heng To: dts@dpdk.org Date: Mon, 14 Dec 2015 17:36:15 +0800 Message-Id: <1450085775-1980-1-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Ding Heng Subject: [dts] [PATCH] L3fwd: Enable RFC2544 for some 2 ports cases 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: Mon, 14 Dec 2015 09:38:23 -0000 Enable RFC2544 test for l3fwd 2 ports cases. In order to save time, only 1S/1C/1T and 1S/4C/1T cases will be enabled, the others' result will be set 0. Signed-off-by: Ding Heng diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index 0e09256..ea4e3ca 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -521,7 +521,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): L3fwd main 2 ports. """ - header_row = ["Frame", "Ports", "S/C/T", "Mpps", "% linerate", "mode"] + header_row = ["Frame", "mode", "S/C/T", "Mpps", "% linerate", "LR_tx_pkts(2mins)", "LR_rx_pkts(2mins)", "LR_loss_pkts(2mins)", "% zero_loss_rate"] self.l3fwd_test_results['header'] = header_row dts.results_table_add_header(header_row) self.l3fwd_test_results['data'] = [] @@ -533,7 +533,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): HEADER_SIZE['ip'] - HEADER_SIZE['eth'] for _port in range(2): dmac = self.dut.get_mac_address(valports[_port]) - flows = ['Ether(dst=%s)/%s/("X"*%d)' % (dmac, flow, payload_size) for flow in self.flows()[_port *2:(_port +1)*2]] + flows = ['Ether(dst="%s")/%s/("X"*%d)' % (dmac, flow, payload_size) for flow in self.flows()[_port *2:(_port +1)*2]] self.tester.scapy_append('wrpcap("dst%d.pcap", [%s])' %(valports[_port],string.join(flows,','))) self.tester.scapy_execute() @@ -605,13 +605,18 @@ class TestL3fwd(TestCase,IxiaPacketGenerator): pps /= 1000000.0 linerate = self.wirespeed(self.nic, frame_size, 2) pct = pps * 100 / linerate + if mode == "lpm" and (cores == "1S/1C/1T" or cores == "1S/4C/1T"): + zero_loss_rate, tx_pkts, rx_pkts = self.tester.run_rfc2544(tgenInput, delay=3) + loss_pkts = tx_pkts - rx_pkts + else: + zero_loss_rate=tx_pkts=rx_pkts=loss_pkts=0 index += 1 # Stop l3fwd self.dut.send_expect("^C", "#") - data_row = [frame_size, 2, cores, str(pps), str(pct), mode] + data_row = [frame_size, mode, cores, str(pps), str(pct), tx_pkts, rx_pkts, loss_pkts, zero_loss_rate] dts.results_table_add_row(data_row) self.l3fwd_test_results['data'].append(data_row) -- 1.9.3