From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16FB1A0C43; Fri, 22 Oct 2021 09:56:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11D6041159; Fri, 22 Oct 2021 09:56:31 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 57E5A4116A for ; Fri, 22 Oct 2021 09:56:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="229521062" X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="229521062" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 00:56:28 -0700 X-IronPort-AV: E=Sophos;i="5.87,172,1631602800"; d="scan'208";a="568964270" Received: from unknown (HELO dpdk.lan) ([10.240.183.77]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 00:56:27 -0700 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Date: Fri, 22 Oct 2021 15:59:33 +0000 Message-Id: <20211022155933.62573-3-yanx.xia@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211022155933.62573-1-yanx.xia@intel.com> References: <20211022155933.62573-1-yanx.xia@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V2 2/2] tests/kernelpf_iavf: modify dts because case design is unreasonable 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 Sender: "dts" validate strip function need to enable vlan filter and received the packets, in addition, strip function has nothing to do with driver version. Signed-off-by: Yan Xia --- tests/TestSuite_kernelpf_iavf.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index 6a858fc5..ff1f83a6 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -529,29 +529,31 @@ class TestKernelpfIavf(TestCase): random_vlan = random.randint(1, MAX_VLAN) self.vm_testpmd.start_testpmd("all") self.vm_testpmd.execute_cmd("port stop all") - self.vm_testpmd.execute_cmd("vlan set filter off 0") + self.vm_testpmd.execute_cmd("vlan set filter on 0") + self.vm_testpmd.execute_cmd("rx_vlan add %s 0" % random_vlan) self.vm_testpmd.execute_cmd("vlan set strip off 0") - self.vm_testpmd.execute_cmd("vlan set strip on 0") self.vm_testpmd.execute_cmd("port start all") self.vm_testpmd.execute_cmd("set fwd mac") self.vm_testpmd.execute_cmd("set verbose 1") self.vm_testpmd.execute_cmd("start") + + #enable strip + self.vm_testpmd.execute_cmd("vlan set strip on 0") self.start_tcpdump(self.tester_intf) self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") tcpdump_out = self.get_tcpdump_package() - receive_pkt = re.findall('vlan %s' % random_vlan, tcpdump_out) - self.verify(len(receive_pkt) == 1, 'Failed to received vlan packet!!!') + self.verify('> %s' % self.vf_mac in tcpdump_out and '%s >' % self.vf_mac in tcpdump_out, 'Failed to received packet!!!') + receive_vlan_pkt = re.findall('vlan %s' % random_vlan, tcpdump_out) + self.verify(len(receive_vlan_pkt) == 1, 'Failed to received vlan packet!!!') # disable strip self.vm_testpmd.execute_cmd("vlan set strip off 0") self.start_tcpdump(self.tester_intf) self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") tcpdump_out = self.get_tcpdump_package() - receive_pkt = re.findall('vlan %s' % random_vlan, tcpdump_out) - if self.driver_version < "2.13.10" or self.kdriver == 'ice': - self.verify(len(receive_pkt) == 2, 'Failed to not received vlan packet!!!') - else: - self.verify(len(receive_pkt) == 1, 'Failed to not received vlan packet!!!') + self.verify('> %s' % self.vf_mac in tcpdump_out and '%s >' % self.vf_mac in tcpdump_out, 'Failed to received packet!!!') + receive_vlan_pkt = re.findall('vlan %s' % random_vlan, tcpdump_out) + self.verify(len(receive_vlan_pkt) == 2, 'Failed to not received vlan packet!!!') def test_vf_vlan_filter(self): random_vlan = random.randint(2, MAX_VLAN) -- 2.33.1