From patchwork Tue Nov 22 07:09:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 120050 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 5CE8EA057F; Tue, 22 Nov 2022 08:09:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 585AC42D4E; Tue, 22 Nov 2022 08:09:54 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id A77AD42D62 for ; Tue, 22 Nov 2022 08:09:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669100991; x=1700636991; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jTHPKmH4Y6+FZxm0kLCaectBDWmA/aX/+0ufMmjzK78=; b=QLmAGoTjUl4YnMLp+n4LC441Qe6u9xKrb0t31eDrdeYJUtAc4JRc9Yvm lt+HI942mZTFT8EqJdw7pq21yja7o11JpZh+SdVrBDs/D9YVnBJuite4L u9cmOMnS62vIbQtyuZcz2kOd8hvwRnmWEWdwprRATQ86bN6+ojPA+70c6 Y0LyzDT6VRdaIwgWI16M9SZF0PAgstYekXd3I+76uPSMHGwNtvEMPjN08 FBgKJGnDY9KC17Pwoc46VLdjRQ21LtejjAQqNA5oLHgJdcxNj8JlHOGfi pwPtsXevOXHLjY8pBMyHoEtCF+H47RV56zOBdW0Rpadd6PU4IpWrMvxBv A==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="314899828" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="314899828" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 23:09:51 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="730296370" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208";a="730296370" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 23:09:49 -0800 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Song Jiale Subject: [dts][PATCH V4 8/8] tests/vlan: modify script and test plan to support i40e fimware >= 8.4 Date: Tue, 22 Nov 2022 15:09:27 +0800 Message-Id: <20221122070927.7634-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221122070927.7634-1-weiyuanx.li@intel.com> References: <20221122070927.7634-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. 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): """