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 668F9A0521; Tue, 3 Nov 2020 09:42:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4748EC822; Tue, 3 Nov 2020 09:42:38 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9404EC816 for ; Tue, 3 Nov 2020 09:42:35 +0100 (CET) IronPort-SDR: Jl1NF12sKUQ0On8/dgKKjQsMqmDgbpAKlC9ZDG7xftMdNw8ozQ8RzYMFmBZZrNKKiHTRxNQnUl 3gL9fdJESvTg== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="230648520" X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="230648520" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 00:42:33 -0800 IronPort-SDR: /5yL62LRlNuhX31Ygygt/dJL4LYhycD9TQk2nPD6UaP/qSPlpb32jceNCVCe5rL9O3qQAXQh+p YjHeOGIuBUFw== X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="353133394" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 00:42:32 -0800 From: Xie wei To: dts@dpdk.org Cc: Xie wei Date: Tue, 3 Nov 2020 16:44:47 +0800 Message-Id: <20201103084447.20112-2-weix.xie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201103084447.20112-1-weix.xie@intel.com> References: <20201103084447.20112-1-weix.xie@intel.com> Subject: [dts] [PATCH V2 2/2] tests/TestSuite_kernelpf_iavf:modify script to fit new I40E driver 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, vf_add_pvid: remove vlan, the pkts with random vlan id 1-4095 shall not be received. vf_vlan_rx: remove vlan, the pkts with vlan 1 shall not be received. vf_vlan_strip: disable strip, the pkts with random vlan tag shall not be received. vf_vlan_filter: disable filter, the pkts with random vlan tag shall not be received. vf_vlan_promisc: disable filter and strip, the pkts with random 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