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