From patchwork Tue Nov 22 08:21:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120054 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 2B371A057F; Tue, 22 Nov 2022 09:22:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CCF242D43; Tue, 22 Nov 2022 09:22:20 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 34221427EB for ; Tue, 22 Nov 2022 09:22:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105338; x=1700641338; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ebYwX5VXbDzmwuBGvytGL5+rw31UvgR5+ryxhRaFfws=; b=k7KJL/nhgIW5hCRoCd1wVenmNYXVPHMwC+2aKeMANHhu0GlLA0RNfBGB 6y6ZfBWL7EAT2l0yK21Pi3mTRyW79rVlJhyLYt4G2r/CCOaLMwu4oZwHz dRFkHwe/1zDD0Xb47MqVdHseobvJEBBDzXc3/WEXD6jt+Mq/xCwG8mW+B ke6dn5VEwwH++eMVv6XMXvUHzKM2xH7VACradBBR23gwBhLTPR4nphcSS pscn50eihipGaMvnyEofbHoLksWf4L+zOEBqMOYEugMkPCY4qC0B8WsJF uADzv5IVe1vjPFG4VkGjGnqR9PYYF2U7vzO2CFznJNey9S8AEgvLTa+0X Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118803" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118803" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:14 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392785" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392785" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:12 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 1/8] test_plans/dual_vlan: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:21:59 +0800 Message-Id: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. test_plans/dual_vlan_test_plan.rst | 83 ++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 4 deletions(-) diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst index fab18515..0114a80d 100644 --- a/test_plans/dual_vlan_test_plan.rst +++ b/test_plans/dual_vlan_test_plan.rst @@ -35,6 +35,11 @@ The -n command is used to select the number of memory channels. It should match Test Case: Enable/Disable VLAN packets filtering ================================================ +Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter +work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally:: + + testpmd> vlan set extend on 0 + Setup the ``mac`` forwarding mode:: testpmd> set fwd mac @@ -61,9 +66,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 +115,11 @@ Disable VLAN packet extend and strip port ``0``:: testpmd> vlan set extend off 0 testpmd> vlan set strip off 0 +Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter +work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally:: + + testpmd> vlan set extend on 0 + Enable VLAN filtering on port ``0``:: testpmd> vlan set filter on 0 @@ -301,7 +309,9 @@ 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). -+-------+-------+--------+------------+--------+--------+-------+-------+-------+ ++-------------------------------------------------------+-----------------------+ +| Configure setting | Result | ++=======+=======+========+============+========+========+=======+=======+=======+ | Outer | Inner | Vlan | Vlan | Vlan | Vlan | Pass/ | Outer | Inner | | vlan | vlan | strip | filter | extend | insert | Drop | vlan | vlan | +-------+-------+--------+------------+--------+--------+-------+-------+-------+ @@ -358,6 +368,71 @@ except insert are set on rx port). | 0x1 | 0x2 | yes | yes,0x2 | yes | yes | pass | 0x3 | 0x1 | +-------+-------+--------+------------+--------+--------+-------+-------+-------+ +Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter +work normally. Therefore, if the i40e firmware >= 8.4 the synthetic test according to the following table. +In addition, filter inner vlan when firmware <= 8.3, filter outer vlan when firmware >= 8.4. + ++-------------------------------------------------------+-----------------------+ +| Configure setting | Result | ++=======+=======+========+============+========+========+=======+=======+=======+ +| 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 Tue Nov 22 08:22:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120056 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 9AB84A057F; Tue, 22 Nov 2022 09:22:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4753642D53; Tue, 22 Nov 2022 09:22:21 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D72F9427EB for ; Tue, 22 Nov 2022 09:22:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105339; x=1700641339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Nx9Wh6LtcVXtmkpw8gv0wmyQUbeG6i3yNsWBJKsvYI=; b=QGx+oQ028okuOzjPdHbEJOZ+ftAgSZq3FQCPyc63LeSrgHh/5W+8Z0mv JuPqYkn3jxqJZXz7NrinxYS9yzKdPBRPKfL+6W8WY4+WAHS2/wjTIRtn0 MukQoWxPA+poeV8ZTlzUsLgbm8OC8idaiuGFDA1vBfWBjca5kzTloN3vC nhzeWjpnTxEoIwgnLXnNPNgyfsEUstH1lLrKzwYWcqqnVShhHSQj0Ec6A Ri4sh+Zw2j3TGV5dbjnmHUGKdxI7kALIxAwZMGBRDXQKYkjfdZ5M3CcLd qzszu8VJzYh3DX20nlmzii9YIiVaaxBRQigiOn3lTYA82IjtGVCn/aK4W g==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118808" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118808" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:16 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392799" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392799" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:14 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 2/8] tests/dual_vlan: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:00 +0800 Message-Id: <20221122082206.12559-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. tests/TestSuite_dual_vlan.py | 393 ++++++++++++++++++++++------------- 1 file changed, 252 insertions(+), 141 deletions(-) diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py index 614e70eb..38c200a7 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 @@ -104,6 +45,15 @@ class TestDualVlan(TestCase): "Default", "--portmask=%s" % portMask, socket=self.ports_socket ) + # Get the firmware version information + try: + self.fwversion, _, _ = self.pmdout.get_firmware_version( + self.dut_ports[0] + ).split() + except ValueError: + # nic IXGBE, IGC + self.fwversion = self.pmdout.get_firmware_version(self.dut_ports[0]).split() + if self.nic in [ "I40E_10G-SFP_XL710", "I40E_40G-QSFP_A", @@ -120,6 +70,124 @@ class TestDualVlan(TestCase): self.verify("Set mac packet forwarding mode" in out, "set fwd mac error") out = self.dut.send_expect("start", "testpmd> ", 120) + # Vlan id + self.txvlanId_id = 3 + self.outvlanId_id = 1 + self.invlanId_id = 2 + + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.config_i40e_firmware_vlan() + else: + self.config_original() + + def config_original(self): + self.allResult = { + "TX+OUTER+INNER": (self.txvlanId_id, self.outvlanId_id, self.invlanId_id), + "TX+INNER": (self.txvlanId_id, self.invlanId_id), + "TX+OUTER": (self.txvlanId_id, self.outvlanId_id), + "OUTER+INNER": (self.outvlanId_id, self.invlanId_id), + "INNER": (self.invlanId_id,), + "OUTER": (self.outvlanId_id,), + "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_firmware_vlan(self): + self.allResult = { + "TX+OUTER+INNER": (self.txvlanId_id, self.outvlanId_id, self.invlanId_id), + "TX+INNER": (self.txvlanId_id, self.invlanId_id), + "TX+OUTER": (self.txvlanId_id, self.outvlanId_id), + "OUTER+INNER": (self.outvlanId_id, self.invlanId_id), + "INNER": (self.invlanId_id,), + "OUTER": (self.outvlanId_id,), + "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 +242,10 @@ 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> ") continue if mode == "stripq": @@ -209,14 +273,10 @@ 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> ") continue if mode == "extend": @@ -235,22 +295,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.txvlanId_id), "testpmd> " ) self.dut.send_expect("port start all", "testpmd> ") self.dut.send_expect("start", "testpmd> ") @@ -259,27 +319,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.outvlanId_id, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan, invlan) - self.check_result(vlanCase[caseIndex][0], configMode + " result Error") + self.vlan_send_packet(self.outvlanId_id, self.invlanId_id) + 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.outvlanId_id, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan add %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.invlanId_id, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan, invlan) - self.check_result(vlanCase[caseIndex][1], configMode + " result Error") + self.vlan_send_packet(self.outvlanId_id, self.invlanId_id) + 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.invlanId_id, 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 +348,24 @@ class TestDualVlan(TestCase): else: self.dut.send_expect( - "rx_vlan add %s %s" % (invlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.invlanId_id, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan add %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan add %s %s" % (self.outvlanId_id, 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.outvlanId_id, self.invlanId_id) + 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.invlanId_id, dutRxPortId), "testpmd> " ) self.dut.send_expect( - "rx_vlan rm %s %s" % (outvlan, dutRxPortId), "testpmd> " + "rx_vlan rm %s %s" % (self.outvlanId_id, dutRxPortId), "testpmd> " ) def check_result(self, resultKey, errorString): @@ -314,14 +374,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,15 +399,24 @@ class TestDualVlan(TestCase): """ self.mode_config(filter="on") self.mode_config(strip="off") - self.mode_config(extend="off") - self.vlan_send_packet(outvlan) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.mode_config(extend="on") + self.dut.send_expect( + "rx_vlan rm %s %s" % (self.outvlanId_id, dutRxPortId), "testpmd> " + ) + else: + self.mode_config(extend="off") + + self.vlan_send_packet(self.outvlanId_id) 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.outvlanId_id not in out, "Vlan filter enable error: " + out, ) - + self.logger.debug(self.nic) if self.nic not in [ "ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP", @@ -359,18 +429,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.outvlanId_id) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan filter disable error: " + out) + self.verify( + "vlan %s" % self.outvlanId_id 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.outvlanId_id, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlanId_id) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan filter disable error: " + out) + self.verify( + "vlan %s" % self.outvlanId_id 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.outvlanId_id, dutRxPortId), "testpmd> " ) def test_vlan_filter_table(self): @@ -380,20 +454,28 @@ 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) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.mode_config(extend="on") + else: + self.mode_config(extend="off") + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlanId_id, dutRxPortId), "testpmd> " + ) + self.vlan_send_packet(self.outvlanId_id) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan filter table enable error: " + out + "vlan %s" % self.outvlanId_id 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.outvlanId_id, dutRxPortId), "testpmd> " + ) + self.vlan_send_packet(self.outvlanId_id) 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.outvlanId_id not in out, "vlan filter table disable error: " + out, ) @@ -417,16 +499,20 @@ 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.outvlanId_id, dutRxPortId), "testpmd> " ) - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlanId_id) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan not in out, "Vlan strip enable error: " + out) + self.verify( + "vlan %s" % self.outvlanId_id not in out, "Vlan strip enable error: " + out + ) self.mode_config(strip="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlanId_id) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan in out, "Vlan strip disable error: " + out) + self.verify( + "vlan %s" % self.outvlanId_id in out, "Vlan strip disable error: " + out + ) if self.nic in [ "ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP", @@ -439,7 +525,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.outvlanId_id, dutRxPortId), "testpmd> " ) def test_vlan_stripq_config(self): @@ -450,23 +536,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.outvlanId_id) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan strip queue disable error : " + out + "vlan %s" % self.outvlanId_id 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.outvlanId_id) out = self.get_tcpdump_package() - self.verify("vlan %s" % outvlan not in out, "vlan strip enable error: " + out) + self.verify( + "vlan %s" % self.outvlanId_id not in out, "vlan strip enable error: " + out + ) self.mode_config(stripq="off") - self.vlan_send_packet(outvlan) + self.vlan_send_packet(self.outvlanId_id) out = self.get_tcpdump_package() self.verify( - "vlan %s" % outvlan in out, "vlan strip queue disable error: " + out + "vlan %s" % self.outvlanId_id in out, "vlan strip queue disable error: " + out ) def test_vlan_insert_config(self): @@ -482,13 +570,17 @@ 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.txvlanId_id), "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.txvlanId_id in out, "vlan insert enable error: " + out + ) self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") @@ -498,7 +590,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.txvlanId_id not in out, "vlan insert disable error: " + out + ) def test_vlan_tpid_config(self): """ @@ -517,23 +611,40 @@ class TestDualVlan(TestCase): ) self.mode_config(filter="on", strip="on", extend="on") + # i40e set VLAN id + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlanId_id, dutRxPortId), + "testpmd> ", + ) # 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.outvlanId_id, self.invlanId_id) 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.outvlanId_id in out, "vlan tpid disable error: " + out + ) + self.verify("vlan %s" % self.invlanId_id 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.outvlanId_id, self.invlanId_id) 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 - ) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + # The kernel driver uses the outer VLAN filter, and the DPDK synchronously modifies, + # DPDK filter outer VLAN when firmware >= 8.4, the test result check strip inner. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.verify("0x8100" in out, "tpid is error: " + out) + self.verify( + out is not None and f"vlan {self.invlanId_id}" 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): """ @@ -542,7 +653,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): From patchwork Tue Nov 22 08:22:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120055 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 37E14A0580; Tue, 22 Nov 2022 09:22:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D80942D4B; Tue, 22 Nov 2022 09:22:21 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5ED2142D43 for ; Tue, 22 Nov 2022 09:22:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105339; x=1700641339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uVoBg1NTkNbcvqOqFz5vpNgsW3FSS3zscryW0LRSSwk=; b=F5W0KYOwgSq0zDxOenH7YfgMrcvmW0afxasGd1riRfThYgSX2hukbBi/ +ZSYRgER/0U2hVqNdh4uEDkosQUwUS8V37FTyO055BIuVfa/qJ9PJMXUA uIw3uPu91vKmwaEYXrwhCueE62QWWRiRzqb/qRt/TzkM1fJX3vRLB7Hf0 1x2F9+sTUKHCizV9SpCmp5zEiB0aIeOnljCyJ0qpKoQpPSrQRs3J+/LJn ypRgzDy3T3Ra3iftfpzcvnNl8RI3mWT+xfsX+cmxpcojEpETwtdLlTjen Ivh3y2cttHoEjZ9bMsDuH/lAx7zR9XtW9PBQTvDZkBH0H6lTnLfLCEsQt w==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118811" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118811" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:18 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392820" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392820" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:16 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 3/8] test_plans/ipgre: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:01 +0800 Message-Id: <20221122082206.12559-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. test_plans/ipgre_test_plan.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_plans/ipgre_test_plan.rst b/test_plans/ipgre_test_plan.rst index 693432ef..f51193b2 100644 --- a/test_plans/ipgre_test_plan.rst +++ b/test_plans/ipgre_test_plan.rst @@ -58,6 +58,10 @@ Start testpmd and enable rxonly forwarding mode:: testpmd> set verbose 1 testpmd> start + Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter + work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally: + testpmd> vlan set extend on 0 + Send packet as table listed and packet type match each layer:: Ether()/IPv6(nh=47)/GRE()/IP()/UDP()/Raw('x'*40) From patchwork Tue Nov 22 08:22:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120057 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 6DF9CA057F; Tue, 22 Nov 2022 09:22:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A57A42D4F; Tue, 22 Nov 2022 09:22:28 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 3B586427EB for ; Tue, 22 Nov 2022 09:22:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105347; x=1700641347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Wk0CarntKvEZZJXhGITQoeXX0oH9l2Rhc3tVSuBNEEQ=; b=mNsRl+hIkRsCWwysCK1C20Xb234azDowV/aU7EoNoO/873RMGzjaiZJU 25CXUrc+nVM4MiBePbFHlrchd17JoAGOwHsRAuBNvggzS5LHjUwqGliaE SVikt5trcnpS4Ivvw0IS/poH3Ytob5zmWkaUai020ks7C5N8ZXHMWON5F liXIyks/nsxNXbIdwRCn4edcVS6OgcFXFh9uJve+L8pmGRpHHm6ZfPXSs ijaH8GASYRhxodbT9tUIfR1ApSv0AYcBofP2sUESIpxdq1iv5NX0LQoVl 3+y+1VIB1QWBeZwGUTY4H2WLbneqVhXIr5q4VtAYFGMwlRc0UTcEwt1c3 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118818" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118818" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:20 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392845" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392845" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:19 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 4/8] tests/ipgre: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:02 +0800 Message-Id: <20221122082206.12559-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. tests/TestSuite_ipgre.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index cd50c1c4..ecd8e19c 100644 --- a/tests/TestSuite_ipgre.py +++ b/tests/TestSuite_ipgre.py @@ -309,9 +309,22 @@ class TestIpgre(TestCase): socket=self.ports_socket, ) + # Get the firmware version information + try: + fwversion, _, _ = self.pmdout.get_firmware_version( + self.dut_ports[0] + ).split() + except ValueError: + # nic IXGBE, IGC + fwversion = self.pmdout.get_firmware_version(self.dut_ports[0]).split() + self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and fwversion >= "8.40": + self.dut.send_expect("vlan set extend off 0", "testpmd>") # inner ipv4 config_layers = { From patchwork Tue Nov 22 08:22:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120059 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 AB03FA057F; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6E1F42D5D; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 4F25B42D48 for ; Tue, 22 Nov 2022 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105348; x=1700641348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o7zrZ26iDBHQ1d+EM47ifKjZJbzbmiZQzLpQFZ0KEu0=; b=ZbPD654KipGJU/E2MVm/rxjHS4Pm4meITlMuetU6gBWgFdKj7We7Rcuf EP7C63F4eraDgtf1Jz8GHclnjR+0zCfZAEM/hOwZOX+8azq5bBHc5uMEJ nC0fa8A8vanCAUNnCwHetD4C85Qd67Jkqz9i8VyfPlnlMAaCAj0lMalPN tu5thDTLiSobDkQt6S/Y1FfQ2BIAVrBQzxuJcHjOfKeDDrmI+16dhtkfB 4JMOJxTrS7ie0BeEctgGYxZnzhaqrIr2zBryD7dc1kqKRO283gbQN5Usw Wzi7Vi3wD3RuHme7N90WTUk3jb4+0ESvgO588n2+uE5bDdxwEN20RXW5A Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118822" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118822" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:22 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392852" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392852" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:20 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 5/8] test_plans/vlan_ethertype_config: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:03 +0800 Message-Id: <20221122082206.12559-5-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. test_plans/vlan_ethertype_config_test_plan.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test_plans/vlan_ethertype_config_test_plan.rst b/test_plans/vlan_ethertype_config_test_plan.rst index 80a6ee28..7b145a9d 100644 --- a/test_plans/vlan_ethertype_config_test_plan.rst +++ b/test_plans/vlan_ethertype_config_test_plan.rst @@ -52,6 +52,10 @@ Test Case 2: test VLAN filtering on/off testpmd> vlan set filter on 0 testpmd> start + Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter + work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally: + testpmd> vlan set extend on 0 + 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``. @@ -77,6 +81,10 @@ Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID testpmd> vlan set strip off 0 testpmd> start + Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter + work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally: + testpmd> vlan set extend on 0 + 2. Add a VLAN Tag Identifier ``16`` on port ``0``:: testpmd> rx_vlan add 16 0 From patchwork Tue Nov 22 08:22:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120058 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 8C040A0580; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 886E742D48; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D3544427EB for ; Tue, 22 Nov 2022 09:22:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105348; x=1700641348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tOKNUVmZgJCnB8F3ypauWAMa6hUUfdQ46gZB+NjZID0=; b=dU2I3iJ1EVv3fwC9JevpEDp79KAmEcBOV97QfvaZcJTvoDXNdKL1dYQt 4TAJ2bKk71x62jfBkwcft69fv/D/+G8TZ3a1ruwIYN5GDSJ+oMq1DyIvV smW2NOLUExkNK6jSfor2mqRRf8bcFXtu1dfIyNwJNKN/jVTxktuFeW1eN LgWjx9SJBDeBSIjvyvoDQNdi0C+YHU19wTNs4wnvtKXhJHbvtpMpG+pwn p0v0xoWJxODjE6f+cqM5NDWENL2SohXox63nODUEsaP4iGqtoSg9CLLdL ji1UzVhyOlzdwUKf30t5fOZBcDSjq3gu6iP0YmYtdPH737xxgxhq9vH8r Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118825" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118825" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:24 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392860" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392860" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:22 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 6/8] tests/vlan_ethertype_config: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:04 +0800 Message-Id: <20221122082206.12559-6-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. tests/TestSuite_vlan_ethertype_config.py | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vlan_ethertype_config.py b/tests/TestSuite_vlan_ethertype_config.py index b641d928..7147c490 100644 --- a/tests/TestSuite_vlan_ethertype_config.py +++ b/tests/TestSuite_vlan_ethertype_config.py @@ -56,6 +56,17 @@ class TestVlanEthertypeConfig(TestCase): """ self.pmdout = PmdOutput(self.dut) self.pmdout.start_testpmd("Default", "--portmask=%s" % self.portmask) + # Get the firmware version information + try: + self.fwversion, _, _ = self.pmdout.get_firmware_version( + self.dut.get_ports()[0] + ).split() + except ValueError: + # nic IXGBE, IGC + self.fwversion = self.pmdout.get_firmware_version( + self.dut.get_ports()[0] + ).split() + if self.kdriver == "i40e": self.dut.send_expect("set promisc all off", "testpmd> ") @@ -194,6 +205,12 @@ class TestVlanEthertypeConfig(TestCase): self.dut.send_expect( "vlan set filter on %s" % dutRxPortId, "testpmd> " ) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + 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 +226,12 @@ 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) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + 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 @@ -359,6 +380,8 @@ class TestVlanEthertypeConfig(TestCase): """ Run after each test case. """ + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.dut.send_expect("vlan set extend off %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("stop", "testpmd> ", 30) self.dut.send_expect("quit", "# ", 30) pass From patchwork Tue Nov 22 08:22:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120060 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 E4E0DA0581; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF18A42D62; Tue, 22 Nov 2022 09:22:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 793D842D59 for ; Tue, 22 Nov 2022 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105348; x=1700641348; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hctbHjzERarHtbyw8r2Dzao0zjHwatJSQQ2xkMRLitM=; b=eWSqygOjbVi/uJOy7RG3HOeiRti3oBHb4WgZjmdxROrzpo9FWQM0TlzH RhO9YS06+goId2W190y0KOIu6zUHQm0qt9l2hSksEf2cLJULLbOkYNVbM 8gksn69qe+W+nwce7V3GzsFpwWdD4GG6qTA3C9Wp3YdTbAYtkqgorr5E7 ZJbnx3yKqZxi70A/xVItr9wUrTQNtZHe3vdxnVm46vLkk4DehB9rHy2aD ZRHgLdGhcmDXTCQpUmtnuG02ucF7pvrtK29e5+bxSbPsQca8BfbnfkIas fKymXs+tfwRGCR7XgUbz7exrRsDQASli9vsrtY7+IAtzJIY+g1A5Q19iX g==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118831" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118831" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:26 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392871" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392871" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:24 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 7/8] test_plans/vlan: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:05 +0800 Message-Id: <20221122082206.12559-7-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. test_plans/vlan_test_plan.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test_plans/vlan_test_plan.rst b/test_plans/vlan_test_plan.rst index 6e2bf74e..394b3ba4 100644 --- a/test_plans/vlan_test_plan.rst +++ b/test_plans/vlan_test_plan.rst @@ -61,6 +61,11 @@ 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 + + Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter + work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally: + 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 +116,11 @@ 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:: - + + Due to the kernel enables Qinq and cannot be closed, the DPDK only add `extend on` to make the VLAN filter + work normally. Therefore, if the i40e firmware version >= 8.4 the DPDK can only add `extend on` to make the VLAN filter work normally: + 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 Tue Nov 22 08:22:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120061 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 DEA7BA057F; Tue, 22 Nov 2022 09:22:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB62542D4C; Tue, 22 Nov 2022 09:22:31 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id E4C85427EB for ; Tue, 22 Nov 2022 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669105349; x=1700641349; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gd8Oy+FG690/afPeqS2w+zQhMo+aQatb8erhMLWg+Yg=; b=c8zca4MzIRABrzfd1cy5UeJr4p+xtKDzeSWQWLAJCbf7Fyef4it3obpa DtxGr2YIK7lnlekdQ+ER5ej6PaeVtCAofduQazpsEFVUDVB932AqVnm1q /uT+m78PDwjqzBLcVWthiyeep+yTUmVvy7TAD7NVW699UBFz4O46dWk+m fwmSKYZwkXVBUsawZfEY58us8HV2Ml36ciEefLBOkyE9aDPO37O81BJ7w e2lmy+ogNJ0ydU6seVff4hk6+yCwAh393Dki07me26noDqFbLprrn6YQC rvhx58EagmlpXp/e/TExwDmIKPn1b02I0G5H+jTtpur2dFbrUFryMabcc g==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="297118837" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="297118837" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:28 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="970392878" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="970392878" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 00:22:26 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V5 8/8] tests/vlan: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 16:22:06 +0800 Message-Id: <20221122082206.12559-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122082206.12559-1-weiyuanx.li@intel.com> References: <20221122082206.12559-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.4. When the fimrware >= 8.4, if the filter is to take effect need to enable extend. Signed-off-by: Weiyuan Li Acked-by: Lijuan Tu --- Tested-by: Song Jiale v2: -use the firmware version to judge whether to add command `extend on`. v3: -modify description. v4: -modify comments. -dual_vlan test plan modify table and add header. v5: -fix some typos. tests/TestSuite_vlan.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py index 3d8811f9..1bdac137 100644 --- a/tests/TestSuite_vlan.py +++ b/tests/TestSuite_vlan.py @@ -48,7 +48,14 @@ class TestVlan(TestCase): self.pmdout.start_testpmd( "Default", "--portmask=%s --port-topology=loop" % portMask ) - + # Get the firmware version information + try: + self.fwversion, _, _ = self.pmdout.get_firmware_version( + self.dut_ports[0] + ).split() + except ValueError: + # nic IXGBE, IGC + self.fwversion = self.pmdout.get_firmware_version(self.dut_ports[0]).split() self.dut.send_expect("set verbose 1", "testpmd> ") self.dut.send_expect("set fwd mac", "testpmd> ") self.dut.send_expect("set promisc all off", "testpmd> ") @@ -105,6 +112,10 @@ class TestVlan(TestCase): self.dut.send_expect( "rx_vlan add %d %s" % (self.vlan, dutRxPortId), "testpmd> " ) + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.dut.send_expect("vlan set extend on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("vlan set strip off %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("start", "testpmd> ", 120) out = self.dut.send_expect("show port info %s" % dutRxPortId, "testpmd> ", 20) @@ -127,6 +138,10 @@ class TestVlan(TestCase): Disable receipt of VLAN packets """ self.dut.send_expect("rx_vlan rm %d %s" % (self.vlan, dutRxPortId), "testpmd> ") + # Because the kernel forces enable Qinq and cannot be closed, + # the dpdk can only add 'extend on' to make the VLAN filter work normally. + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.dut.send_expect("vlan set extend on %s" % dutRxPortId, "testpmd> ") self.dut.send_expect("start", "testpmd> ", 120) self.vlan_send_packet(self.vlan) @@ -187,7 +202,8 @@ class TestVlan(TestCase): """ Run after each test case. """ - pass + if self.kdriver == "i40e" and self.fwversion >= "8.40": + self.dut.send_expect("vlan set extend off %s" % dutRxPortId, "testpmd> ") def tear_down_all(self): """