From patchwork Fri Oct 7 11:53:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117553 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 1BF95A00C4; Fri, 7 Oct 2022 13:53:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06B0642B7B; Fri, 7 Oct 2022 13:53:18 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1646E40042 for ; Fri, 7 Oct 2022 13:53:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143596; x=1696679596; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=L782g3bhcbYT5u4UHhq1K8b0qugDXc5cCYn3gKSlYho=; b=oAELIvVBgc72BIQowROSL6sXGh2XkSJYQFnj/+j6WhFrgFdyR1JPz68U eLwQzv4+9lhos2o4QrGv018AtEt5qs2IGDXj7ZRXOJbDPOGULyHtqhOe0 ziT/1YJ4+EB2Yq3AtGE+WKTgVbQwFZweTWuxUhXEplDq2mLLSfYANVFQC IQT11IsDKHDDgIOmFK+DrZxZ19PeJr6HzAieF3wU69/bAejFPp8vrZpph avsUdZX/Szx4F7fzxhrRN4nOoHmUZVGfPPyIzcAtHgxC183t/NYve0foX 828kbM0NMqmytg46njON5NIZFYZ3OEsDFIDW1W3TlO60jWnAzDXOuT+2Y w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716857" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716857" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:11 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249960" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249960" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:10 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 1/8] test_plans/dual_vlan: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:26 +0800 Message-Id: <20221007115333.29277-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 Modify script and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- test_plans/dual_vlan_test_plan.rst | 77 ++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst index 752b5025..fc549102 100644 --- a/test_plans/dual_vlan_test_plan.rst +++ b/test_plans/dual_vlan_test_plan.rst @@ -14,7 +14,7 @@ The support of Dual VLAN offload features by Poll Mode Drivers consists in: Prerequisites ============= -In this feature, x7xx series, 82576 and 82599 are supported. +In this feature, x7xx series, Intel® Ethernet 800 Series, 82576 and 82599 are supported. If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios.When using vfio, use the following commands to load the vfio driver and bind it @@ -35,6 +35,10 @@ The -n command is used to select the number of memory channels. It should match Test Case: Enable/Disable VLAN packets filtering ================================================ +If driver i40e enable extend on port 0:: + + testpmd> vlan set extend on 0 + Setup the ``mac`` forwarding mode:: testpmd> set fwd mac @@ -61,9 +65,7 @@ Check whether the mode is set successful:: Allmulticast mode: disabled Maximum number of MAC addresses: 127 VLAN offload: - strip off - filter on - qinq(extend) off + strip off, filter on, extend on, qinq strip off start forwarding packets:: @@ -112,6 +114,10 @@ Disable VLAN packet extend and strip port ``0``:: testpmd> vlan set extend off 0 testpmd> vlan set strip off 0 +if driver i40e enable extend on port 0:: + + testpmd> vlan set extend on 0 + Enable VLAN filtering on port ``0``:: testpmd> vlan set filter on 0 @@ -301,6 +307,8 @@ Do the synthetic test following the below table and check the result is the same as the table(the inserted VLAN Tag Identifier is limited to ``0x3``, and all modes except insert are set on rx port). +The following table only supports i40e x722/ixgbe/igb/ice: + +-------+-------+--------+------------+--------+--------+-------+-------+-------+ | Outer | Inner | Vlan | Vlan | Vlan | Vlan | Pass/ | Outer | Inner | | vlan | vlan | strip | filter | extend | insert | Drop | vlan | vlan | @@ -358,6 +366,67 @@ except insert are set on rx port). | 0x1 | 0x2 | yes | yes,0x2 | yes | yes | pass | 0x3 | 0x1 | +-------+-------+--------+------------+--------+--------+-------+-------+-------+ +The following table only supports i40e: + ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| Outer | Inner | Vlan | Vlan | Vlan | Vlan | Pass/ | Outer | Inner | +| vlan | vlan | strip | filter | extend | insert | Drop | vlan | vlan | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | no | no | no | pass | 0x1 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | no | no | no | pass | no | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x1 | no | no | pass | 0x1 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x2 | no | no | pass | 0x1 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x1 | no | no | pass | no | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x2 | no | no | pass | no | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | no | yes | no | pass | 0x1 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | no | yes | no | pass | no | 0x1 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x1 | yes | no | pass | 0x1 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x2 | yes | no | drop | no | no | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x1 | yes | no | pass | no | 0x1 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x2 | yes | no | drop | no | no | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | no | no | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | no | no | yes | pass | 0x3 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x1 | no | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x2 | no | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x1 | no | yes | pass | 0x3 | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x2 | no | yes | drop | no | no | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | no | yes | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | no | yes | yes | pass | 0x3 | 0x1 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x1 | yes | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | no | yes,0x2 | yes | yes | pass | 0x3 | 0x1 | +| | | | | | | | | 0x2 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x1 | yes | yes | pass | 0x3 | 0x1 | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 0x1 | 0x2 | yes | yes,0x2 | yes | yes | drop | no | no | ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ + Test Case: Strip/Filter/Extend/Insert enable/disable random test ================================================================ From patchwork Fri Oct 7 11:53:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117550 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 A0C9AA00C4; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C9C642B77; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id F16DB40042 for ; Fri, 7 Oct 2022 13:53:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143595; x=1696679595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PWNNznpLOODBwroFYuOm6TiLhLEK1qz/0fLe/iMvi8U=; b=BgdxHEeI6s6Z3FtgNq3ei8k8HLxML06k5N0WCHPjwLV7e22Ax47+vDm8 X0uhmgOUYUU11hiRFaCkqH093V8g4+MlX2TK5MWLm9LLu6yNqSBMDG1Qp PNmU56bswJTZgW9ilhC2cJ9e/m36QXsrpQcpOuz7LwJA26HFRYZbbqqUi VRsot4OZJo499hxy7snHEpRlS/nWo+epdR9Vj83ahp+DVfSc9czLmndSB nT/J8ZybSTuJqhBXqw18lNI+cJDE3NevMQ4A/qbeHMeFaYcV5ecnvRosY TxWa4OzhlHc8143X3bIgtbmt/+q+JDchREHXhSNVGzjuSbVewVZyPvjAx A==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716858" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716858" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:12 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249972" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249972" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:11 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 2/8] test_plans/vlan: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:27 +0800 Message-Id: <20221007115333.29277-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- test_plans/vlan_test_plan.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_plans/vlan_test_plan.rst b/test_plans/vlan_test_plan.rst index 6e2bf74e..4e72667b 100644 --- a/test_plans/vlan_test_plan.rst +++ b/test_plans/vlan_test_plan.rst @@ -61,6 +61,7 @@ Enable the receipt of VLAN packets with VLAN Tag Identifier 1 on port 0:: testpmd> rx_vlan add 1 0 testpmd> vlan set strip off 0 + testpmd> vlan set extend on 0 testpmd> start rxonly packet forwarding - CRC stripping disabled - packets/burst=32 nb forwarding cores=1 - nb forwarding ports=10 @@ -111,7 +112,8 @@ Test Case: Disable receipt of VLAN packets Disable the receipt of VLAN packets with Tag Identifier ``1`` on port 0. Send VLAN packets with the Tag Identifier ``1`` check that no packet is received on port ``B``, meaning that VLAN packets are now dropped on port 0:: - + + testpmd> vlan set extend on 0 testpmd> rx_vlan rm 1 0 testpmd> start rxonly packet forwarding - CRC stripping disabled - packets/burst=32 From patchwork Fri Oct 7 11:53:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117551 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 245FAA04FD; Fri, 7 Oct 2022 13:53:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD146400D5; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9334D40042 for ; Fri, 7 Oct 2022 13:53:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143595; x=1696679595; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vXFzEjTDq2dTmqd+hPVNUBSpd50jeDjEVjNcQT35bbs=; b=kbQHNyi+jkBlAq9xRDoesMBaX1p2uCA5xbOoUZwkUt3xpTQDUuGwsFrY Wzm2PC/RXALvNTeoMxH9+CquQre67yxcHyCJ5P+CTshBUi5LSOLFQOf08 H/Y5v9iFIO53HwpiPtOACtnH7mUdVIL1GNoY7RABmAzKKao+O7S/qWY4a +mG48um6EJ7GQsDoML/n2ZN+CKlDfIxIy9G0iaYuUCX1m0dZi/7t8VxSV eOj0R1efGxdXJWStSVqwUgHfT2DsoJSsAXt65VFn7D9t2PhfsRWlrqjB0 /UCQPyUNiOD0wK5sl2y6aHkIUoC7yXrec9vjKoEsmJvy+IIyu5OrvcVUh g==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716860" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716860" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:13 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249975" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249975" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:12 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 3/8] tests/vlan: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:28 +0800 Message-Id: <20221007115333.29277-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- tests/TestSuite_vlan.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index 3d8811f9..c813f665 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -106,6 +106,11 @@ class TestVlan(TestCase): "rx_vlan add %d %s" % (self.vlan, dutRxPortId), "testpmd> " ) self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ") + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect("vlan set extend on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("start", "testpmd> ", 120) out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ", 20) self.verify("strip off" in out, "Wrong strip:" + out) @@ -126,6 +131,11 @@ class TestVlan(TestCase): """ Disable receipt of VLAN packets """ + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect("vlan set extend on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("rx_vlan rm %d %s" % (self.vlan, dutRxPortId), "testpmd> ") self.dut.send_expect("start", "testpmd> ", 120) self.vlan_send_packet(self.vlan) @@ -187,7 +197,7 @@ class TestVlan(TestCase): """ Run after each test case. """ - pass + self.dut.send_expect("vlan set extend off %s" % dutRxPortId, "testpmd> ") def tear_down_all(self): """ From patchwork Fri Oct 7 11:53:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117552 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 7E215A0540; Fri, 7 Oct 2022 13:53:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2B1542B81; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 3C12B400D5 for ; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143596; x=1696679596; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x/PHbrr99X0OrNTrv843BP+/lSpDJdxN1Lawgt6s85E=; b=bgyJCeKWx2PbW8KLyz1/Krsp8p8fdF0UAQbcRgCvjLvDLrjJZq4loKdS sV1DP8cGoWXnUzQ0zng4AkXLHGz/FHRTBBoXUGFh0S2Ym6cNj+IfnQorg Ka8w4LjrLL4+pFOR1GGsgiFZA1gQJAjn/Zr4cGVfc4j3lMFNIJ8KK91IF colK27woVZoxAwy0pIZVw8trwp9vbaq9osl/4To/vKc0uC4g4bdXpmWXK FzUSt9PB8ctAbHA/irrzBhooC0iXob5etjaK+009jFkA96JZVpLuwuBDk eT/5z9jsRI5iZT17vQxaPfC6kQRX6waR0OfzZW11DqR71kSE9l+3+G4ZY g==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716863" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716863" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:15 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249981" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249981" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:14 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 4/8] test_plans/vlan_ethertype_config: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:29 +0800 Message-Id: <20221007115333.29277-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- .../vlan_ethertype_config_test_plan.rst | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/test_plans/vlan_ethertype_config_test_plan.rst b/test_plans/vlan_ethertype_config_test_plan.rst index 80a6ee28..baf65208 100644 --- a/test_plans/vlan_ethertype_config_test_plan.rst +++ b/test_plans/vlan_ethertype_config_test_plan.rst @@ -52,18 +52,22 @@ Test Case 2: test VLAN filtering on/off testpmd> vlan set filter on 0 testpmd> start -2. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, +2. if driver i40e enable extend:: + + testpmd> vlan set extend on 0 + +3. 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``:: +4. Disable vlan filtering on port ``0``:: testpmd> vlan set filter off 0 -4. Change VLAN TPIDs to 0xA100 on port ``0``:: +5. 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``, +6. 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 @@ -77,25 +81,29 @@ Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID testpmd> vlan set strip off 0 testpmd> start -2. Add a VLAN Tag Identifier ``16`` on port ``0``:: +2. if driver i40e enable extend:: + + testpmd> vlan set extend on 0 + +3. Add a VLAN Tag Identifier ``16`` on port ``0``:: testpmd> rx_vlan add 16 0 -3. Send 1 packet with the VLAN Tag 16 on port ``A``, +4. Send 1 packet with the VLAN Tag 16 on port ``A``, Verify that the VLAN packet can be received in port ``B`` and TPID is 0x8100 -4. Change VLAN TPID to 0xA100 on port ``0``:: +5. Change VLAN TPID 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``, +6. 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 -6. Remove the VLAN Tag Identifier ``16`` on port ``0``:: +7. Remove the VLAN Tag Identifier ``16`` on port ``0``:: testpmd> rx_vlan rm 16 0 -7. Send 1 packet with VLAN TPID 0xA100 and VLAN Tag 16 on port ``A``, +8. 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``. Test Case 4: test VLAN header stripping with changing VLAN TPID From patchwork Fri Oct 7 11:53:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117554 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 68398A04FD; Fri, 7 Oct 2022 13:53:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2252F42B85; Fri, 7 Oct 2022 13:53:18 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D180A42B80 for ; Fri, 7 Oct 2022 13:53:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143597; x=1696679597; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+h65yLhisMJ3TKc+gFFBCsQiE3agOPbI9VOxV3n0lOE=; b=NQa9AtXy2l6xyTbiqI+l/cdQPK6NG1r554Sc8b0aA+JjtV8xVfwbgjDl +4sgAPueNl4b9dfgglN+GNtuu3VnOEVuvUYvar7sw8+w2Uy0rmtF26i1i 4gqhsaGSZRTJ3DBHybTeuGSA7hUNBd0geQ5CyQiesxPy/QxSx0ws2g6au 1u8agiHYbwt/X8qiXnFtH53/6EUw7jWc+0TyxFQTKr0halJ2suMrpavtQ 4vdr64RyiFmhPJwGGO22p0haE00aatv2p2y3zFkL3m3dEKJsczaWehj5c mDRhlmrJlyHEqTZ+c3nDblLiT9oN96htdZXh8W5jNcC/YeiGkT+SEPC16 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716872" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716872" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:16 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249984" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249984" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:15 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 5/8] tests/vlan_ethertype_config: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:30 +0800 Message-Id: <20221007115333.29277-5-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- tests/TestSuite_vlan_ethertype_config.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vlan_ethertype_config.py b/tests/TestSuite_vlan_ethertype_config.py index b641d928..1e2b9e24 100644 --- a/tests/TestSuite_vlan_ethertype_config.py +++ b/tests/TestSuite_vlan_ethertype_config.py @@ -194,6 +194,13 @@ class TestVlanEthertypeConfig(TestCase): self.dut.send_expect( "vlan set filter on %s" % dutRxPortId, "testpmd> " ) + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect( + "vlan set extend on %s" % dutRxPortId, "testpmd> " + ) self.dut.send_expect("start", "testpmd> ") self.check_vlan_packets(rx_vlan, tpid, self.rxItf, False) # test vlan filter off @@ -209,8 +216,13 @@ class TestVlanEthertypeConfig(TestCase): random_vlan = random.randint(1, MAX_VLAN - 1) rx_vlans = [1, random_vlan, MAX_VLAN] self.dut.send_expect("set fwd mac", "testpmd> ") - self.dut.send_expect("vlan set filter on %s" % dutRxPortId, "testpmd> ") + self.dut.send_expect("vlan set filter on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ", 20) + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect("vlan set extend on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("start", "testpmd> ") # caium_a063 card support only default '0x8100' tpid in rx mode From patchwork Fri Oct 7 11:53:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117555 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 49281A00C4; Fri, 7 Oct 2022 13:53:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43A2742B7A; Fri, 7 Oct 2022 13:53:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9683342B75 for ; Fri, 7 Oct 2022 13:53:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143598; x=1696679598; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JtSJ4SSBrIEnncgFKR0mnvcN7kwftdob0Iw4EjdYyzs=; b=RrzMh4GTWgsUux9WHjTFO/kCb7jH1vLou7jVKRkceTDqQu68ZD1F2Pna dkqAvndRcF8loFeKR4bKpwZKC/CDcLaEdJzO792zSFWHwmcq4OuwWehg9 jZlMJpnYgmQLHsU3JlNCcpQjjopBUIPPQwvWhCTA56FSeBgsXRLfHYgg1 SvOprNrBzrNIfICwDthtCh/8+sfCbaif4ruKLOtjiiJF0l4s8fJglMg31 E9H0UUF/qwptCe+5z5SXK/QW5sLXqIFtq0aK708Bg09ZXbrNfJXnS8/kh cITHwy0dquWdimWznem9sLmFEFJYHvaKF1VALyBrLQ4xYsdX4gveGQRp8 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716874" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716874" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:17 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714249997" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714249997" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:16 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 6/8] test_plans/ipgre: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:31 +0800 Message-Id: <20221007115333.29277-6-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- test_plans/ipgre_test_plan.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/test_plans/ipgre_test_plan.rst b/test_plans/ipgre_test_plan.rst index 693432ef..4380aa38 100644 --- a/test_plans/ipgre_test_plan.rst +++ b/test_plans/ipgre_test_plan.rst @@ -55,6 +55,7 @@ Start testpmd and enable rxonly forwarding mode:: .//app/dpdk-testpmd -c ffff -n 4 -- -i --enable-hw-vlan testpmd> set fwd rxonly + testpmd> vlan set extend off 0 testpmd> set verbose 1 testpmd> start From patchwork Fri Oct 7 11:53:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117556 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 67EBFA04FD; Fri, 7 Oct 2022 13:53:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6484742B84; Fri, 7 Oct 2022 13:53:21 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 534B742B75 for ; Fri, 7 Oct 2022 13:53:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143599; x=1696679599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x2yeYS1MR/phq4JEkY/ESBxSOTnuI+UjX9dlEC7znpk=; b=muOwzyMtDEOayinEN9mHpnAHcuQHG1qHV4V+7MXgeNwgJeOfXr/f4Xgo atq4MqOMIzDhhuv2rL8pshvY3ve0oGCXtVXWXAASGNyvbQKQze4gXSlDV GeySnGaIwNmdj/N9V4zSn3HUPEsZ1hP47rNrR3AiCj1GQSlW7JJ4wCtel 6oGsTjDP8g+WePqQu31X1zhRAv3LfiQbcvQRDTJZ2eOdpuEA2hpeB3ebx MJeYRowWEdnLHE6A25Pr0bGd5JlxfJgM/K5kk1Qd/pdU44OojXOtBALqa gCYHCj+qQFWxw2zr0v2utJj+N7WqK04Zzw6n2//8NII2qpdi+2D6FlLq9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716880" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716880" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:18 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714250005" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714250005" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:17 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 7/8] tests/ipgre: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:32 +0800 Message-Id: <20221007115333.29277-7-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- tests/TestSuite_ipgre.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index cd50c1c4..1797af8a 100644 --- a/tests/TestSuite_ipgre.py +++ b/tests/TestSuite_ipgre.py @@ -312,6 +312,11 @@ class TestIpgre(TestCase): self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect("vlan set extend off 0", "testpmd>") # inner ipv4 config_layers = { From patchwork Fri Oct 7 11:53:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 117557 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 B09CFA00C4; Fri, 7 Oct 2022 13:53:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5F8842B83; Fri, 7 Oct 2022 13:53:23 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 20A1242B75 for ; Fri, 7 Oct 2022 13:53:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665143601; x=1696679601; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N9CuUDfHIokAxcFPVT/iUMfjTPzVfTfaABwSU6nAdDM=; b=Wf6FSop0CoQj9TcvIwzi52/9Yhe3IcG7uViWihdasnvmetTrxFbisrrB Ur8rgNOZ+UPn7fhie+sDjwZ6yHDPMsMZvjH48zaVV+EWh9FUsQ5W755tF uuwVlr/qdf/2XJeP7bQPWg4/lxOneoMyIVr3T0YBZ9sscKSexmXWFsjYp +s45qfqCNGlLkdF1lZbvfo9ijSQ0Oy5ffHznY36TunUxH+LdvWMC2NMfQ RJPjgr4qKrxO2r4VFRbULYwijohv9BoLMJb22CgNdS5YOSPJkxDXix4Kv DJosVgJ6MZedtiNuam6/Gf5AYHXAG13kY+rGmQ30Po39RkY7rEY3FWi6a w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304716881" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304716881" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:20 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714250014" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714250014" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:53:19 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V1 8/8] tests/dual_vlan: modify script and test plan to support i40e fimware > 8.3 Date: Fri, 7 Oct 2022 19:53:33 +0800 Message-Id: <20221007115333.29277-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221007115333.29277-1-weiyuanx.li@intel.com> References: <20221007115333.29277-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 and test plan to i40e support fimware > 8.3. When the fimrware > 8.3, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- tests/TestSuite_dual_vlan.py | 393 ++++++++++++++++++++++------------- 1 file changed, 254 insertions(+), 139 deletions(-) diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py index 87c5325b..bfc2581a 100644 --- a/tests/TestSuite_dual_vlan.py +++ b/tests/TestSuite_dual_vlan.py @@ -14,65 +14,6 @@ import re import time import framework.utils as utils - -txvlan = 3 -outvlan = 1 -invlan = 2 - -allResult = { - "TX+OUTER+INNER": (txvlan, outvlan, invlan), - "TX+INNER": (txvlan, invlan), - "TX+OUTER": (txvlan, outvlan), - "OUTER+INNER": (outvlan, invlan), - "INNER": (invlan,), - "OUTER": (outvlan,), - "NONE": ("No",), -} - -stripCase = 0x1 -filterCase = 0x2 -qinqCase = 0x4 -txCase = 0x8 - -vlanCaseDef = [ - 0, - stripCase, - filterCase, - filterCase | stripCase, - qinqCase, - qinqCase | stripCase, - qinqCase | filterCase, - qinqCase | filterCase | stripCase, - txCase, - txCase | stripCase, - txCase | filterCase, - txCase | filterCase | stripCase, - txCase | qinqCase, - txCase | qinqCase | stripCase, - txCase | qinqCase | filterCase, - txCase | qinqCase | filterCase | stripCase, -] - -vlanCase = [ - "OUTER+INNER", - "INNER", - ("OUTER+INNER", "NONE"), - ("INNER", "NONE"), - "OUTER+INNER", - "OUTER", - ("NONE", "OUTER+INNER"), - ("NONE", "OUTER"), - "TX+OUTER+INNER", - "TX+INNER", - ("TX+OUTER+INNER", "NONE"), - ("TX+INNER", "NONE"), - "TX+OUTER+INNER", - "TX+OUTER", - ("NONE", "TX+OUTER+INNER"), - ("NONE", "TX+OUTER"), -] - - from framework.pmd_output import PmdOutput from framework.test_case import TestCase @@ -120,6 +61,130 @@ class TestDualVlan(TestCase): self.verify("Set mac packet forwarding mode" in out, "set fwd mac error") out = self.dut.send_expect("start", "testpmd> ", 120) + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.config_i40e() + else: + self.config_original() + + def config_original(self): + self.txvlan = 3 + self.outvlan = 1 + self.invlan = 2 + + self.allResult = { + "TX+OUTER+INNER": (self.txvlan, self.outvlan, self.invlan), + "TX+INNER": (self.txvlan, self.invlan), + "TX+OUTER": (self.txvlan, self.outvlan), + "OUTER+INNER": (self.outvlan, self.invlan), + "INNER": (self.invlan,), + "OUTER": (self.outvlan,), + "NONE": ("No",), + } + + self.stripCase = 0x1 + self.filterCase = 0x2 + self.qinqCase = 0x4 + self.txCase = 0x8 + + self.vlanCaseDef = [ + 0, + self.stripCase, + self.filterCase, + self.filterCase | self.stripCase, + self.qinqCase, + self.qinqCase | self.stripCase, + self.qinqCase | self.filterCase, + self.qinqCase | self.filterCase | self.stripCase, + self.txCase, + self.txCase | self.stripCase, + self.txCase | self.filterCase, + self.txCase | self.filterCase | self.stripCase, + self.txCase | self.qinqCase, + self.txCase | self.qinqCase | self.stripCase, + self.txCase | self.qinqCase | self.filterCase, + self.txCase | self.qinqCase | self.filterCase | self.stripCase, + ] + + self.vlanCase = [ + "OUTER+INNER", + "INNER", + ("OUTER+INNER", "NONE"), + ("INNER", "NONE"), + "OUTER+INNER", + "OUTER", + ("NONE", "OUTER+INNER"), + ("NONE", "OUTER"), + "TX+OUTER+INNER", + "TX+INNER", + ("TX+OUTER+INNER", "NONE"), + ("TX+INNER", "NONE"), + "TX+OUTER+INNER", + "TX+OUTER", + ("NONE", "TX+OUTER+INNER"), + ("NONE", "TX+OUTER"), + ] + + def config_i40e(self): + self.txvlan = 3 + self.outvlan = 1 + self.invlan = 2 + + self.allResult = { + "TX+OUTER+INNER": (self.txvlan, self.outvlan, self.invlan), + "TX+INNER": (self.txvlan, self.invlan), + "TX+OUTER": (self.txvlan, self.outvlan), + "OUTER+INNER": (self.outvlan, self.invlan), + "INNER": (self.invlan,), + "OUTER": (self.outvlan,), + "NONE": ("No",), + } + + self.stripCase = 0x1 + self.filterCase = 0x2 + self.qinqCase = 0x4 + self.txCase = 0x8 + + self.vlanCaseDef = [ + 0, + self.stripCase, + self.filterCase | self.qinqCase, + self.filterCase | self.qinqCase | self.stripCase, + self.qinqCase, + self.qinqCase | self.stripCase, + self.qinqCase | self.filterCase, + self.qinqCase | self.filterCase | self.stripCase, + self.txCase, + self.txCase | self.stripCase, + self.txCase | self.filterCase | self.qinqCase, + self.txCase | self.filterCase | self.qinqCase | self.stripCase, + self.txCase | self.qinqCase, + self.txCase | self.qinqCase | self.stripCase, + self.txCase | self.qinqCase | self.filterCase, + self.txCase | self.qinqCase | self.filterCase | self.stripCase, + ] + + self.vlanCase = [ + "OUTER+INNER", + "INNER", + ("OUTER+INNER", "NONE"), + ("OUTER", "NONE"), + "OUTER+INNER", + "OUTER", + ("OUTER+INNER", "NONE"), + ("OUTER", "NONE"), + "TX+OUTER+INNER", + "TX+INNER", + ("TX+OUTER+INNER", "NONE"), + ("TX+OUTER", "NONE"), + "TX+OUTER+INNER", + "TX+OUTER", + ("TX+OUTER+INNER", "NONE"), + ("TX+OUTER", "NONE"), + ] + def start_tcpdump(self, rxItf): self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#") @@ -174,14 +239,18 @@ class TestDualVlan(TestCase): # Intel® Ethernet 700 Series NIC vlan filter can't close, if want close need remove rx_vlan if mode == "filter": if modeName[mode] == "off": - self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " - ) + self.dut.send_expect("vlan set filter off all", "testpmd> ") continue else: - self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " - ) + self.dut.send_expect("vlan set filter on all", "testpmd> ") + if self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), + "testpmd> ", + ) continue if mode == "stripq": @@ -209,14 +278,18 @@ class TestDualVlan(TestCase): # Intel® Ethernet 700 Series NIC vlan filter can't close, if want close need remove rx_vlan if mode == "filter": if modeName[mode] == "off": - self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " - ) + self.dut.send_expect("vlan set filter off all", "testpmd> ") continue else: - self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " - ) + self.dut.send_expect("vlan set filter on all", "testpmd> ") + if self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), + "testpmd> ", + ) continue if mode == "extend": @@ -235,22 +308,22 @@ class TestDualVlan(TestCase): """ Setup Strip/Filter/Extend/Insert enable/disable for synthetic test. """ - caseDef = vlanCaseDef[caseIndex] + caseDef = self.vlanCaseDef[caseIndex] temp = [] - temp.append("on") if (caseDef & stripCase) != 0 else temp.append("off") - temp.append("on") if (caseDef & filterCase) != 0 else temp.append("off") - temp.append("on") if (caseDef & qinqCase) != 0 else temp.append("off") + temp.append("on") if (caseDef & self.stripCase) != 0 else temp.append("off") + temp.append("on") if (caseDef & self.filterCase) != 0 else temp.append("off") + temp.append("on") if (caseDef & self.qinqCase) != 0 else temp.append("off") if (self.nic in ["cavium_a063", "cavium_a064"]) and temp[2] == "on": ## Skip QinQ for cavium devices as it is not supported. return self.mode_config(strip=temp[0], filter=temp[1], extend=temp[2]) - if (caseDef & txCase) != 0: + if (caseDef & self.txCase) != 0: self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect( - "tx_vlan set %s %s" % (dutTxPortId, txvlan), "testpmd> " + "tx_vlan set %s %s" % (dutTxPortId, self.txvlan), "testpmd> " ) self.dut.send_expect("port start all", "testpmd> ") self.dut.send_expect("start", "testpmd> ") @@ -259,27 +332,27 @@ class TestDualVlan(TestCase): temp[0], temp[1], temp[2], - "on" if (caseDef & txCase) != 0 else "off", + "on" if (caseDef & self.txCase) != 0 else "off", ) - if (caseDef & filterCase) != 0: + if (caseDef & self.filterCase) != 0: self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan, invlan) - self.check_result(vlanCase[caseIndex][0], configMode + " result Error") + self.vlan_send_packet(self.outvlan, self.invlan) + self.check_result(self.vlanCase[caseIndex][0], configMode + " result Error") self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan add %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.invlan, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan, invlan) - self.check_result(vlanCase[caseIndex][1], configMode + " result Error") + self.vlan_send_packet(self.outvlan, self.invlan) + self.check_result(self.vlanCase[caseIndex][1], configMode + " result Error") self.dut.send_expect( - "rx_vlan rm %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.invlan, dutRxPortId), "testpmd> " ) - if (caseDef & txCase) != 0: + if (caseDef & self.txCase) != 0: self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ") @@ -288,24 +361,24 @@ class TestDualVlan(TestCase): else: self.dut.send_expect( - "rx_vlan add %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.invlan, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan, invlan) - self.check_result(vlanCase[caseIndex], configMode + " result Error") - if (caseDef & txCase) != 0: + self.vlan_send_packet(self.outvlan, self.invlan) + self.check_result(self.vlanCase[caseIndex], configMode + " result Error") + if (caseDef & self.txCase) != 0: self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") self.dut.send_expect("tx_vlan reset %s" % dutTxPortId, "testpmd> ") self.dut.send_expect("port start all", "testpmd> ") self.dut.send_expect("start", "testpmd> ") self.dut.send_expect( - "rx_vlan rm %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.invlan, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) def check_result(self, resultKey, errorString): @@ -314,14 +387,15 @@ class TestDualVlan(TestCase): """ print(("vlan flage config:%s" % errorString)) out = self.get_tcpdump_package() - if allResult[resultKey][0] == "No": + if self.allResult[resultKey][0] == "No": self.verify("vlan" not in out, errorString) else: resultList = [] - for i in range(len(allResult[resultKey]) - 1): - resultList.append("vlan %s" % allResult[resultKey][i]) + for i in range(len(self.allResult[resultKey]) - 1): + resultList.append("vlan %s" % self.allResult[resultKey][i]) resultList.append( - "vlan %s" % allResult[resultKey][len(allResult[resultKey]) - 1] + "vlan %s" + % self.allResult[resultKey][len(self.allResult[resultKey]) - 1] ) for line in resultList: self.verify(line in out, "receive packet is wrong:%s" % out) @@ -338,12 +412,23 @@ class TestDualVlan(TestCase): """ self.mode_config(filter="on") self.mode_config(strip="off") - self.mode_config(extend="off") - self.vlan_send_packet(outvlan) + # import pdb;pdb.set_trace() + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.mode_config(extend="on") + self.dut.send_expect( + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " + ) + else: + self.mode_config(extend="off") + + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() print(out) self.verify( - out is not None and "vlan %s" % outvlan not in out, + out is not None and "vlan %s" % self.outvlan not in out, "Vlan filter enable error: " + out, ) @@ -359,18 +444,22 @@ class TestDualVlan(TestCase): "I40E_10G-10G_BASE_T_X722", ]: self.mode_config(filter="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan filter disable error: " + out) + self.verify( + "vlan %s" % self.outvlan in out, "Vlan filter disable error: " + out + ) else: self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan filter disable error: " + out) + self.verify( + "vlan %s" % self.outvlan in out, "Vlan filter disable error: " + out + ) self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) def test_vlan_filter_table(self): @@ -380,20 +469,29 @@ class TestDualVlan(TestCase): self.mode_config(filter="on") self.mode_config(strip="off") - self.mode_config(extend="off") - - self.dut.send_expect("rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> ") - self.vlan_send_packet(outvlan) + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.mode_config(extend="on") + else: + self.mode_config(extend="off") + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), "testpmd> " + ) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan filter table enable error: " + out + "vlan %s" % self.outvlan in out, "vlan filter table enable error: " + out ) - self.dut.send_expect("rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> ") - self.vlan_send_packet(outvlan) + self.dut.send_expect( + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " + ) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() self.verify( - out is not None and "vlan %s" % outvlan not in out, + out is not None and "vlan %s" % self.outvlan not in out, "vlan filter table disable error: " + out, ) @@ -417,16 +515,18 @@ class TestDualVlan(TestCase): "I40E_10G-10G_BASE_T_X722", ]: self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan not in out, "Vlan strip enable error: " + out) + self.verify( + "vlan %s" % self.outvlan not in out, "Vlan strip enable error: " + out + ) self.mode_config(strip="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan strip disable error: " + out) + self.verify("vlan %s" % self.outvlan in out, "Vlan strip disable error: " + out) if self.nic in [ "ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP", @@ -439,7 +539,7 @@ class TestDualVlan(TestCase): "I40E_10G-10G_BASE_T_X722", ]: self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.outvlan, dutRxPortId), "testpmd> " ) def test_vlan_stripq_config(self): @@ -450,23 +550,25 @@ class TestDualVlan(TestCase): self.mode_config(extend="off") self.mode_config(strip="off") self.mode_config(stripq="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan strip queue disable error : " + out + "vlan %s" % self.outvlan in out, "vlan strip queue disable error : " + out ) # if self.nic in ["I40E_10G-SFP_XL710", "I40E_40G-QSFP_A", "I40E_40G-QSFP_B"]: self.mode_config(strip="on") self.mode_config(stripq="on") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan not in out, "vlan strip enable error: " + out) + self.verify( + "vlan %s" % self.outvlan not in out, "vlan strip enable error: " + out + ) self.mode_config(stripq="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlan) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan strip queue disable error: " + out + "vlan %s" % self.outvlan in out, "vlan strip queue disable error: " + out ) def test_vlan_insert_config(self): @@ -482,13 +584,15 @@ class TestDualVlan(TestCase): self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") - self.dut.send_expect("tx_vlan set %s %s" % (dutTxPortId, txvlan), "testpmd> ") + self.dut.send_expect( + "tx_vlan set %s %s" % (dutTxPortId, self.txvlan), "testpmd> " + ) self.dut.send_expect("port start all", "testpmd> ") self.dut.send_expect("start", "testpmd> ") self.vlan_send_packet() out = self.get_tcpdump_package() - self.verify("vlan %s" % txvlan in out, "vlan insert enable error: " + out) + self.verify("vlan %s" % self.txvlan in out, "vlan insert enable error: " + out) self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") @@ -498,7 +602,9 @@ class TestDualVlan(TestCase): self.vlan_send_packet() out = self.get_tcpdump_package() - self.verify("vlan %s" % txvlan not in out, "vlan insert disable error: " + out) + self.verify( + "vlan %s" % self.txvlan not in out, "vlan insert disable error: " + out + ) def test_vlan_tpid_config(self): """ @@ -521,21 +627,30 @@ class TestDualVlan(TestCase): self.mode_config(filter="on", strip="on", extend="on") # nic only support inner model, except Intel® Ethernet 700 Series nic self.dut.send_expect("vlan set inner tpid 0x1234 %s" % dutRxPortId, "testpmd> ") - self.vlan_send_packet(outvlan, invlan) + self.vlan_send_packet(self.outvlan, self.invlan) out = self.get_tcpdump_package() self.verify("0x8100" in out, "tpid is error: " + out) - self.verify("vlan %s" % outvlan in out, "vlan tpid disable error: " + out) - self.verify("vlan %s" % invlan in out, "vlan tpid disable error: " + out) + self.verify("vlan %s" % self.outvlan in out, "vlan tpid disable error: " + out) + self.verify("vlan %s" % self.invlan in out, "vlan tpid disable error: " + out) self.dut.send_expect("vlan set inner tpid 0x8100 %s" % dutRxPortId, "testpmd> ") - self.vlan_send_packet(outvlan, invlan) + self.vlan_send_packet(self.outvlan, self.invlan) out = self.get_tcpdump_package() self.verify("0x8100" in out, "tpid is error: " + out) - self.verify( - out is not None and "vlan" not in out, "vlane tpid enable error: " + out - ) + if self.kdriver == "i40e" and self.nic not in [ + "I40E_10G-10G_BASE_T_X722", + "I40E_10G-SFP_X722", + ]: + self.verify( + out is not None and f"vlan {self.invlan}" not in out, + "vlane tpid enable error: " + out, + ) + else: + self.verify( + out is not None and "vlan" not in out, "vlane tpid enable error: " + out + ) def test_vlan_synthetic_test(self): """ @@ -544,7 +659,7 @@ class TestDualVlan(TestCase): self.verify( self.nic != "IGB_1G-82574L", "sorry, dual vlan cannot support this self.nic" ) - for i in range(len(vlanCase)): + for i in range(len(self.vlanCase)): self.multimode_test(i) def test_vlan_random_test(self):