From patchwork Thu Nov 10 05:33:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119697 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 83FDBA04FD; Thu, 10 Nov 2022 06:29:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CA7F400EF; Thu, 10 Nov 2022 06:29:35 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 61764400D4 for ; Thu, 10 Nov 2022 06:29:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058173; x=1699594173; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/jpEPdMlSr06iD9X4+6x3qx/GQ6N9Txd+nb9gCZEUVA=; b=SNJRLCre+sBdlesrFW/tAIMEBB4HDsDB9thBP13OH6o8pQYF4kB+55J9 QZzfwye76922/WXLJoy3DCzxrwyVWLgJt288O83HIxI2pNzTxGzZiq1fb 34PsFomxkpskEw1QwvsY6RqaIzsCBUyt5X8KvHNwdZsPl3trDVGDeq/bU fKkYky23vzh0entG/04sO9HB0FXV1UKENSk+4qIBZk5jg1zh69o4lyJhk pHaQfY6rvXgCpirSjpFCQCMGaO45ETWVFXflRwzoFX8K7aMMylAs7ZOHj Wxt9g81GBJ8a5XdGOb0cgc9KRMvhQmgnkZVATVtTZdbZ3qLIzTyTlvtYL w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332592" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332592" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:32 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637036969" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637036969" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:30 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 1/8] test_plans/vlan: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:51 +0800 Message-Id: <20221110053358.437591-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 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 --- v2: -use the firmware version to judge whether to add command `extend on`. test_plans/vlan_ethertype_config_test_plan.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_plans/vlan_ethertype_config_test_plan.rst b/test_plans/vlan_ethertype_config_test_plan.rst index 80a6ee28..de4bccac 100644 --- a/test_plans/vlan_ethertype_config_test_plan.rst +++ b/test_plans/vlan_ethertype_config_test_plan.rst @@ -52,6 +52,9 @@ Test Case 2: test VLAN filtering on/off testpmd> vlan set filter on 0 testpmd> start + if the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single 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 +80,9 @@ Test Case 3: test adding VLAN Tag Identifier with changing VLAN TPID testpmd> vlan set strip off 0 testpmd> start + if the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single 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 Thu Nov 10 05:33:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119698 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 80D48A0540; Thu, 10 Nov 2022 06:29:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B1F340156; Thu, 10 Nov 2022 06:29:36 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 5F962400D4 for ; Thu, 10 Nov 2022 06:29:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058174; x=1699594174; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ghrK5i5tZsNhd459GGLucEhiMmYlLxkuwzah+/iCoA=; b=lovaH6HW+pqaSCHYD9OPWNr5x1KuW4eXm6Wk0ksskBCih/r9Nen8k0c+ xmnm1pJUDpaS8c4jeoBv/LSPT61hsNVDhhz6Wj7Zq85KIkk2Sp2X02Hsc VBYMC14E/tp1TyCpw377jHhZ+qmce9/GZyWQtwuqi6PNrsJW25I0VSa0d q5oMEVmDlInjKHemYF/vfdl3VKP1frJ3V1Dj6lNwXcVInu1bXLu8XRsAA jf1f959UiwFX9cPGa5JQ3opnqlMGdimVd4Bi4/Z4VENe2fI+RWj1v1vjO 8IDRcQveEdG1c7P8f5Dk8koYFeOxhyrUKr76bf9l76E60Leqj4c8WDv+a Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332599" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332599" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:34 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637036982" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637036982" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:32 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 2/8] tests/vlan_ethertype_config: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:52 +0800 Message-Id: <20221110053358.437591-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. 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..95062f91 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 single 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 single 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 Thu Nov 10 05:33:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119699 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 9DC2EA04FD; Thu, 10 Nov 2022 06:29:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99AF6410DE; Thu, 10 Nov 2022 06:29:37 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 0684B40150 for ; Thu, 10 Nov 2022 06:29:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058176; x=1699594176; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KOOpn6COr+cSYyMbBGB3sjBmW5D6x2k3Gho4SC098bU=; b=C5Az+GjWzxIr0Z2lHp3nKZ45df1ZLtAtdwbdZlOq7G+ly/wwVkFhPolY dMkM+SqI5PTCPVkOl9swft4k47lqYHqPzYN63pC8SSIWchHuiyKd3fS3M 4DZIW+zuPopoMbQqtmwfesYBSjkaayOlS0qEnVW/VcMG22AwWwzCpoGrY ZudNJMXwqEVmcn9HosB4hjROfwbawvDxTIfJJAieCF0VviHR4L7V7S0Bs qL37gE6hjUnkFgWHuz+EtLukjIF0YSQNsUCDVSnBgqdK922JDEaOVr/Xn SlyF8UUi+P44NGA1u80MfAqaVyRIcR/LmL7om+7wGUJ8gqaBktYdrQ4gy w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332604" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332604" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:35 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637036993" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637036993" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:34 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 3/8] test_plans/vlan: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:53 +0800 Message-Id: <20221110053358.437591-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. test_plans/vlan_test_plan.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test_plans/vlan_test_plan.rst b/test_plans/vlan_test_plan.rst index 6e2bf74e..442e4efe 100644 --- a/test_plans/vlan_test_plan.rst +++ b/test_plans/vlan_test_plan.rst @@ -61,6 +61,10 @@ 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 + + if the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single 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 +115,10 @@ 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:: - + + if the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single 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 Thu Nov 10 05:33:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119700 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 BC2CFA04FD; Thu, 10 Nov 2022 06:29:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7A1940A7D; Thu, 10 Nov 2022 06:29:39 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 9150F40A7D for ; Thu, 10 Nov 2022 06:29:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058177; x=1699594177; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0ML7i3D2Y13lqtxpYj1XYZrNUOnbUPNhMc1cbWm/NUs=; b=m+Rx9xZz4I+IjR+LkyMrUk9ndOV2pCluzt8ARNtZpcakD/m8EHDv57sj 2q6zDkUyF6GeCJasNzs4NPRq+2qR0uKD8MOAgJI2msYHSd2R2NsEW7PJc BKi8D95vQEz5V9J4Rz+emYqDlVYH9Me0XtxZhz2Jpy3U+3H5hxgwdsEUb n+DGTtfHBrnwXmlIpHza0P2JTrewfdTm1636oCjoobwJ8jPry1gn/yZue cXzy9ekhIP52lOo4YiKKwS6jzFbLEBEjq+9vUY/UvO6mDj8leHZei8iR2 6NMGAiUltkQVRdOuKPtkbsLtVUeAAD8AMfKHWXUNi9ISscj05w7UceiAx g==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332607" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332607" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:37 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637037005" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637037005" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:35 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 4/8] tests/vlan: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:54 +0800 Message-Id: <20221110053358.437591-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. 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..c2240c30 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 single 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 single 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): """ From patchwork Thu Nov 10 05:33:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119701 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 D9701A0540; Thu, 10 Nov 2022 06:29:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4D7A42D0C; Thu, 10 Nov 2022 06:29:39 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3CE734021D for ; Thu, 10 Nov 2022 06:29:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058179; x=1699594179; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=apkYEmlsPL8AZYjmGb+LT8IGXdcbx+brEa6tk+4cJVI=; b=Nk6NHWJmpMB4qTRLV9ZnijRjTaiaKFC1U1oAA+E6YHa2XaE9fUez7yXq WvAY19Rv8TYJvmx/wO9wuii7Y09zBVIbcWQscdKXebWvrjIyrd4mBnMAY hMQPzMwCY1V1blxdAmhdiKXXjFcrt8UJnjmBW4++a9i99dqXL9D12hO2w Ei1jhMgvbIqgoD+efcWxC0OJZngTUV2nIXBWMikgvIqmDQ15uRXvccr2I xvFhUhEylqAZcPQ02uBTaK1u40RxsqGv0gsWVyiqxR2wRi38qI68JHha3 vfKxx35Bgun5P5HmxeSYDhUAvvmLLkL3Em7/7WVM54Zvi1zQntyUEVE/B Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332615" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332615" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:38 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637037023" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637037023" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:37 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 5/8] test_plans/ipgre: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:55 +0800 Message-Id: <20221110053358.437591-5-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. test_plans/ipgre_test_plan.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test_plans/ipgre_test_plan.rst b/test_plans/ipgre_test_plan.rst index 693432ef..f44628f7 100644 --- a/test_plans/ipgre_test_plan.rst +++ b/test_plans/ipgre_test_plan.rst @@ -58,6 +58,9 @@ Start testpmd and enable rxonly forwarding mode:: testpmd> set verbose 1 testpmd> start + if the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single 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 Thu Nov 10 05:33:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119702 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 05818A04FD; Thu, 10 Nov 2022 06:29:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0104641181; Thu, 10 Nov 2022 06:29:42 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id E120541181 for ; Thu, 10 Nov 2022 06:29:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058181; x=1699594181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CzrS1PvE0mq8pmSyC+qP4ZE5FUBHAK0h6dAbhu7daag=; b=fea47zDOUzztIkw91vBhKRbxLukEeBhXe3pCivXafDL97o0031Ppj8x0 AE7+pL669aPIQKKfcz2XC7xgOo2c6+9dTSMlURuUtM3i4rZAr5ttG5ytX /1Bo3NHDz6T15hLtf2iJuxKzuSWktlMKeOQaKiBHkoGhb8QvLRzDVUBxB MA5eSAAMNmdN1/7r4Wby6IYtXalIem+U+QydwApgj7Qw+Yt9p0s98su/E bWGnw6xmyGbxlkmJ+kE0vqxI2NsFldnz1zpcqruwCjv9BgOX0FfK1+c8l C+SdUHOP9vlmDNGaaeKcLu7UPW8tvAaoW7cdqJGdJW3P3tdR8HUHKagVz w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332619" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332619" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:40 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637037040" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637037040" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:39 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 6/8] tests/ipgre: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:56 +0800 Message-Id: <20221110053358.437591-6-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. tests/TestSuite_ipgre.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index cd50c1c4..c9371678 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 single 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 Thu Nov 10 05:33:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119703 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 284E2A04FD; Thu, 10 Nov 2022 06:29:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 237CD42D18; Thu, 10 Nov 2022 06:29:44 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 7BDDE42D18 for ; Thu, 10 Nov 2022 06:29:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668058182; x=1699594182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uqRUEW7CnSUX/0h2odgJGcHad6xMPkPLZgPxpJSGntE=; b=fVsiHPjgknrgLtUyTYwZf5tZwnZ3KPoBVXikGM+GHis8uDQvM7yKlCb1 3k6Qepad4LCK9qqQvDxAhUnqzSSDtU4kwGiVad3+nz8BfY190SNmbA55V jNR9DSnRCm3MKTBr29bpWG7Nr2CbCR+uU9pojGd1SLJ2ulKuipA7fZteJ bXKvToD0W1JrZUWF+0JGsSzdAv6w5+8gSSfppffWWJmInoHGsrwW7b29z /kPA4ACHh9FkC7zkbpZPAJRc42ddtMlFQQgfaTS+53DW1vGK2yDaK/cLl trM0fZAyScMJALhFhfS49MmoEsy9ZQ4iqyxGjw17sdHbVrzbYfHBC32le A==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332625" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332625" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637037045" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637037045" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:40 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 7/8] test_plans/dual_vlan: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:57 +0800 Message-Id: <20221110053358.437591-7-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 --- v2: -use the firmware version to judge whether to add command `extend on`. test_plans/dual_vlan_test_plan.rst | 73 ++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst index fab18515..a5bbeb8b 100644 --- a/test_plans/dual_vlan_test_plan.rst +++ b/test_plans/dual_vlan_test_plan.rst @@ -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 the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single VLAN filter work normally:: + + 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 the i40e firmware version >= 8.4 the dpdk can only add 'extend on' to make the single VLAN filter work normally:: + + testpmd> vlan set extend on 0 + Enable VLAN filtering on port ``0``:: testpmd> vlan set filter on 0 @@ -358,6 +364,67 @@ except insert are set on rx port). | 0x1 | 0x2 | yes | yes,0x2 | yes | yes | pass | 0x3 | 0x1 | +-------+-------+--------+------------+--------+--------+-------+-------+-------+ +Do the synthetic test according to the following table, if the i40e firmware >= 8.4. + ++-------+-------+--------+------------+--------+--------+-------+-------+-------+ +| 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 Thu Nov 10 05:33:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 119704 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 5093EA0540; Thu, 10 Nov 2022 06:30:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B83F4014F; Thu, 10 Nov 2022 06:30:21 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 68929400EF for ; Thu, 10 Nov 2022 06:30: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=1668058219; x=1699594219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0SwLDMCfpiZQBpxwJnc/47CF+V/YNEcvBnqVCjbulcU=; b=nwjf39NU4x6dNKxYA9vSxVVpNp22WwPTndgaeOfBwmBVhHRcuqhomsIX FmlMXua9IRmG5hg1AxOxLsPS1hm3qkdtbyXOmPh9X98V4PlyfZ5mP6bK6 aaAhn7myiN7F9Q3DChfmDLM8QQ3Ml1InM8zR4E7oXXRz2d/i9mhIXjfb+ DoncF1PrZHDUXixRHTA+5m3NTPJXhs7BdU2C7kRqXys3YhB0j7fnJz3Jg q02mL3r05qJezZx8pFGudKlyCDEpvro+PlICbwv44RuOZJo3pPAlBlWwu AfEwIAqDRzp+LQ20qd9pX/cZeHUreBlpM3DRdoWByQM0VemzGHzQadzaU w==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="373332631" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="373332631" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:44 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="637037049" X-IronPort-AV: E=Sophos;i="5.96,152,1665471600"; d="scan'208";a="637037049" Received: from unknown (HELO dpdk-VF-dut247..) ([10.239.252.247]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 21:29:42 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 8/8] tests/dual_vlan: modify script and test plan to support i40e fimware > 8.3 Date: Thu, 10 Nov 2022 13:33:58 +0800 Message-Id: <20221110053358.437591-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221110053358.437591-1-weiyuanx.li@intel.com> References: <20221110053358.437591-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 Tested-by: Song Jiale --- v2: -use the firmware version to judge whether to add command `extend on`. tests/TestSuite_dual_vlan.py | 389 ++++++++++++++++++++++------------- 1 file changed, 246 insertions(+), 143 deletions(-) diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py index 87c5325b..e0cfc4b8 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,127 @@ 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.fwversion >= "8.40": + self.config_i40e_firmware_vlan() + 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_firmware_vlan(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 +245,15 @@ 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.kdriver == "i40e" and self.fwversion >= "8.40": + self.dut.send_expect( + "rx_vlan add %s %s" % (self.outvlan, dutRxPortId), + "testpmd> ", + ) continue if mode == "stripq": @@ -209,14 +281,15 @@ 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.kdriver == "i40e" and self.fwversion >= "8.40": + 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,15 +412,22 @@ class TestDualVlan(TestCase): """ self.mode_config(filter="on") self.mode_config(strip="off") - self.mode_config(extend="off") - self.vlan_send_packet(outvlan) + if self.kdriver == "i40e" and self.fwversion >= "8.40": + 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, ) - + self.logger.debug(self.nic) if self.nic not in [ "ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP", @@ -359,18 +440,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 +465,26 @@ 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.fwversion >= "8.40": + 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 +508,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 +532,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 +543,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 +577,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 +595,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): """ @@ -510,8 +609,6 @@ class TestDualVlan(TestCase): "ICE_25G-E810C_SFP", "ICE_100G-E810C_QSFP", "I40E_40G-QSFP_B", - "I40E_10G-SFP_X722", - "I40E_10G-10G_BASE_T_X722", "IGB_1G-82574L", "I40E_10G-10G_BASE_T_BC", ], @@ -521,21 +618,27 @@ 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.fwversion >= "8.40": + self.verify("0x8100" in out, "tpid is error: " + out) + 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 +647,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):