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 3E7AC8D99 for ; Fri, 20 Nov 2015 01:43:02 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 19 Nov 2015 16:43:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,319,1444719600"; d="scan'208";a="824592823" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga001.jf.intel.com with ESMTP; 19 Nov 2015 16:43:00 -0800 From: Shijiex Dong To: dts@dpdk.org Date: Fri, 20 Nov 2015 08:38:28 +0800 Message-Id: <1447979908-14386-1-git-send-email-shijiex.dong@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH]tests fdir, nvgre, vxlan: reduce cores to run testpmd on 32bit system 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: Fri, 20 Nov 2015 00:43:03 -0000 From: Lijuan Tu Signed-off-by: Lijuan Tu --- tests/TestSuite_fdir.py | 23 +++++++++++++---------- tests/TestSuite_nvgre.py | 18 +++++++++--------- tests/TestSuite_vxlan.py | 10 +++++----- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index 1f691a0..fa4a3ef 100644 --- a/tests/TestSuite_fdir.py +++ b/tests/TestSuite_fdir.py @@ -165,6 +165,9 @@ class TestFdir(TestCase, IxiaPacketGenerator): # Verify that enough threads are available self.all_cores_mask = dts.create_mask(self.dut.get_core_list("all")) + cores = self.dut.get_core_list("1S/5C/1T") + self.verify(cores is not None, "Insufficient cores for speed testing") + self.coreMask = dts.create_mask(cores) self.portMask = dts.create_mask([self.dut_ports[0], self.dut_ports[1]]) self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) self.dut_rx_port = self.tester.get_local_port(self.dut_ports[0]) @@ -262,7 +265,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): """ self.dut.kill_all() - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -338,10 +341,10 @@ class TestFdir(TestCase, IxiaPacketGenerator): self.dut.kill_all() if self.nic in ["niantic"]: # Niantic ipv6 only support signature mode - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]: # Fortville ipv6 support perfect mode - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -409,7 +412,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): def test_fdir_noflexword_drop_ipv4(self): # drop command testing self.dut.kill_all() - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -481,7 +484,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): # drop command testing self.dut.kill_all() - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -538,7 +541,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): self.dut.kill_all() # fwd testing with flexword - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -614,10 +617,10 @@ class TestFdir(TestCase, IxiaPacketGenerator): # fwd testing with flexword if self.nic in ["niantic"]: # Niantic ipv6 only support signature mode - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=signature" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) elif self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]: # fortville ipv6 support perfect mode - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -684,7 +687,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): def test_fdir_flexword_drop_ipv4(self): # drop testing with flexword - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") @@ -736,7 +739,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): # Niantic is not support in drop ipv6 if (self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]): # drop testing with flexword - self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=8 --txq=8 --nb-cores=16 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.all_cores_mask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) + self.dut.send_expect("./%s/app/testpmd -c %s -n 4 -- -i --portmask=%s --disable-rss --rxq=4 --txq=4 --nb-cores=4 --nb-ports=1 --pkt-filter-mode=perfect" % (self.target, self.coreMask, dts.create_mask([self.dut_ports[0]])), "testpmd>", 120) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd rxonly", "testpmd>") diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index 86609ab..a73af86 100644 --- a/tests/TestSuite_nvgre.py +++ b/tests/TestSuite_nvgre.py @@ -360,7 +360,7 @@ class TestNvgre(TestCase): # Verify that enough threads are available self.all_cores_mask = dts.create_mask(self.dut.get_core_list("all")) - cores = self.dut.get_core_list("1S/2C/2T") + cores = self.dut.get_core_list("1S/5C/1T") self.verify(cores is not None, "Insufficient cores for speed testing") self.coremask = dts.create_mask(cores) @@ -434,8 +434,8 @@ class TestNvgre(TestCase): """ send nvgre packet and check whether testpmd detect the correct packet type """ - out = self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=8 --portmask=%s --txqflags=0" - % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + out = self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --txqflags=0" + % (self.target, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) print out out = self.dut.send_expect("set fwd rxonly", "testpmd>", 10) print out @@ -467,8 +467,8 @@ class TestNvgre(TestCase): """ send nvgre packet and check whether receive packet in assigned queue """ - self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=8 --portmask=%s --txqflags=0" - % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --txqflags=0" + % (self.target, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) self.dut.send_expect("set fwd rxonly", "testpmd>", 10) self.dut.send_expect("set verbose 1", "testpmd>", 10) @@ -532,8 +532,8 @@ class TestNvgre(TestCase): self.logger.info("chksums_wrong" + str(chksums)) # start testpmd with 2queue/1port - out = self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=8 --portmask=%s --enable-rx-cksum --txqflags=0" - % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + out = self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --enable-rx-cksum --txqflags=0" + % (self.target, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) print out # enable tx checksum offload self.dut.send_expect("set verbose 1", "testpmd>", 10) @@ -675,8 +675,8 @@ class TestNvgre(TestCase): self.nvgre_filter(filter_type="imac", remove=True) config = NvgreTestConfig(self) # config.outer_mac_dst = self.dut_port_mac - self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=8 --portmask=%s --txqflags=0" - % (self.target, self.all_cores_mask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + self.dut.send_expect("./%s/app/testpmd -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --txqflags=0" + % (self.target, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) out = self.dut.send_expect("tunnel_filter add %d %s %s %s %d nvgre %s %d %d" % (self.dut_rx_port, config.outer_mac_dst, self.invalid_mac, config.inner_ip_dst, vlan_id, filter_type, config.tni, queue_id), "testpmd>", 10) diff --git a/tests/TestSuite_vxlan.py b/tests/TestSuite_vxlan.py index cefe817..f766915 100644 --- a/tests/TestSuite_vxlan.py +++ b/tests/TestSuite_vxlan.py @@ -278,7 +278,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): # Verify that enough threads are available netdev = self.dut.ports_info[ports[0]]['port'] self.ports_socket = netdev.socket - cores = self.dut.get_core_list("1S/5C/2T", socket=self.ports_socket) + cores = self.dut.get_core_list("1S/5C/1T", socket=self.ports_socket) self.verify(cores is not None, "Insufficient cores for speed testing") self.coremask = dts.create_mask(cores) @@ -368,7 +368,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): """ pmd_temp = "./%(TARGET)s/app/testpmd -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ - " --nb-cores=8 --portmask=%(PORT)s --txqflags=0x0" + " --nb-cores=4 --portmask=%(PORT)s --txqflags=0x0" pmd_cmd = pmd_temp % {'TARGET': self.target, 'COREMASK': self.coremask, 'CHANNEL': self.dut.get_memory_channels(), @@ -468,7 +468,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): # start testpmd with 2queue/1port pmd_temp = "./%(TARGET)s/app/testpmd -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ - " --nb-cores=8 --portmask=%(PORT)s --txqflags=0x0" + " --nb-cores=4 --portmask=%(PORT)s --txqflags=0x0" pmd_cmd = pmd_temp % {'TARGET': self.target, 'COREMASK': self.coremask, 'CHANNEL': self.dut.get_memory_channels(), @@ -557,7 +557,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): """ pmd_temp = "./%(TARGET)s/app/testpmd -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ - " --nb-cores=8 --portmask=%(PORT)s --txqflags=0x0" + " --nb-cores=4 --portmask=%(PORT)s --txqflags=0x0" pmd_cmd = pmd_temp % {'TARGET': self.target, 'COREMASK': self.coremask, 'CHANNEL': self.dut.get_memory_channels(), @@ -773,7 +773,7 @@ class TestVxlan(TestCase, IxiaPacketGenerator): pmd_temp = "./%(TARGET)s/app/testpmd -c %(COREMASK)s -n " + \ "%(CHANNEL)d -- -i --disable-rss --rxq=4 --txq=4" + \ - " --nb-cores=8 --portmask=%(PORT)s --txqflags=0x0" + " --nb-cores=4 --portmask=%(PORT)s --txqflags=0x0" pmd_cmd = pmd_temp % {'TARGET': self.target, 'COREMASK': self.coremask, 'CHANNEL': self.dut.get_memory_channels(), -- 1.9.1