From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 75CACA04B5; Thu, 29 Oct 2020 08:37:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52A2FAD6F; Thu, 29 Oct 2020 08:37:53 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 5392AAC8F for ; Thu, 29 Oct 2020 08:37:50 +0100 (CET) IronPort-SDR: JIySUTiZ5DFoMgTToYB/mt8DAANSlP7DO2c3n7wNnKGdHOgcMzc/f1GzSvKCAON8crVoLkpP6h nSTyFH6qqf7g== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="147673939" X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="147673939" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 00:37:48 -0700 IronPort-SDR: CLYecxjppxbYg0q5dK5kV/tHnCzJ7O8oYjOCx+JvILLW8BoZ5gK6yP3J0NA3MOLpsx2T/BaUFL YU50N65StvEA== X-IronPort-AV: E=Sophos;i="5.77,429,1596524400"; d="scan'208";a="536565160" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 00:37:46 -0700 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Thu, 29 Oct 2020 15:40:08 +0800 Message-Id: <20201029074008.29911-2-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201029074008.29911-1-weix.xie@intel.com> References: <20201029074008.29911-1-weix.xie@intel.com> Subject: [dts] [PATCH V1 2/2] tests/TestSuite_kernelpf_iavf:adapt to I40E driver update X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" *Update i40e driver to 2.13.10, while vlan tag is removed, the pkts with vlan tag shall not be received. Signed-off-by: Xie wei --- tests/TestSuite_kernelpf_iavf.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index da925109..adeac42f 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -428,8 +428,12 @@ class TestKernelpfIavf(TestCase): out = 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) == 2, "fail to tester received vlan packet!!!") - self.verify(self.vf_mac in out, "Failed to received vlan packet!!!") + if self.kdriver == 'ice': + self.verify(len(receive_pkt) == 2, "fail to tester received vlan packet!!!") + self.verify(self.vf_mac in out, "Failed to received vlan packet!!!") + else: + self.verify(len(receive_pkt) == 1, "fail to tester received vlan packet!!!") + self.verify(self.vf_mac not in out, "Received vlan packet!!!") def send_and_getout(self, vlan=0, pkt_type="UDP"): @@ -493,7 +497,10 @@ class TestKernelpfIavf(TestCase): # send vlan 1 packet, vf can receive packet out = self.send_and_getout(vlan=1, pkt_type="VLAN_UDP") - self.verify(self.vf_mac in out, "received vlan 1 packet!!!") + if self.kdriver == 'ice': + self.verify(self.vf_mac in out, "Not received vlan 1 packet!!!") + else: + self.verify(self.vf_mac not in out, "Received vlan 1 packet!!!") def test_vf_vlan_insertion(self): self.vm_testpmd.start_testpmd("all") @@ -538,7 +545,10 @@ class TestKernelpfIavf(TestCase): 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) == 2, 'Failed to not received vlan packet!!!') + if 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!!!') def test_vf_vlan_filter(self): random_vlan = random.randint(2, MAX_VLAN) @@ -572,7 +582,10 @@ class TestKernelpfIavf(TestCase): time.sleep(1) tcpdump_out = self.get_tcpdump_package() receive_pkt = re.findall('vlan %s' % random_vlan, tcpdump_out) - self.verify(len(receive_pkt) == 2, 'Failed to received vlan packet!!!') + if self.kdriver == 'ice': + self.verify(len(receive_pkt) == 2, 'Failed to received vlan packet!!!') + else: + self.verify(len(receive_pkt) == 1, 'Failed to received vlan packet!!!') def test_vf_without_jumboframe(self): self.tester.send_expect('ifconfig %s mtu %s' % (self.tester_intf, ETHER_JUMBO_FRAME_MTU), '#') @@ -923,7 +936,10 @@ class TestKernelpfIavf(TestCase): self.scapy_send_packet(self.vf_mac, self.tester_intf, vlan_flags=True, count=10) out = self.vm_dut.get_session_output() packets = len(re.findall('received 1 packets', out)) - self.verify(packets == 10, "Not receive expected packet") + if self.kdriver == 'ice': + self.verify(packets == 10, "Not receive expected packet") + else: + self.verify(packets == 0, "Receive expected packet") # send 10 untagged packets, and check 10 untagged packets received self.scapy_send_packet(self.vf_mac, self.tester_intf, count=10) -- 2.17.1