From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 77B815A8C for ; Wed, 4 Nov 2015 07:05:55 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 03 Nov 2015 22:05:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,241,1444719600"; d="scan'208";a="826481984" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 03 Nov 2015 22:05:54 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tA465qLF005949; Wed, 4 Nov 2015 14:05:52 +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 tA465m64007436; Wed, 4 Nov 2015 14:05:50 +0800 Received: (from hengdinx@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tA465mev007432; Wed, 4 Nov 2015 14:05:48 +0800 From: Ding Heng To: dts@dpdk.org Date: Wed, 4 Nov 2015 14:05:47 +0800 Message-Id: <1446617147-7401-1-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Ding Heng Subject: [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test. 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, 04 Nov 2015 06:05:55 -0000 Configure different flows for different port. Signed-off-by: Ding Heng diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index 392157f..5bd8592 100644 --- a/tests/TestSuite_tso.py +++ b/tests/TestSuite_tso.py @@ -306,14 +306,7 @@ class TestTSO(TestCase): # prepare traffic generator input tgen_input = [] - tgen_input.append((self.tester.get_local_port(self.dut_ports[0]), - self.tester.get_local_port(self.dut_ports[1]), - "test.pcap")) - tgen_input.append((self.tester.get_local_port(self.dut_ports[1]), - self.tester.get_local_port(self.dut_ports[0]), - "test.pcap")) - mac = self.dut.get_mac_address(self.dut_ports[0]) # run testpmd for each core config for test_cycle in self.test_cycles: core_config = test_cycle['cores'] @@ -331,8 +324,7 @@ class TestTSO(TestCase): dts.report(info, annex=True) dts.report(command_line + "\n\n", frame=True, annex=True) - self.dut.send_expect(cmd, "testpmd> ", 120) - self.dut.send_expect("set verbose 1", "testpmd> ", 120) + self.dut.send_expect(command_line, "testpmd> ", 120) self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120) self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120) self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120) @@ -354,7 +346,11 @@ class TestTSO(TestCase): # create pcap file self.logger.info("Running with frame size %d " % frame_size) payload_size = frame_size - self.headers_size - self.tester.scapy_append('wrpcap("test.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (mac, payload_size)) + for _port in range(2): + mac = self.dut.get_mac_address(self.dut_ports[_port]) + self.tester.scapy_append('wrpcap("dst%d.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (_port, mac, payload_size)) + tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]), + self.tester.get_local_port(self.dut_ports[1-_port]), "dst%d.pcap") % _port) self.tester.scapy_execute() # run traffic generator -- 1.9.3