From patchwork Thu Dec 16 16:54:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 105156 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 86713A00C3; Thu, 16 Dec 2021 09:51:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A89840696; Thu, 16 Dec 2021 09:51:46 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id C8D4440143 for ; Thu, 16 Dec 2021 09:51:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639644704; x=1671180704; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=x4cnYIaTn03qpyWgg28Ld+dKjs4CEoknc9WG/KK8e/w=; b=jgRSYQbR3hA68Ttj2S9GuTJwuGjH4aZ3YEB1ArWmjoApN/4OmMTAL0WA qbOPiAJDDiMSPB+VLP13yPzPxIuJ70MNSoXjpf8vYanmp8xH7Ta/c0kv0 GSSZ2h+PuCOvWLCyErW9vPj6Etd5T8r67F/y/anlUJ9u3S/8I1yUcvV5h +aarH0rI9ReMCEIu0NiceWZ8rUXh4Adxn9ZUni4OM/7VSEhWy1F1idv5i PRliwGvch8oCgLsCdjsdNNGh6kDKSdEcnxBifQmEuEMjJBradkRT9Ov/o sVp3zxdiAdLs0n/nQ5w4SzvUzophizUA1JnvOSLwmmByQWdGySbCOaF+r A==; X-IronPort-AV: E=McAfee;i="6200,9189,10199"; a="325720897" X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="325720897" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 00:51:25 -0800 X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="519161460" Received: from unknown (HELO dpdk.lan) ([10.240.183.77]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 00:51:21 -0800 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Subject: [dts][PATCH V1 1/2] tests/sriov_kvm: delete test cases Date: Thu, 16 Dec 2021 16:54:14 +0000 Message-Id: <20211216165415.18943-1-yanx.xia@intel.com> X-Mailer: git-send-email 2.33.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 delete test cases because dpdk removed related function dpdk commit-id: b225783dda ethdev: remove legacy mirroring API Signed-off-by: Yan Xia --- tests/TestSuite_sriov_kvm.py | 428 ----------------------------------- 1 file changed, 428 deletions(-) diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py index d9f239e3..64247def 100644 --- a/tests/TestSuite_sriov_kvm.py +++ b/tests/TestSuite_sriov_kvm.py @@ -438,73 +438,6 @@ class TestSriovKvm(TestCase): if not self.port_mirror_ref[port]: self.port_mirror_ref.pop(port) - def set_port_mirror_rule(self, port, mirror_name, rule_detail): - """ - Set the mirror rule for specified port. - """ - port = self.transform_integer(port) - - rule_id = self.make_port_new_ruleid(port) - - mirror_rule_cmd = "set port %d mirror-rule %d %s %s" % \ - (port, rule_id, mirror_name, rule_detail) - out = self.dut.send_expect("%s" % mirror_rule_cmd, "testpmd> ") - self.verify('Bad arguments' not in out, "Set port %d %s failed!" % - (port, mirror_name)) - - self.add_port_ruleid(port, rule_id) - return rule_id - - def set_port_pool_mirror(self, port, pool_mirror_rule): - """ - Set the pool mirror for specified port. - """ - return self.set_port_mirror_rule(port, 'pool-mirror-up', pool_mirror_rule) - - def set_port_vlan_mirror(self, port, vlan_mirror_rule): - """ - Set the vlan mirror for specified port. - """ - return self.set_port_mirror_rule(port, 'vlan-mirror', vlan_mirror_rule) - - def set_port_uplink_mirror(self, port, uplink_mirror_rule): - """ - Set the uplink mirror for specified port. - """ - return self.set_port_mirror_rule(port, 'uplink-mirror', uplink_mirror_rule) - - def set_port_downlink_mirror(self, port, downlink_mirror_rule): - """ - Set the downlink mirror for specified port. - """ - return self.set_port_mirror_rule(port, 'downlink-mirror', downlink_mirror_rule) - - def reset_port_mirror_rule(self, port, rule_id): - """ - Reset the pool mirror for specified port. - """ - port = self.transform_integer(port) - rule_id = self.transform_integer(rule_id) - - mirror_rule_cmd = "reset port %d mirror-rule %d" % (port, rule_id) - out = self.dut.send_expect("%s" % mirror_rule_cmd, "testpmd> ") - self.verify("Bad arguments" not in out, - "Reset port %d mirror rule failed!") - - self.remove_port_ruleid(port, rule_id) - - def reset_port_all_mirror_rule(self, port): - """ - Reset all mirror rules of specified port. - """ - port = self.transform_integer(port) - - if port not in list(self.port_mirror_ref.keys()): - pass - else: - for rule_id in self.port_mirror_ref[port][:]: - self.reset_port_mirror_rule(port, rule_id) - def setup_two_vm_common_prerequisite(self, fwd0="rxonly", fwd1="mac"): if self.setup_2vm_prerequisite_flag == 1: @@ -592,339 +525,6 @@ class TestSriovKvm(TestCase): ret_stats[key] = end_stats[key] - start_stats[key] return ret_stats - def test_two_vms_pool_up_mirrors(self): - """ - Test Case2: Mirror Traffic between 2VMs with Pool up mirroring - """ - port_id_0 = 0 - packet_num = 10 - - # set Pool up mirror rule - rule_id = self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on') - - # get vm1 port stats - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send 10 packets - self.send_packet( - self.vm_dut_0, self.vm0_dut_ports, port_id_0, count=packet_num) - - # get vm1 port stats - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - self.verify(vm1_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['TX-packets'] == packet_num, - "Pool up mirror failed between VM0 and VM1!") - - def test_two_vms_pool_down_mirrors(self): - """ - Test Case3: Mirror Traffic between 2VMs with Pool down mirroring - """ - port_id_0 = 0 - mirror_name = "pool-mirror-down" - packet_num = 32 - - # set up common 2VM prerequisites - self.setup_two_vm_common_prerequisite(fwd0="mac", fwd1="rxonly") - - # set Pool down mirror rule - rule_id = self.set_port_mirror_rule(port_id_0, mirror_name, '0x1 dst-pool 1 on') - - # get vm port stats - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - self.vm0_testpmd.execute_cmd('stop') - self.vm0_testpmd.execute_cmd('start tx_first') - - # get vm port stats - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] == vm0_ret_stats['TX-packets'] and vm1_ret_stats['RX-packets'] == packet_num, - "Pool down mirror failed between VM0 and VM1!") - - def test_two_vms_uplink_mirror(self): - """ - Test Case4: Mirror Traffic between 2VMs with Uplink mirroring - """ - port_id_0 = 0 - packet_num = 10 - - # set uplink mirror rule - rule_id = self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on') - - # get vm1 port stats - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - self.send_packet( - self.vm_dut_0, self.vm0_dut_ports, port_id_0, count=packet_num) - - # get vm1 port stats - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] >= packet_num and vm1_ret_stats['TX-packets'] >= packet_num, - "Uplink mirror failed between VM0 and VM1!") - - def test_two_vms_downlink_mirror(self): - """ - Test Case5: Mirror Traffic between 2VMs with Downlink mirroring - """ - port_id_0 = 0 - packet_num = 32 - - # set downlink mirror rule - rule_id = self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on') - - # set up common 2VM prerequisites - self.setup_two_vm_common_prerequisite(fwd0="mac", fwd1="rxonly") - - # get vms port stats - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - self.vm0_testpmd.execute_cmd('stop') - self.vm0_testpmd.execute_cmd('start tx_first') - - # get vms port stats - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] == vm0_ret_stats['TX-packets'] and vm1_ret_stats['RX-packets'] == packet_num, - "Downlink mirror failed between VM0 and VM1!") - - def test_two_vms_vlan_mirror(self): - """ - Test Case6: Mirror Traffic between 2VMs with Vlan mirroring - """ - port_id_0 = 0 - vlan_id = random.randint(1, 4095) - vf_mask = '0x1' - packet_num = 10 - - # set up common 2VM prerequisites - self.setup_two_vm_common_prerequisite(fwd0="mac", fwd1="rxonly") - - # add rx vlan on VF0 - self.host_testpmd.execute_cmd('rx_vlan add %d port %d vf %s' % (vlan_id, port_id_0, vf_mask)) - - # set vlan mirror rule - rule_id = self.set_port_vlan_mirror(port_id_0, '%d dst-pool 1 on' % vlan_id) - - # get vm port stats - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - ether_ip = {} - ether_ip['vlan'] = {'vlan': '%d' % vlan_id} - self.send_packet( - self.vm_dut_0, - self.vm0_dut_ports, - port_id_0, - count=packet_num, - **ether_ip) - - # get vm port stats - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # reset pf vlan - self.host_testpmd.execute_cmd('rx_vlan rm %d port %d vf %s' % (vlan_id, port_id_0, vf_mask)) - - # verify vm1 receive packets - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] == packet_num * 2, "Vlan mirror failed between VM0 and VM1!") - - def test_two_vms_vlan_and_pool_mirror(self): - self.setup_2vm_prerequisite_flag = 0 - self.vm0_testpmd.execute_cmd('vlan set strip on 0') - self.vm1_testpmd.execute_cmd('vlan set strip on 0') - port_id_0 = 0 - vlan_id = 3 - vf_mask = '0x2' - packet_num = 10 - - self.host_testpmd.execute_cmd( - 'rx_vlan add %d port %d vf %s' % (vlan_id, port_id_0, vf_mask)) - self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on') - self.set_port_vlan_mirror(port_id_0, '%d dst-pool 0 on' % vlan_id) - - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - self.send_packet( - self.vm_dut_0, - self.vm0_dut_ports, - port_id_0, - count=packet_num) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] == packet_num and - vm1_ret_stats['TX-packets'] == packet_num, - "Pool mirror failed between VM0 and VM1 when set vlan and pool mirror!") - - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - ether_ip = {} - ether_ip['vlan'] = {'vlan': '%d' % vlan_id} - self.send_packet( - self.vm_dut_1, - self.vm1_dut_ports, - port_id_0, - count=10 * - packet_num, - **ether_ip) - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - - self.host_testpmd.execute_cmd( - 'rx_vlan rm %d port %d vf %s' % (vlan_id, port_id_0, vf_mask)) - self.reset_port_all_mirror_rule(port_id_0) - self.verify(self.vm0_testpmd.check_tx_bytes(vm0_ret_stats['RX-packets'], 10 * packet_num), - "Vlan mirror failed between VM0 and VM1 when set vlan and pool mirror!") - - def test_two_vms_uplink_and_downlink_mirror(self): - """ - Test Case7: Mirror Traffic between 2VMs with up link mirroring & down link mirroring - """ - port_id_0 = 0 - packet_num = 10 - - # set up common 2VM prerequisites - self.setup_two_vm_common_prerequisite(fwd0="mac", fwd1="rxonly") - - # set mirror rule - self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on') - self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on') - - # get vm1 port stats - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - self.send_packet(self.vm_dut_0, self.vm0_dut_ports, port_id_0, count=packet_num) - - # get vm1 port stats - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - try: - self.verify(vm1_ret_stats['RX-packets'] == packet_num * 2, "failed") - except: - self.reset_port_all_mirror_rule(port_id_0) - raise ("Set uplink and downlink mirror failed!") - - def test_two_vms_vlan_and_pool_and_uplink_and_downlink(self): - """ - Test Case8: Mirror Traffic between 2VMs with Vlan & with up link mirroring & down link mirroring - """ - port_id_0 = 0 - vlan_id = random.randint(1, 4095) - vf_mask = '0x2' - packet_num = 1 - - # set up common 2VM prerequisites - self.setup_two_vm_common_prerequisite(fwd0="mac", fwd1="rxonly") - - # set mirror rule - self.set_port_pool_mirror(port_id_0, '0x1 dst-pool 1 on') - self.set_port_downlink_mirror(port_id_0, 'dst-pool 1 on') - - if self.nic.startswith('niantic') or self.nic.startswith('sage') or self.nic.startswith('twinpond'): - self.set_port_uplink_mirror(port_id_0, 'dst-pool 1 on') - - # get vm port stats - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - - # send packets - self.vm0_testpmd.execute_cmd('stop') - self.vm0_testpmd.execute_cmd('set fwd rxonly') - self.vm0_testpmd.execute_cmd('start tx_first') - - # get vm port stats - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - self.verify(vm1_ret_stats['RX-packets'] == vm0_ret_stats['TX-packets'], "uplink &downlink mirror failed between VM0 and VM1") - - # set vlan mirror rule - self.host_testpmd.execute_cmd("rx_vlan add %d port %d vf %s" % (vlan_id, port_id_0, vf_mask)) - self.set_port_vlan_mirror(port_id_0, '%d dst-pool 0 on' % vlan_id) - - # get vm port stats - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # send packets - ether_ip = {} - ether_ip['vlan'] = {'vlan': '%d' % vlan_id} - self.send_packet( - self.vm_dut_1, - self.vm1_dut_ports, - port_id_0, - count=packet_num, - **ether_ip) - # get vm port stats - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # verify vm1 receive packets - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - - try: - if self.nic.startswith('niantic') or self.nic.startswith('sage') or self.nic.startswith('twinpond'): - self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num, - "vlan mirror failed between VM0 and VM1") - else: - self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == 2 * packet_num, - "vlan&downlink mirror failed between VM0 and VM1") - except: - self.host_testpmd.execute_cmd("rx_vlan rm %d port %d vf %s" % (vlan_id, port_id_0, vf_mask)) - raise ("vlan mirror or downlink mirror failed between VM0 and VM1") - - # get vm port stats - vm0_start_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_start_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - # send packets - self.send_packet( - self.vm_dut_0, - self.vm0_dut_ports, - port_id_0, - count=packet_num) - # get vm port stats - vm0_end_stats = self.vm0_testpmd.get_pmd_stats(port_id_0) - vm1_end_stats = self.vm1_testpmd.get_pmd_stats(port_id_0) - - # reset pf vlan - self.host_testpmd.execute_cmd("rx_vlan rm %d port %d vf %s" % (vlan_id, port_id_0, vf_mask)) - - # verify vm1 receive packets - vm0_ret_stats = self.calculate_stats(vm0_start_stats, vm0_end_stats) - vm1_ret_stats = self.calculate_stats(vm1_start_stats, vm1_end_stats) - self.verify(vm0_ret_stats['RX-packets'] == packet_num and vm1_ret_stats['RX-packets'] == packet_num, - "uplink mirror failed between VM0 and VM1") - def test_two_vms_add_multi_exact_mac_on_vf(self): port_id_0 = 0 vf_num = 0 @@ -1182,36 +782,8 @@ class TestSriovKvm(TestCase): "Disable RX broadcast failed between VM0 and VM1 " + "when enable or pause TX queues on VF!") - def test_two_vms_negative_input_commands(self): - for command in ["set port 0 vf 65 tx on", - "set port 2 vf -1 tx off", - "set port 0 vf 0 rx oneee", - "set port 0 vf 0 rx offdd", - "set port 0 vf 64 rxmode BAM on", - "set port 0 vf 64 rxmode BAM off", - "set port 0 uta 00:11:22:33:44 on", - "set port 7 uta 00:55:44:33:22:11 off", - "set port 0 vf 34 rxmode ROPE on", - "mac_addr add port 0 vf 65 00:55:44:33:22:11", - "mac_addr add port 5 vf 0 00:55:44:88:22:11", - "set port 0 mirror-rule 256 uplink-mirror dst-pool 1 on", - "set port 0 mirror-rule 0 downlink-mirror 0xf dst-pool 2 off", - "reset port 0 mirror-rule 4", - "reset port 0xff mirror-rule 0"]: - output = self.host_testpmd.execute_cmd(command) - error = False - - for error_regx in [r'Bad', r'bad', r'failed', r'-[0-9]+', r'error', r'Invalid']: - ret_regx = re.search(error_regx, output) - if ret_regx and ret_regx.group(): - error = True - break - self.verify( - error, "Execute command '%s' successfully, it should be failed!" % command) - def tear_down(self): port_id_0 = 0 - self.reset_port_all_mirror_rule(port_id_0) self.vm0_testpmd.execute_cmd('clear port stats all') self.vm1_testpmd.execute_cmd('clear port stats all') self.vm0_testpmd.execute_cmd('stop') From patchwork Thu Dec 16 16:54:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Xia X-Patchwork-Id: 105157 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 4EF07A00C3; Thu, 16 Dec 2021 09:51:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E7F2410FA; Thu, 16 Dec 2021 09:51:49 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 85B0E40143 for ; Thu, 16 Dec 2021 09:51:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639644707; x=1671180707; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f+IRfpJUs6fRMYsO0IdqfdJ2wrZqDN5qoECs5eK2g9U=; b=m4mYtUyFzsEb8YTlg9DXblTC2WV0GholWeGUOr/py6oVltTwWcV6EIeL F9joduVPa8msCPidackNNoMSgH0uanyh0Y7UGXbhxVIHwIXn/JtETe5sW X3TwBOxUzjudVnObO43CiHT6fa4/ZSqu4UINBl7T0wjW0r/8RJzBl6inf Gam4mjf1+GXieVlOVgawAerFHWPVpaqnwWt1WYj7yp8RcBxFK4zbzgpNZ ESRIOhJQUX60qCHvbqeFh9LoGuAJv5zxVzYUKMDtXsnCKIAnw3vDlFwfo A8JJiX2yW9FUj/Hc2duNo/vOFmX665hqobdstjwmrfj9WCxLQpOq5KB3L g==; X-IronPort-AV: E=McAfee;i="6200,9189,10199"; a="238179516" X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="238179516" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 00:51:46 -0800 X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="519161545" Received: from unknown (HELO dpdk.lan) ([10.240.183.77]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 00:51:41 -0800 From: Yan Xia To: dts@dpdk.org Cc: Yan Xia Subject: [dts][PATCH V1 2/2] test_plans/sriov_kvm: delete test cases Date: Thu, 16 Dec 2021 16:54:15 +0000 Message-Id: <20211216165415.18943-2-yanx.xia@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211216165415.18943-1-yanx.xia@intel.com> References: <20211216165415.18943-1-yanx.xia@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 delete test cases because dpdk removed related function dpdk commit-id: b225783dda ethdev: remove legacy mirroring API Signed-off-by: Yan Xia --- test_plans/sriov_kvm_test_plan.rst | 490 ----------------------------- 1 file changed, 490 deletions(-) diff --git a/test_plans/sriov_kvm_test_plan.rst b/test_plans/sriov_kvm_test_plan.rst index 1b84f780..9b84ac4c 100644 --- a/test_plans/sriov_kvm_test_plan.rst +++ b/test_plans/sriov_kvm_test_plan.rst @@ -134,224 +134,6 @@ will be forwarded to VF1 and then send out:: Send 10 packets with VF0 mac address and make sure the packets will be forwarded by VF1. -Test Case2: Mirror Traffic between 2VMs with Pool up mirroring -============================================================== - -Set up common 2VM prerequisites. - -Add one mirror rule that will mirror VM0 income traffic to VM1:: - - PF testpmd-> set port 0 mirror-rule 0 pool-mirror-up 0x1 dst-pool 1 on - -Send 10 packets to VM0 and verify the packets has been mirrored to VM1 and -forwarded the packet. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Test Case3: Mirror Traffic between 2VMs with Pool down mirroring(Niantic not support) -===================================================================================== - -Set up common 2VM prerequisites. - -Add one mirror rule that will mirror VM0 outcome traffic to VM1:: - - PF testpmd-> set port 0 mirror-rule 0 pool-mirror-down 0x1 dst-pool 1 on - -Make sure VM1 in receive only mode, VM0 send 32 packets, and verify the VM0 -packets has been mirrored to VM1:: - - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF0 testpmd-> start tx_first - -Note: don't let VF1 fwd packets since downlink mirror will mirror back the -packets to received packets, which will be an infinite loop. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Test Case4: Mirror Traffic between 2VMs with Uplink mirroring -============================================================= - -Set up common 2VM prerequisites. - -Add one mirror rule that will mirror VM0 income traffic to VM1:: - - PF testpmd-> set port 0 mirror-rule 0 uplink-mirror dst-pool 1 on - -Send 10 packets to VM0 and verify the packets has been mirrored to VM1 and -forwarded the packet. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Test Case5: Mirror Traffic between 2VMs with Downlink mirroring -=============================================================== - -Run testpmd on VM0 and VM1 and start traffic forward on the VM hosts:: - - VF0 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - VF1 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - -Add one mirror rule that will mirror VM0 outcome traffic to VM1:: - - PF testpmd-> set port 0 mirror-rule 0 downlink-mirror dst-pool 1 on - -Make sure VM1 in receive only mode, VM0 send 32 packets, and verify the VM0 -packets has been mirrored to VM1:: - - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF0 testpmd-> start tx_first - -Note: don't let VF1 fwd packets since downlink mirror will mirror back the -packets to received packets, which will be an infinite loop. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Test Case6: Mirror Traffic between 2VMs with Vlan mirroring -=========================================================== - -Set up common 2VM prerequisites. - -Generate a random number N of 1-4095, Add rx vlan-id N on VF0, add one mirror rule -that will mirror VM0 income traffic with specified vlan to VM1:: - - PF testpmd-> rx_vlan add N port 0 vf 0x1 - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror n dst-pool 1 on - -Send 10 packets with vlan-id N and VM0 MAC to VM0 and verify the packets has been -mirrored to VM1 and forwarded the packet. - -Note: don't let VF1 fwd packets since vlan downlink mirror will mirror back the -packets to received packets, which will be an infinite loop. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Test Case7: Mirror Traffic between 2VMs with up link mirroring & down link mirroring -==================================================================================== - -Run testpmd on VM0 and VM1 and start traffic forward on the VM hosts:: - - VF0 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - VF1 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - -When mirroring only between two Vfs, pool up (or down) mirroring and up (or down) link mirroring lead -to the same behavior, so we randomly choose one way to mirror in both up and down directions. -up link mirroring as below: - - 1. Pool up mirroring (Case 2) - 2. Uplink port mirroring(Case 4) - -down link mirroring as below: - - 1. Pool down mirroring(Fortville only, Case 3) - 2. Downlink port mirroring(Case 5) - -And 2 mirror rules, one is randomly selected up link mirroring, one is randomly selected -down link mirroring(Niantic use Downlink port mirroring). The 2 mirror rules will mirroring -VM0 income and outcome traffic to VM1. - -Make sure VM1 in receive only mode, Send 10 packets to VF0 with VF0 MAC,verify that all VF0 -received packets and transmitted packets will mirror to VF1, VF1 will receive 20 packets:: - - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - -Note: don't let VF1 fwd packets since vlan downlink mirror will mirror back the -packets to received packets, which will be an infinite loop. - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case8: Mirror Traffic between 2VMs with Vlan & with up link mirroring & down link mirroring -================================================================================================ - -Run testpmd on VM0 and VM1 and start traffic forward on the VM hosts:: - - VF0 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - VF1 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i - -When mirroring only between two Vfs, pool up (or down) mirroring and up (or down) link mirroring lead -to the same behavior, so we randomly choose one way to mirror in both up and down directions. -up link mirroring as below: - - 1. Pool up mirroring (Case 2) - 2. Uplink port mirroring(Case 4) - -down link mirroring as below: - - 1. Pool down mirroring(Fortville only, Case 3) - 2. Downlink port mirroring(Case 5) - -And 2 mirror rules, one is randomly selected up link mirroring, one is randomly selected -down link mirroring(Niantic use Downlink port mirroring). The 2 mirror rules will mirroring -VM0 income and outcome traffic to VM1. - -Generate a random number N of 1-4095, Add rx vlan-id N and a mirror rule:: - - PF testpmd-> rx_vlan add N port 0 vf 0x2 - PF testpmd-> set port 0 mirror-rule 2 vlan-mirror N dst-pool 0 on - -Note: Because of Hardware limitation, downlink-mirror and pool-mirror-down cannot coexist, -uplink-mirror and pool-mirror-up cannot coexist in Fortville. - -Fortville: Make sure VM0 in receive only mode:: - - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - -Send 1 packet with VM1 vlan id N and mac, and verify that VF0 have 1 RX packet(vlan mirror), -and VF1 have 2 RX packets(RX and down link mirror). - -Send 1 packet to VF0 with VF0 MAC, check if VF0 RX 1 packet and TX 1 packet, -and VF1 has 1 packets mirror from VF0(uplink mirror) at least. - -Niantic add rules as below:: - - PF testpmd> set port 0 mirror-rule 0 pool-mirror-up 0x1 dst-pool 1 on - PF testpmd> rx_vlan add N port 0 vf 0x2 - PF testpmd> set port 0 mirror-rule 2 vlan-mirror N dst-pool 0 on - PF testpmd> set port 0 mirror-rule 1 downlink-mirror dst-pool 1 on - PF testpmd> set port 0 mirror-rule 3 uplink-mirror dst-pool 1 on - -Note: don't let VF0 fwd packets since downlink vlan mirror will mirror back the -packets to received packets, which will be an infinite loop. - -Make sure VM0 in receive only mode, VM0 first send 32 packets, and verify the -VM0 packets has been mirrored to VM1, VF1 RX 32 packets (down link mirror):: - - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF0 testpmd-> set fwd rxonly - VF0 testpmd-> start tx_first - -Send 1 packet with VM1 vlan id N and mac, and verify that VF0 have 1 RX packet(vlan mirror). - -Send 1 packet to VF0 with VF0 MAC, check if VF0 RX 1 packet and TX 1 packet, -and VF1 has 2 packets mirror from VF0(up link mirror). - -After test need reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - PF testpmd-> reset port 0 mirror-rule 2 - PF testpmd-> reset port 0 mirror-rule 3 - Test Case9: Add Multi exact MAC address on VF ============================================= @@ -477,30 +259,6 @@ VF0 will receive and forward the packet:: Repeat the off/on twice to check the switch capability, and ensure on/off can work stable. -Test Case16: Negative input to commands -======================================= - -Input invalid commands on PF/VF to make sure the commands can't work:: - - 1. PF testpmd-> set port 0 vf 65 tx on - 2. PF testpmd-> set port 2 vf -1 tx off - 3. PF testpmd-> set port 0 vf 0 rx oneee - 4. PF testpmd-> set port 0 vf 0 rx offdd - 5. PF testpmd-> set port 0 vf 0 rx oneee - 6. PF testpmd-> set port 0 vf 64 rxmode BAM on - 7. PF testpmd-> set port 0 vf 64 rxmode BAM off - 8. PF testpmd-> set port 0 uta 00:11:22:33:44 on - 9. PF testpmd-> set port 7 uta 00:55:44:33:22:11 off - 10. PF testpmd-> set port 0 vf 34 rxmode ROPE on - 11. PF testpmd-> mac_addr add port 0 vf 65 00:55:44:33:22:11 - 12. PF testpmd-> mac_addr add port 5 vf 0 00:55:44:88:22:11 - 13. PF testpmd-> set port 0 mirror-rule 0 pool-mirror 65 dst-pool 1 on - 14. PF testpmd-> set port 0 mirror-rule 0xf uplink-mirror dst-pool 1 on - 15. PF testpmd-> set port 0 mirror-rule 2 vlan-mirror 9 dst-pool 1 on - 16. PF testpmd-> set port 0 mirror-rule 0 downlink-mirror 0xf dst-pool 2 off - 17. PF testpmd-> reset port 0 mirror-rule 4 - 18. PF testpmd-> reset port 0xff mirror-rule 0 - Prerequisites for Scaling 4VFs per 1PF ====================================== @@ -521,254 +279,6 @@ are set up in each case:: VF2 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i VF3 ./x86_64-default-linuxapp-gcc/app/testpmd -c f -n 4 -- -i -Test Case17: Scaling Pool Mirror on 4VFs -======================================== - -Make sure prerequisites for Scaling 4VFs per 1PF is set up. - -Add one mirror rules that will mirror VM0/VM1/VM2 income traffic to VM3:: - - PF testpmd-> set port 0 mirror-rule 0 pool-mirror 0x7 dst-pool 3 on - VF0 testpmd-> set fwd rxonly - VF0 testpmd-> start - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF2 testpmd-> set fwd rxonly - VF2 testpmd-> start - VF3 testpmd-> set fwd rxonly - VF3 testpmd-> start - -Send 3 flows to VM0/VM1/VM2, one with VM0 mac, one with VM1 mac, one with VM2 -mac, and verify the packets has been mirrored to VM3. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Set another 2 mirror rules. VM0/VM1 income traffic mirror to VM2 and VM3:: - - PF testpmd-> set port 0 mirror-rule 0 pool-mirror 0x3 dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 pool-mirror 0x3 dst-pool 3 on - -Send 2 flows to VM0/VM1, one with VM0 mac, one with VM1 mac and verify the -packets has been mirrored to VM2/VM3 and VM2/VM3 have forwarded these packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case18: Scaling Uplink Mirror on 4VFs -========================================== - -Make sure prerequisites for Scaling 4VFs per 1PF is set up. - -Add one mirror rules that will mirror all income traffic to VM2 and VM3:: - - PF testpmd-> set port 0 mirror-rule 0 uplink-mirror dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 uplink-mirror dst-pool 3 on - VF0 testpmd-> set fwd rxonly - VF0 testpmd-> start - VF1 testpmd-> set fwd rxonly - VF1 testpmd-> start - VF2 testpmd-> set fwd rxonly - VF2 testpmd-> start - VF3 testpmd-> set fwd rxonly - VF3 testpmd-> start - -Send 4 flows to VM0/VM1/VM2/VM3, one packet with VM0 mac, one packet with VM1 -mac, one packet with VM2 mac, and one packet with VM3 mac and verify the -income packets has been mirrored to VM2 and VM3. Make sure VM2/VM3 will have 4 -packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case19: Scaling Downlink Mirror on 4VFs -============================================ - -Make sure prerequisites for scaling 4VFs per 1PF is set up. - -Add one mirror rules that will mirror all outcome traffic to VM2 and VM3:: - - PF testpmd-> set port 0 mirror-rule 0 downlink-mirror dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 downlink-mirror dst-pool 3 on - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd mac - VF1 testpmd-> start - VF2 testpmd-> set fwd rxonly - VF2 testpmd-> start - VF3 testpmd-> set fwd rxonly - VF3 testpmd-> start - -Send 2 flows to VM0/VM1, one with VM0 mac, one with VM1 mac, and verify VM0/VM1 -will forward these packets. And verify the VM0/VM1 outcome packets have been -mirrored to VM2 and VM3. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case20: Scaling Vlan Mirror on 4VFs -======================================== - -Make sure prerequisites for scaling 4VFs per 1PF is set up. - -Add 3 mirror rules that will mirror VM0/VM1/VM2 vlan income traffic to VM3:: - - PF testpmd-> rx_vlan add 1 port 0 vf 0x1 - PF testpmd-> rx_vlan add 2 port 0 vf 0x2 - PF testpmd-> rx_vlan add 3 port 0 vf 0x4 - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror 1,2,3 dst-pool 3 on - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd mac - VF1 testpmd-> start - VF2 testpmd-> set fwd mac - VF2 testpmd-> start - VF3 testpmd-> set fwd mac - VF3 testpmd-> start - -Send 3 flows to VM0/VM1/VM2, one with VM0 mac/vlanid, one with VM1 mac/vlanid, -one with VM2 mac/vlanid,and verify the packets has been mirrored to VM3 and -VM3 has forwards these packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - -Set another 2 mirror rules. VM0/VM1 income traffic mirror to VM2 and VM3:: - - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror 1 dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 vlan-mirror 2 dst-pool 3 on - -Send 2 flows to VM0/VM1, one with VM0 mac/vlanid, one with VM1 mac/vlanid and -verify the packets has been mirrored to VM2 and VM3, then VM2 and VM3 have -forwarded these packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case21: Scaling Vlan Mirror & Pool Mirror on 4VFs -====================================================== - -Make sure prerequisites for scaling 4VFs per 1PF is set up. - -Add 3 mirror rules that will mirror VM0/VM1 vlan income traffic to VM2, VM0/VM1 -pool will come to VM3:: - - PF testpmd-> rx_vlan add 1 port 0 vf 0x1 - PF testpmd-> rx_vlan add 2 port 0 vf 0x2 - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror 1 dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 vlan-mirror 2 dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 2 pool-mirror 0x3 dst-pool 3 on - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd mac - VF1 testpmd-> start - VF2 testpmd-> set fwd mac - VF2 testpmd-> start - VF3 testpmd-> set fwd mac - VF3 testpmd-> start - -Send 2 flows to VM0/VM1, one with VM0 mac/vlanid, one with VM1 mac/vlanid, and -verify the packets has been mirrored to VM2 and VM3, and VM2/VM3 have -forwarded these packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - PF testpmd-> reset port 0 mirror-rule 2 - -Set 3 mirror rules. VM0/VM1 income traffic mirror to VM2, VM2 traffic will -mirror to VM3:: - - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror 1,2 dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 2 pool-mirror 0x2 dst-pool 3 on - -Send 2 flows to VM0/VM1, one with VM0 mac/vlanid, one with VM1 mac/vlanid and -verify the packets has been mirrored to VM2, VM2 traffic will be mirrored to -VM3, then VM2 and VM3 have forwarded these packets. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - PF testpmd-> reset port 0 mirror-rule 2 - -Test Case22: Scaling Uplink Mirror & Downlink Mirror on 4VFs -============================================================ - -Make sure prerequisites for scaling 4VFs per 1PF is set up. - -Add 2 mirror rules that will mirror all income traffic to VM2, all outcome -traffic to VM3. Make sure VM2 and VM3 rxonly:: - - PF testpmd-> set port 0 mirror-rule 0 uplink-mirror dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 1 downlink-mirror dst-pool 3 on - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd mac - VF1 testpmd-> start - VF2 testpmd-> set fwd rxonly - VF2 testpmd-> start - VF3 testpmd-> set fwd rxonly - VF3 testpmd-> start - -Send 2 flows to VM0/VM1, one with VM0 mac, one with VM1 mac and make sure -VM0/VM1 will forward packets. Verify the income packets have been mirrored to -VM2, the outcome packets has been mirrored to VM3. - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - -Test Case23: Scaling Pool & Vlan & Uplink & Downlink Mirror on 4VFs -=================================================================== - -Make sure prerequisites for scaling 4VFs per 1PF is set up. - -Add mirror rules that VM0 vlan mirror to VM1, all income traffic mirror to VM2, -all outcome traffic mirror to VM3, all VM1 traffic will mirror to VM0. Make -sure VM2 and VM3 rxonly:: - - PF testpmd-> rx_vlan add 1 port 0 vf 0x1 - PF testpmd-> set port 0 mirror-rule 0 vlan-mirror 1 dst-pool 1 on - PF testpmd-> set port 0 mirror-rule 1 pool-mirror 0x2 dst-pool 0 on - PF testpmd-> set port 0 mirror-rule 2 uplink-mirror dst-pool 2 on - PF testpmd-> set port 0 mirror-rule 3 downlink-mirror dst-pool 3 on - VF0 testpmd-> set fwd mac - VF0 testpmd-> start - VF1 testpmd-> set fwd mac - VF1 testpmd-> start - VF2 testpmd-> set fwd rxonly - VF2 testpmd-> start - VF3 testpmd-> set fwd rxonly - VF3 testpmd-> start - -Send 10 packets to VM0 with VM0 mac/vlanid, verify that VM1 will be mirrored -and packets will be forwarded, VM2 will have all income traffic mirrored, VM3 -will have all outcome traffic mirrored - -Send 10 packets to VM1 with VM1 mac, verify that VM0 will be mirrored and -packets will be forwarded, VM2 will have all income traffic mirrored; VM3 will -have all outcome traffic mirrored - -Reset mirror rule:: - - PF testpmd-> reset port 0 mirror-rule 0 - PF testpmd-> reset port 0 mirror-rule 1 - PF testpmd-> reset port 0 mirror-rule 2 - PF testpmd-> reset port 0 mirror-rule 3 - Test Case24: Scaling InterVM communication on 4VFs ==================================================