From patchwork Thu Jun 9 07:07:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 112591 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 9AA15A0552; Thu, 9 Jun 2022 09:07:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 946B940689; Thu, 9 Jun 2022 09:07:46 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 03CB040220 for ; Thu, 9 Jun 2022 09:07:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654758465; x=1686294465; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ardu9EgNSfXqpZy1+jv+HeyOg96Q3vo1tboL04zJy9s=; b=GdtuInKGFG+AW7beMmccTslMcLIfh9ytVUPXnPANQrOc66Gv16PQIXcF mykXdE2XjYqqn6Mn1PiDvA1r+Aaf/zhs6PmGbPwznQKOqRiW6BiW9zJbx MJVrW6rRe6unKyNrqxFPImZJz0Zw8Xr7xWKIivEq3nSWGVDEeHRfULIBc 6p8aankekYs2yM3vGJjW0Wr1wfRQu7v8JaQLOb6DwWObcbF54sFE4Z1LU p7l0w9pxgZicje/3QV3FxB8DlTDAuLaidjT+OmV4d4HDF7LW2psWcwWnu xwg1h+qIYckEmTw1aO0MRD4+NSvBvXNUNeRIBGt9tPv3QmVMon4QyRxYB g==; X-IronPort-AV: E=McAfee;i="6400,9594,10372"; a="302544445" X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="302544445" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 00:07:44 -0700 X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="637311916" Received: from shwdenpg560.ccr.corp.intel.com ([10.239.251.200]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 00:07:42 -0700 From: "Li, WeiyuanX" To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 1/2] tests/kernelpf_iavf: remove 4 duplicated cases from kernelpf_iavf Date: Thu, 9 Jun 2022 15:07:29 +0800 Message-Id: <20220609070730.1769-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1.windows.1 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 From: Weiyuan Li Case vf_add_pvid/vf_vlan_rx are duplicated to vf_vlan suite, vf_hw_checksum_offload/vf_sw_checksum_offload are duplicated to vf_offload suite. So remove the four cases. Signed-off-by: Weiyuan Li --- tests/TestSuite_kernelpf_iavf.py | 127 ------------------------------- 1 file changed, 127 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index bb20e687..9191b268 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -350,64 +350,6 @@ class TestKernelpfIavf(TestCase): "vf receive pkt fail with broadcast mac", ) - def test_vf_add_pvid(self): - """ - vf can receive packet with right vlan id, can't receive wrong vlan id packet - """ - random_vlan = random.randint(1, MAX_VLAN) - self.dut.send_expect( - "ip link set %s vf 0 vlan %s" % (self.host_intf, random_vlan), "# " - ) - out = self.dut.send_expect("ip link show %s" % self.host_intf, "# ") - self.verify("vlan %d" % random_vlan in out, "Failed to add pvid on VF0") - - self.vm_testpmd.start_testpmd("all") - self.vm_testpmd.execute_cmd("set fwd mac") - self.vm_testpmd.execute_cmd("set verbose 1") - self.vm_testpmd.execute_cmd("start") - self.start_tcpdump(self.tester_intf) - out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - tcpdump_out = self.get_tcpdump_package() - self.verify(self.vf_mac in out, "testpmd can't receive packet") - receive_pkt = re.findall("vlan %s" % random_vlan, tcpdump_out) - self.verify(len(receive_pkt) == 2, "Failed to received vlan packet!!!") - wrong_vlan = (random_vlan + 1) % 4096 - self.start_tcpdump(self.tester_intf) - out = self.send_and_getout(vlan=wrong_vlan, pkt_type="VLAN_UDP") - tcpdump_out = self.get_tcpdump_package() - self.verify(self.vf_mac not in out, "received wrong vlan packet!!!") - receive_pkt = re.findall("vlan %s" % wrong_vlan, tcpdump_out) - self.verify(len(receive_pkt) == 1, "tester received wrong vlan packet!!!") - - # remove vlan - self.vm_testpmd.execute_cmd("stop") - self.vm_testpmd.execute_cmd("port stop all") - self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf, "# ") - out = self.dut.send_expect("ip link show %s" % self.host_intf, "# ") - self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0") - # send packet without vlan - self.vm_testpmd.execute_cmd("port reset 0") - self.vm_testpmd.execute_cmd("port start all") - self.vm_testpmd.execute_cmd("start") - out = self.send_and_getout(vlan=0, pkt_type="UDP") - self.verify(self.vf_mac in out, "Not received packet without vlan!!!") - - # send packet with vlan 0 - out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP") - self.verify(self.vf_mac in out, "Not recevied packet with vlan 0!!!") - - # send random vlan packet - self.start_tcpdump(self.tester_intf) - 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) - if self.kdriver == "i40e" and self.driver_version < "2.13.10": - 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"): if pkt_type == "UDP": @@ -423,58 +365,6 @@ class TestKernelpfIavf(TestCase): return out - def test_vf_vlan_rx(self): - self.vm_testpmd.start_testpmd("all") - self.vm_testpmd.execute_cmd("set fwd rxonly") - self.vm_testpmd.execute_cmd("set verbose 1") - self.vm_testpmd.execute_cmd("vlan set filter on 0") - self.vm_testpmd.execute_cmd("vlan set strip on 0") - self.vm_testpmd.execute_cmd("start") - # send packet without vlan, vf can receive packet - out = self.send_and_getout(pkt_type="UDP") - self.verify(self.vf_mac in out, "Failed to received without vlan packet!!!") - - # send packet vlan 0, vf can receive packet - out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP") - self.verify(self.vf_mac in out, "Failed to received vlan 0 packet!!!") - - self.vm_testpmd.execute_cmd("rx_vlan add 1 0") - - # send packet vlan 1, vf can receive packet - self.start_tcpdump(self.tester_intf) - out = self.send_and_getout(vlan=1, pkt_type="VLAN_UDP") - tcpdump_out = self.get_tcpdump_package() - receive_pkt = re.findall("vlan 1", tcpdump_out) - self.verify(len(receive_pkt) == 1, "Failed to received vlan packet!!!") - self.verify(self.vf_mac in out, "Failed to received vlan 1 packet!!!") - - # send random vlan packet, vf can not receive packet - random_vlan = random.randint(1, MAX_VLAN) - out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - self.verify(self.vf_mac not in out, "fail to vf receive pkt") - - # send max vlan 4095, vf can not receive packet - out = self.send_and_getout(vlan=MAX_VLAN, pkt_type="VLAN_UDP") - self.verify(self.vf_mac not in out, "received max vlan packet!!!") - - # remove vlan - self.vm_testpmd.execute_cmd("rx_vlan rm 1 0") - - # send packet without vlan, vf can receive packet - out = self.send_and_getout(pkt_type="UDP") - self.verify(self.vf_mac in out, "Failed to received without vlan packet!!!") - - # send packet vlan 0, vf can receive packet - out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP") - self.verify(self.vf_mac in out, "Failed to received vlan 0 packet!!!") - - # send vlan 1 packet, vf can receive packet - out = self.send_and_getout(vlan=1, pkt_type="VLAN_UDP") - if self.kdriver == "i40e" and self.driver_version < "2.13.10": - self.verify(self.vf_mac in out, "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") random_vlan = random.randint(1, MAX_VLAN) @@ -817,21 +707,6 @@ class TestKernelpfIavf(TestCase): self.verify(bad_ipcsum == 1, "Bad-ipcsum check error") self.verify(bad_l4csum == 2, "Bad-ipcsum check error") - def test_vf_hw_checksum_offload(self): - self.vm_testpmd.start_testpmd("all") - self.enable_hw_checksum() - self.vm_testpmd.execute_cmd("port start all") - self.vm_testpmd.execute_cmd("set verbose 1") - self.vm_testpmd.execute_cmd("start") - self.checksum_verify() - - def test_vf_sw_checksum_offload(self): - self.vm_testpmd.start_testpmd("all") - self.enable_sw_checksum() - self.vm_testpmd.execute_cmd("port start all") - self.vm_testpmd.execute_cmd("start") - self.checksum_verify() - def test_vf_tso(self): self.tester.send_expect( "ethtool -K %s rx off tx off tso off gso off gro off lro off" @@ -1122,8 +997,6 @@ class TestKernelpfIavf(TestCase): time.sleep(1) if self.running_case == "test_vf_mac_filter": self.destroy_vm_env() - if self.running_case == "test_vf_add_pvid": - self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf, "# ") self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ") def tear_down_all(self): From patchwork Thu Jun 9 07:07:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 112592 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 BA044A0553; Thu, 9 Jun 2022 09:07:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4234427EC; Thu, 9 Jun 2022 09:07:47 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 10E1640220 for ; Thu, 9 Jun 2022 09:07:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654758466; x=1686294466; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=I2Jkfjr9A9/CdavN1AmlPr167eGxPJm1Y6WiNJBHAn4=; b=CVOIf4ChuwErzwVww10cWo3Ti6X5PKfEC7RcxDEZaupHAbw70/GLdAK9 KxmSFDUx5BPbmM5bjHBiu9sNXvCTE54oouT1rdFTTJx2RJ6kqmAnQK7ai B7sldj6L0VCtqIGru/iT3VQvcDYi2RRh+Sqn0kjyC3haEjRFRhmUDHRgl XBW3A1X+yNPzOb8DBstSgIB7GV/PVLcw07S2dyTHKBf1GwNlV9q/AnvA/ PPUN29PtfK54uOtS0Xtu50lZ7nlTa5NZPHcVJ+9pBI75e8fqZAG4jwGGF 4WBuUxF8ufWPV+965dxqw8YC1no8OjXoYeeBH6fEhwHbW9PO/OhBrZGkz w==; X-IronPort-AV: E=McAfee;i="6400,9594,10372"; a="302544450" X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="302544450" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 00:07:45 -0700 X-IronPort-AV: E=Sophos;i="5.91,287,1647327600"; d="scan'208";a="637311924" Received: from shwdenpg560.ccr.corp.intel.com ([10.239.251.200]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 00:07:44 -0700 From: "Li, WeiyuanX" To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 2/2] test_plans/kernelpf_iavf: remove 4 duplicated cases from kernelpf_iavf Date: Thu, 9 Jun 2022 15:07:30 +0800 Message-Id: <20220609070730.1769-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220609070730.1769-1-weiyuanx.li@intel.com> References: <20220609070730.1769-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 From: Weiyuan Li Case vf_add_pvid/vf_vlan_rx are duplicated to vf_vlan suite, vf_hw_checksum_offload/vf_sw_checksum_offload are duplicated to vf_offload suite. So remove the four cases. Signed-off-by: Weiyuan Li --- test_plans/kernelpf_iavf_test_plan.rst | 116 ------------------------- 1 file changed, 116 deletions(-) diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst index 6f65a529..64261b67 100644 --- a/test_plans/kernelpf_iavf_test_plan.rst +++ b/test_plans/kernelpf_iavf_test_plan.rst @@ -188,73 +188,6 @@ Disable VF promisc mode:: Send packet with broadcast address ff:ff:ff:ff:ff:ff, and check VF can receive the packet - -Test case: add port based vlan on VF -==================================== -Add pvid on VF0 from PF device:: - - ip link set $PF_INTF vf 0 vlan 2 - -Send packet with same vlan id and check VF can receive - -Send packet with wrong vlan id and check VF can't receive - -Check PF device shows correct pvid setting:: - - ip link show $PF_INTF - ... - vf 0 MAC 00:01:23:45:67:89, vlan 2, spoof checking on, link-state auto - - -Test case: remove port based vlan on VF -======================================= -Remove added vlan from PF device:: - - ip link set $PF_INTF vf 0 vlan 0 - -Start testpmd and send packet without vlan and check VF can receive - -Set packet with vlan id 0 and check VF can receive - -Set packet with random id 1-4095 and check VF can receive - -Check PF device doesn't show pvid setting:: - - ip link show $PF_INTF - -Test case: VF tagged vlan RX -============================ - -Make sure port based vlan disabled on VF0 - -Start testpmd with rxonly mode:: - - testpmd> set fwd rxonly - testpmd> set verbose 1 - testpmd> start - -Send packet without vlan and check VF can receive - -Send packet with vlan 0 and check VF can receive - -Add vlan from VF driver:: - - testpmd> rx_vlan add 1 0 - -Send packet with vlan 1 and check VF can receive - -Rerun above with random vlan and max vlan 4095, check VF can't receive - -Remove vlan on VF0:: - - testpmd> rx_vlan rm 1 0 - -Send packet with vlan 0 and check VF can receive - -Send packet without vlan and check VF can receive - -Send packet with vlan 1 and check VF can receive - Test case: VF vlan insertion ============================ @@ -426,55 +359,6 @@ Send ipv4 packets, check RSS hash value is different:: p=Ether(dst="56:0A:EC:50:A4:28")/IP(src="1.2.3.4")/Raw(load='X'*30) - -Test case: VF HW checksum offload -================================= - -Enable HW checksum, set csum forward:: - - testpmd> port stop all - testpmd> csum set ip hw 0 - testpmd> csum set udp hw 0 - testpmd> csum set tcp hw 0 - testpmd> csum set sctp hw 0 - testpmd> set fwd csum - testpmd> set verbose 1 - testpmd> port start all - testpmd> start - -Send packets with incorrect checksum to vf port, verify that the packets -can be received by VF port and checksum error reported, -the packets forwarded by VF port have the correct checksum value:: - - p=Ether()/IP(chksum=0x1234)/UDP()/Raw(load='X'*20) - p=Ether()/IP()/TCP(chksum=0x1234)/Raw(load='X'*20) - p=Ether()/IP()/UDP(chksum=0x1234)/Raw(load='X'*20) - - -Test case: VF SW checksum offload -================================= - -Enable SW checksum, set csum forward:: - - testpmd> port stop all - testpmd> csum set ip sw 0 - testpmd> csum set udp sw 0 - testpmd> csum set tcp sw 0 - testpmd> csum set sctp sw 0 - testpmd> set fwd csum - testpmd> set verbose 1 - testpmd> port start all - testpmd> start - -Send packets with incorrect checksum to vf port, verify that the packets -can be received by VF port and checksum error reported, the packets -forwarded by VF port have the correct checksum value:: - - p=Ether()/IP(chksum=0x1234)/UDP()/Raw(load='X'*20) - p=Ether()/IP()/TCP(chksum=0x1234)/Raw(load='X'*20) - p=Ether()/IP()/UDP(chksum=0x1234)/Raw(load='X'*20) - - Test case: VF TSO ================= Turn off all hardware offloads on tester machine::