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