From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9048CA04DC; Fri, 4 Sep 2020 10:17:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A8EE1C0DB; Fri, 4 Sep 2020 10:17:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1C3A31C0CE for ; Fri, 4 Sep 2020 10:17:20 +0200 (CEST) IronPort-SDR: bjyyNvemcT9Qi2ESmmDM+Jxren3TDZIbIq8n0sd0GB3LgU5+1322AYNDCUQNfPUoQm30oj+YX1 uc6PSnN5vH8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="175763277" X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="175763277" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 01:17:20 -0700 IronPort-SDR: C9lsLEf+V8QlUJ/aTn8vpAoCHJAhodtdBJeINJk/7LQqO9j/bqFPcRzrXXmmJgucsvxYhIMPct xEQ2IuUoAjCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="315782638" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.182.150]) by orsmga002.jf.intel.com with ESMTP; 04 Sep 2020 01:17:19 -0700 From: xizhan4x To: dts@dpdk.org Cc: xizhan4x Date: Fri, 4 Sep 2020 16:18:19 +0800 Message-Id: <1599207525-22123-12-git-send-email-xix.zhang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> References: <1599207525-22123-1-git-send-email-xix.zhang@intel.com> Subject: [dts] [dts 12/38] tests-TestSuite_ipgre.py:support meson build 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: xizhan4x --- tests/TestSuite_ipgre.py | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index 1e4edae..743c7ab 100644 --- a/tests/TestSuite_ipgre.py +++ b/tests/TestSuite_ipgre.py @@ -54,6 +54,7 @@ from scapy.layers.l2 import GRE from test_case import TestCase from exception import VerifyFailure +from pmd_output import PmdOutput class TestIpgre(TestCase): @@ -71,6 +72,10 @@ class TestIpgre(TestCase): valports = [_ for _ in ports if self.tester.get_local_port(_) != -1] # start testpmd self.dut_port = valports[0] + self.dut_ports = self.dut.get_ports(self.nic) + self.portMask = utils.create_mask([self.dut_ports[0]]) + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) + self.pmdout = PmdOutput(self.dut) tester_port = self.tester.get_local_port(self.dut_port) self.tester_iface = self.tester.get_interface(tester_port) self.tester_iface_mac = self.tester.get_mac(tester_port) @@ -210,10 +215,10 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src}, 'ipv4': {'proto': 'gre'}} # Start testpmd and enable rxonly forwarding mode - testpmd_cmd = "./%s/app/testpmd -c ffff -n 4 -- -i --enable-rx-cksum" % self.target - self.dut.send_expect( testpmd_cmd, - "testpmd>", - 20) + self.pmdout.start_testpmd("Default", "--portmask=%s " % + (self.portMask) + " --enable-rx-cksum " + , socket=self.ports_socket) + self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") @@ -266,10 +271,14 @@ class TestIpgre(TestCase): # Start testpmd and enable rxonly forwarding mode if (self.nic in ["cavium_a063", "cavium_a064"]): - testpmd_cmd = "./%s/app/testpmd -c ffff -n 4 -- -i --enable-rx-cksum" % self.target + self.pmdout.start_testpmd("Default", "--portmask=%s " % + (self.portMask) + " --enable-rx-cksum " + , socket=self.ports_socket) else: - testpmd_cmd = "./%s/app/testpmd -c ffff -n 4 -- -i --enable-rx-cksum --enable-hw-vlan" % self.target - self.dut.send_expect(testpmd_cmd, "testpmd>", 20) + self.pmdout.start_testpmd("Default", "--portmask=%s " % + (self.portMask) + " --enable-rx-cksum --enable-hw-vlan" + , socket=self.ports_socket) + self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") @@ -298,8 +307,8 @@ class TestIpgre(TestCase): def test_GRE_packet_filter(self): """ - Start testpmd with multi queues, add GRE filter that forward - inner/outer ip address 0.0.0.0 to queue 3, Send packet inner + Start testpmd with multi queues, add GRE filter that forward + inner/outer ip address 0.0.0.0 to queue 3, Send packet inner ip address matched and check packet received by queue 3 """ outer_mac = self.tester_iface_mac @@ -307,8 +316,9 @@ class TestIpgre(TestCase): # Start testpmd with multi queues #testpmd_cmd = "./%s/app/testpmd -c ff -n 3 -- -i --rxq=4 --txq=4" % self.target - testpmd_cmd = "./%s/app/testpmd -c ff -n 3 -- -i --enable-rx-cksum --rxq=4 --txq=4" % self.target - self.dut.send_expect(testpmd_cmd, "testpmd>", 20) + self.pmdout.start_testpmd("Default", "--portmask=%s " % + (self.portMask) + " --enable-rx-cksum --rxq=4 --txq=4 " + , socket=self.ports_socket) self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set nbcore 4", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") @@ -353,11 +363,12 @@ class TestIpgre(TestCase): def test_GRE_packet_chksum_offload(self): """ Start testpmd with hardware checksum offload enabled, - Send packet with wrong IP/TCP/UDP/SCTP checksum and check forwarded packet checksum + Send packet with wrong IP/TCP/UDP/SCTP checksum and check forwarded packet checksum """ # Start testpmd and enable rxonly forwarding mode - testpmd_cmd = "./%s/app/testpmd -c ff -n 3 -- -i --enable-rx-cksum --port-topology=loop" % self.target - self.dut.send_expect(testpmd_cmd, "testpmd>", 20) + self.pmdout.start_testpmd("Default", "--portmask=%s " % + (self.portMask) + " --enable-rx-cksum --port-topology=loop" + , socket=self.ports_socket) self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("set fwd csum", "testpmd>") self.dut.send_expect("stop", "testpmd>") -- 1.8.3.1