From patchwork Mon Sep 5 14:48:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115941 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DCF36A0093; Mon, 5 Sep 2022 16:48:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F15D1400D6; Mon, 5 Sep 2022 16:48:42 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 2B0CC40041 for ; Mon, 5 Sep 2022 16:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662389321; x=1693925321; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ik8tpUOt9n+vwdhP75StVUtANIHCXqkJvzoCLydUqfc=; b=B28L35IjMdS65mnQhd6FKYkZpoLFIKmRvSqvMCNz2Hw8lhUEet3FQieR /mR59+RDta3+zr48WG9/NkrkNBP2bNar+vHcoqRl+oV0WSw7OHSfd6LsE 3zaRekwtFdN4p1oUIfFwopfTTlCbzUurbSHhRs6iKMeR2AJtnpuL5zeR3 qS5ak7ShrecQWLbkZKuQoUppVJPaMNXrtW7lbcs7AM1YuX4jNf1DBdDVt gbkHQfvn4QMLPoZQueLgiWr2ZVgbuUG4ESAS2j92JAWtrnsqCSTkrz16x TkvM4tu1WW7MII9h1OqmaOudF/t3GXEgPh7qBsbowWCWUxaVjtThBOaJ1 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="382701665" X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="382701665" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:39 -0700 X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="643832331" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:38 -0700 From: Weiyuan Li To: dts@dpdk.org, qi.fu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 1/3] test_plans/vlan_ethertype_config: highlight check tpid point in test plan Date: Mon, 5 Sep 2022 22:48:50 +0800 Message-Id: <20220905144852.5158-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 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 Highlight check tpid point in test plan. Signed-off-by: Weiyuan Li --- test_plans/vlan_ethertype_config_test_plan.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test_plans/vlan_ethertype_config_test_plan.rst b/test_plans/vlan_ethertype_config_test_plan.rst index 836bfa3f..80a6ee28 100644 --- a/test_plans/vlan_ethertype_config_test_plan.rst +++ b/test_plans/vlan_ethertype_config_test_plan.rst @@ -52,15 +52,19 @@ Test Case 2: test VLAN filtering on/off testpmd> vlan set filter on 0 testpmd> start -2. Send 1 packet with the VLAN Tag 16 on port ``A``, +2. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, Verify that the VLAN packet cannot be received in port ``B``. 3. Disable vlan filtering on port ``0``:: testpmd> vlan set filter off 0 -4. Send 1 packet with the VLAN Tag 16 on port ``A``, - Verify that the VLAN packet can be received in port ``B``. +4. Change VLAN TPIDs to 0xA100 on port ``0``:: + + testpmd> vlan set outer tpid 0xA100 0 + +5. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, + Verify that the VLAN packet can be received in port ``B`` and TPID is 0xA100 Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID ==================================================================== From patchwork Mon Sep 5 14:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115942 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 265ABA0551; Mon, 5 Sep 2022 16:48:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20BC44069C; Mon, 5 Sep 2022 16:48:44 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C5AA840041 for ; Mon, 5 Sep 2022 16:48:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662389322; x=1693925322; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jRSQycqzjO2jOQNHh9Bp76VlLQ6mSn/kanBpIwRmisQ=; b=KxtlCx02fd27lZXSnM6y0/mXkGw2bDgaItGkN30x1tFsdwN+mq0AnJVM KtppcC9Mk5LJz0cWXIHyOJ/HKV2+M+9eJh+ZT+3mZ7KTRPZ+Dnb9kxu7J IRxeR7QEAlA4/NRv9ITaNkYjI8RN7dlkST8wn4wJEWb4tK06XdF/q9N8S wR+6iny8eKwoHXZVyKyBNqEsLqAOHbC4cJU59jIy2NgC0cSAS2vFRBiNC FwDHgfp+VizGailgOTOScqo71HKIWOObjkph/xvtEe5DVg5Fu5bdJKbsZ 7Vajg0MjKomlJq8Nw5WwXHPWiW1uv2Ij9xu8VhjAn28Q+TG9WbelghK5C A==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="382701679" X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="382701679" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:41 -0700 X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="643832338" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:39 -0700 From: Weiyuan Li To: dts@dpdk.org, qi.fu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 2/3] tests/vlan: modify script to match the test plan Date: Mon, 5 Sep 2022 22:48:51 +0800 Message-Id: <20220905144852.5158-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220905144852.5158-1-weiyuanx.li@intel.com> References: <20220905144852.5158-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 Modify script use tx_first to send pkts match the test plan. Signed-off-by: Weiyuan Li --- tests/TestSuite_vlan.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index b2889ae2..27e9a30c 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -31,6 +31,10 @@ class TestVlan(TestCase): # Based on h/w type, choose how many ports to use ports = self.dut.get_ports() + self.dut_ports = self.dut.get_ports(self.nic) + self.used_dut_port_0 = self.dut_ports[0] + self.tester_intf_0 = self.tester.get_interface(self.used_dut_port_0) + # Verify that enough ports are available self.verify(len(ports) >= 1, "Insufficient ports") @@ -159,11 +163,19 @@ class TestVlan(TestCase): ) self.dut.send_expect("port start all", "testpmd> ") - self.dut.send_expect("start", "testpmd> ") - self.vlan_send_packet(-1) - - out = self.get_tcpdump_package() - self.verify(self.vlan in out, "Vlan not found:" + str(out)) + filter = [{"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}}] + inst = self.tester.tcpdump_sniff_packets( + intf=self.tester_intf_0, + filters=filter, + ) + self.dut.send_expect("set nbport 1", "testpmd> ") + self.dut.send_expect("start tx_first", "testpmd> ") + pkts = self.tester.load_tcpdump_sniff_packets(inst) + self.verify(len(pkts) > 0, f"no packets received.") + self.verify( + self.vlan == pkts[0].vlan, + f"Vlan id {self.vlan} is not found in the packet.", + ) self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ", 30) From patchwork Mon Sep 5 14:48:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115943 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47951A0093; Mon, 5 Sep 2022 16:48:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43A7940697; Mon, 5 Sep 2022 16:48:46 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C109340041 for ; Mon, 5 Sep 2022 16:48:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662389325; x=1693925325; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8kLU6PqV3fJ5zjdPSR5+Ro8PReyifIOcK44TnXUTo1Y=; b=KaGghIqq9KDakKwGVtJySn9v7LyRBQ6v0GDGx37TAWBe4hQAg7t63YtN 2t4aPARYoXg7xAiaZiRclY7pmm+NkRsDucT8CVmkdi0b0WBrKKGTtTFYJ vIfUPAVhufl2+yxlJ/H5lE9t0dz6uIrwhGugYwRoej82bWccBnjPAV0GJ xgI6FIG+bHtU3kjQRLOz3wGvau3SWedntCIE6RDCeqd/A/InqrPepDTFn 82Oe/zim1qqLdsQJGREbzsUSJtGShxa37FuDoy/naISYzd4Xe6kahCeJj xTv+2s7XfKsU8IN4z4Qp8aX+ncuT7dpBC7GUzJAEGhKCz+WvmkDHtvieC g==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="382701689" X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="382701689" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:42 -0700 X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="643832352" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:48:41 -0700 From: Weiyuan Li To: dts@dpdk.org, qi.fu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V3 3/3] tests/vlan_ethertype_config: modify case name to match test plan Date: Mon, 5 Sep 2022 22:48:52 +0800 Message-Id: <20220905144852.5158-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220905144852.5158-1-weiyuanx.li@intel.com> References: <20220905144852.5158-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 Modify test case name to match test plan. Signed-off-by: Weiyuan Li Acked-by: Lijuan Tu --- tests/TestSuite_vlan_ethertype_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_vlan_ethertype_config.py b/tests/TestSuite_vlan_ethertype_config.py index 409adf2a..b641d928 100644 --- a/tests/TestSuite_vlan_ethertype_config.py +++ b/tests/TestSuite_vlan_ethertype_config.py @@ -202,7 +202,7 @@ class TestVlanEthertypeConfig(TestCase): ) self.check_vlan_packets(rx_vlan, tpid, self.rxItf) - def test_vlan_add_vlan_tag(self): + def test_add_vlan_tag_identifier_with_change_vlan_tpid(self): """ test adding VLAN Tag Identifier with changing VLAN TPID """ @@ -235,7 +235,7 @@ class TestVlanEthertypeConfig(TestCase): self.dut.send_expect("stop", "testpmd> ", 30) - def test_vlan_strip(self): + def test_vlan_header_strip_with_change_vlan_tpid(self): """ Test Case 4: test VLAN header striping with changing VLAN TPID """ @@ -265,7 +265,7 @@ class TestVlanEthertypeConfig(TestCase): ) self.check_vlan_packets(rx_vlan, tpid, self.rxItf) - def test_vlan_enable_vlan_insertion(self): + def test_vlan_header_insert_with_change_vlan_tpid(self): """ Test Case 5: test VLAN header inserting with changing VLAN TPID """