From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C568A0548; Wed, 15 Jun 2022 06:50:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25C1042823; Wed, 15 Jun 2022 06:50:29 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 1177E40222 for ; Wed, 15 Jun 2022 06:50:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655268627; x=1686804627; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M2xdPU3sRu6PPCQJFHhQ0aexbDya2uxCi1JdCgc6B+c=; b=mhUZkxCVfYQo4Fhqpuwx4KZhclqe9zWZ0BcLe/0zfYvtVjv57OkoKDbg Gmz95TEzlvEOcbhCJKY2ad/nPuciLC+iH6i9eLQkFv4rWWCuYdZ9mz200 yTOoj/IFSDoVli98Jmzi59jkl+niGEGJFBr7EJybjgo7wisbUk7fUORTz 2Gn8o4fpE2ySApqSWmS7hWRQgV54r3KCbLC8JN9z/bhP90Sprj7JS21FW S07YOKMS005y4P+LB1PqK/G2ucpfeaAHYzEIx3XsqIkjdEQnn6rTkqY4o npxUtLIW3jPmSfD+Z6eEPMGZlIk5tlxSWKstGeGcvit0YdNGlkF9p7S3G Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="278880160" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="278880160" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 21:50:25 -0700 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="640779147" Received: from unknown (HELO localhost.localdomain) ([10.239.252.226]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 21:50:24 -0700 From: Yu Jiang To: lijuan.tu@intel.com, dts@dpdk.org Cc: Yu Jiang , Lingli Chen Subject: [dts][PATCH V1 2/2] tests/l3fwdacl: merge l3fwd-acl with l3fwd and fix to support different force-max-simd-bitwidth Date: Wed, 15 Jun 2022 12:48:21 +0000 Message-Id: <20220615124821.1582235-3-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220615124821.1582235-1-yux.jiang@intel.com> References: <20220615124821.1582235-1-yux.jiang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 1, According to dpdk22.07rc1 commit id 6de0ea50e("examples/l3fwd: merge l3fwd-acl example"), modify l3fwdacl suite. 2, Since DTS commit "7eaf4b60 tests/l3fwdacl: modify pmd param for acl" has incorrect usage, fix script to support different rx_mode. Signed-off-by: Lingli Chen Signed-off-by: Yu Jiang --- conf/app_name.cfg | 3 +-- tests/TestSuite_l3fwdacl.py | 49 ++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/conf/app_name.cfg b/conf/app_name.cfg index 5d3244da..84f65c92 100644 --- a/conf/app_name.cfg +++ b/conf/app_name.cfg @@ -37,7 +37,6 @@ l2fwd-event=target/examples/dpdk-l2fwd-event l2fwd-jobstats=target/examples/dpdk-l2fwd-jobstats l2fwd-keepalive=target/examples/dpdk-l2fwd-keepalive l3fwd=target/examples/dpdk-l3fwd -l3fwd-acl=target/examples/dpdk-l3fwd-acl l3fwd-power=target/examples/dpdk-l3fwd-power link_status_interrupt=target/examples/dpdk-link_status_interrupt ntb=target/examples/dpdk-ntb @@ -68,4 +67,4 @@ node=target/examples/dpdk-efd_node server=target/examples/dpdk-efd_server testpmd_vf=target/app/dpdk-testpmd-vf vm_power_manager=target/examples/dpdk-vm_power_manager -guest_cli=target/examples/dpdk-guest_cli \ No newline at end of file +guest_cli=target/examples/dpdk-guest_cli diff --git a/tests/TestSuite_l3fwdacl.py b/tests/TestSuite_l3fwdacl.py index 0876b978..58e23886 100644 --- a/tests/TestSuite_l3fwdacl.py +++ b/tests/TestSuite_l3fwdacl.py @@ -355,7 +355,7 @@ class TestL3fwdacl(TestCase): extra_args = '--alg="scalar"' cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" %s' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" %s --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -447,6 +447,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) if rule["sIpAddr"] != "ALL": rule["sIpAddr"] = self.create_ipv4_ip_not_match(rule["sIpAddr"]) if rule["dIpAddr"] != "ALL": @@ -478,6 +481,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) if rule["sIpAddr"] != "ALL": rule["sIpAddr"] = self.create_ipv6_ip_not_match(rule["sIpAddr"]) if rule["dIpAddr"] != "ALL": @@ -499,7 +505,6 @@ class TestL3fwdacl(TestCase): pkt = packet.Packet() pkt.append_pkt(ethernet_str) pkt.send_pkt(crb=self.tester, tx_port=tx_interface, timeout=30) - out = self.remove_dhcp_from_revpackets(inst) return len(out) @@ -509,6 +514,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) etherStr = self.create_ipv4_rule_string(rule, "Ether") dst_filter = {"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}} @@ -526,6 +534,9 @@ class TestL3fwdacl(TestCase): """ tx_interface = self.tester.get_interface(tx_port) rx_interface = self.tester.get_interface(rx_port) + # wait tester's interface up + for intfx in [tx_interface, rx_interface]: + self.tester.is_interface_up(intf=intfx) etherStr = self.create_ipv6_rule_string(rule, "Ether") fil = [{"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}}] @@ -533,7 +544,6 @@ class TestL3fwdacl(TestCase): pkt = packet.Packet() pkt.append_pkt(etherStr) pkt.send_pkt(crb=self.tester, tx_port=tx_interface, timeout=30) - out = self.remove_dhcp_from_revpackets(inst) return len(out) @@ -807,7 +817,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv4_db(rule_list) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -834,7 +844,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv6_db(rule_list) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -867,14 +877,17 @@ class TestL3fwdacl(TestCase): cores = self.get_core_list() self.verify(cores is not None, "Insufficient cores for speed testing") - self.eal_para = self.dut.create_eal_parameters( - cores=self.get_core_list(), other_eal_param="force-max-simd-bitwidth" - ) + self.eal_para = self.dut.create_eal_parameters(cores=self.get_core_list()) self.core_mask = utils.create_mask(cores) print("Core mask: %s" % self.core_mask) - - if self.dut.dpdk_version >= "20.11.0": - self.eal_para += " --force-max-simd-bitwidth=0" + # When execution.cfg set rx_mode=xxx, it should have priority. + print("eal_para = {}".format(self.eal_para)) + if "force-max-simd-bitwidth" in self.eal_para: + pass + else: + # DTS commit 68bb1b92("tests/l3fwdacl: try to use highest available method") when dpdk > 20.11.0 by konstantin.ananyev@intel.com + if self.dut.dpdk_version >= "20.11.0": + self.eal_para += " --force-max-simd-bitwidth=0" valid_ports = [port for port in ports if self.tester.get_local_port(port) != -1] self.verify( @@ -889,11 +902,8 @@ class TestL3fwdacl(TestCase): TestL3fwdacl.default_rule["Port"] = self.dut_ports[1] - # compile l3fwd-acl - out = self.dut.build_dpdk_apps("examples/l3fwd-acl") - self.app_l3fwd_acl_path = self.dut.apps_name["l3fwd-acl"] - self.verify("Error" not in out, "compilation error 1") - self.verify("No such file" not in out, "compilation error 2") + # dpdk22.07-rc1 commit 6de0ea50("examples/l3fwd: merge l3fwd-acl example"), compile l3fwd example. + self.app_l3fwd_acl_path = self.dut.build_dpdk_apps("examples/l3fwd") def test_l3fwdacl_acl_rule(self): """ @@ -1025,8 +1035,7 @@ class TestL3fwdacl(TestCase): TestL3fwdacl.lpm_rule_list_ipv6[1], tx_port, rx_port ) - self.dut.send_expect("^C", "#", 20) - + self.dut.send_expect("^C", "#", 30) self.verify(out1 >= 1, "Rx port0 not receive expected packet") self.verify(out2 >= 1, "Rx port1 not receive expected packet") @@ -1103,7 +1112,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv4_db(rule_list_ipv4) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, @@ -1123,7 +1132,7 @@ class TestL3fwdacl(TestCase): self.create_acl_ipv6_db(rule_list_ipv6) cmdline = ( - '%s %s -- -p %s --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar"' + '%s %s -- -p %s --lookup acl --config="(%d,0,2),(%d,0,3)" --rule_ipv4="%s" --rule_ipv6="%s" --alg="scalar" --parse-ptype' % ( self.app_l3fwd_acl_path, self.eal_para, -- 2.25.1