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 5830AA04A3; Mon, 4 Nov 2019 04:30:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 489021BE89; Mon, 4 Nov 2019 04:30:21 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 985621BE80 for ; Mon, 4 Nov 2019 04:30:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 19:30:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="195323122" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by orsmga008.jf.intel.com with ESMTP; 03 Nov 2019 19:30:17 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Mon, 4 Nov 2019 04:05:03 +0800 Message-Id: <1572811503-2122-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V2] tests/pvp_multi_paths: reduce running time by reducing start testpmd times 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" Signed-off-by: lihong --- tests/TestSuite_pvp_multi_paths_performance.py | 118 +++++++++--------- ...vp_multi_paths_vhost_single_core_performance.py | 132 +++++++++------------ ...p_multi_paths_virtio_single_core_performance.py | 118 +++++++++--------- 3 files changed, 169 insertions(+), 199 deletions(-) diff --git a/tests/TestSuite_pvp_multi_paths_performance.py b/tests/TestSuite_pvp_multi_paths_performance.py index 65c785a..fe6bd11 100644 --- a/tests/TestSuite_pvp_multi_paths_performance.py +++ b/tests/TestSuite_pvp_multi_paths_performance.py @@ -83,40 +83,41 @@ class TestPVPMultiPathPerformance(TestCase): self.table_header.append("% linerate") self.result_table_create(self.table_header) - def send_and_verify(self, case_info, frame_size): + def send_and_verify(self, case_info): """ Send packet with packet generator and verify """ - tgen_input = [] - for port in xrange(self.number_of_ports): - rx_port = self.tester.get_local_port( - self.dut_ports[port % self.number_of_ports]) - tx_port = self.tester.get_local_port( - self.dut_ports[(port) % self.number_of_ports]) - destination_mac = self.dut.get_mac_address( - self.dut_ports[(port) % self.number_of_ports]) + for frame_size in self.frame_sizes: + tgen_input = [] + for port in xrange(self.number_of_ports): + rx_port = self.tester.get_local_port( + self.dut_ports[port % self.number_of_ports]) + tx_port = self.tester.get_local_port( + self.dut_ports[(port) % self.number_of_ports]) + destination_mac = self.dut.get_mac_address( + self.dut_ports[(port) % self.number_of_ports]) - pkt = Packet(pkt_type='UDP', pkt_len=frame_size) - pkt.config_layer('ether', {'dst': '%s' % destination_mac}) - pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) - tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) + pkt = Packet(pkt_type='UDP', pkt_len=frame_size) + pkt.config_layer('ether', {'dst': '%s' % destination_mac}) + pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) + tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) - self.tester.pktgen.clear_streams() - streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) - # set traffic option - traffic_opt = {'delay': 5} - _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) - Mpps = pps / 1000000.0 - self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) + self.tester.pktgen.clear_streams() + streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) + # set traffic option + traffic_opt = {'delay': 5} + _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) + Mpps = pps / 1000000.0 + self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) - throughput = Mpps * 100 / \ - float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) + throughput = Mpps * 100 / \ + float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) - results_row = [frame_size] - results_row.append(case_info) - results_row.append(Mpps) - results_row.append(throughput) - self.result_table_add(results_row) + results_row = [frame_size] + results_row.append(case_info) + results_row.append(Mpps) + results_row.append(throughput) + self.result_table_add(results_row) def start_vhost_testpmd(self): """ @@ -172,11 +173,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "in_order=0,packed_vq=1,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1_mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1_mergeable on") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_virtio11_normal(self): @@ -185,11 +185,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "in_order=0,packed_vq=1,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1_normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1_normal") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_inorder_mergeable(self): @@ -198,11 +197,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable on") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_inorder_no_mergeable(self): @@ -211,11 +209,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable off", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable off") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_mergeable(self): @@ -224,11 +221,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virito mergeable", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virito mergeable") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_normal(self): @@ -237,11 +233,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virito normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virito normal") + self.close_all_testpmd() self.result_table_print() def test_perf_pvp_vector_rx(self): @@ -250,11 +245,10 @@ class TestPVPMultiPathPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0 "} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virito vector rx", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virito vector rx") + self.close_all_testpmd() self.result_table_print() def tear_down(self): diff --git a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py index 29d87c2..fbdb939 100644 --- a/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py +++ b/tests/TestSuite_pvp_multi_paths_vhost_single_core_performance.py @@ -79,40 +79,43 @@ class TestPVPMultiPathVhostPerformance(TestCase): self.table_header.append("Mpps") self.table_header.append("% linerate") self.result_table_create(self.table_header) + self.vhost_user = self.dut.new_session(suite="user") + self.vhost = self.dut.new_session(suite="vhost") - def send_and_verify(self, case_info, frame_size): + def send_and_verify(self, case_info): """ Send packet with packet generator and verify """ - tgen_input = [] - for port in xrange(self.number_of_ports): - rx_port = self.tester.get_local_port( - self.dut_ports[port % self.number_of_ports]) - tx_port = self.tester.get_local_port( - self.dut_ports[(port) % self.number_of_ports]) - destination_mac = self.dut.get_mac_address( - self.dut_ports[(port) % self.number_of_ports]) + for frame_size in self.frame_sizes: + tgen_input = [] + for port in xrange(self.number_of_ports): + rx_port = self.tester.get_local_port( + self.dut_ports[port % self.number_of_ports]) + tx_port = self.tester.get_local_port( + self.dut_ports[(port) % self.number_of_ports]) + destination_mac = self.dut.get_mac_address( + self.dut_ports[(port) % self.number_of_ports]) - pkt = Packet(pkt_type='UDP', pkt_len=frame_size) - pkt.config_layer('ether', {'dst': '%s' % destination_mac}) - pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) - tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) + pkt = Packet(pkt_type='UDP', pkt_len=frame_size) + pkt.config_layer('ether', {'dst': '%s' % destination_mac}) + pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) + tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) - self.tester.pktgen.clear_streams() - streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) - traffic_opt = {'delay': 5} - _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) - Mpps = pps / 1000000.0 - self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) + self.tester.pktgen.clear_streams() + streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) + traffic_opt = {'delay': 5} + _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) + Mpps = pps / 1000000.0 + self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) - throughput = Mpps * 100 / \ - float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) + throughput = Mpps * 100 / \ + float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) - results_row = [frame_size] - results_row.append(case_info) - results_row.append(Mpps) - results_row.append(throughput) - self.result_table_add(results_row) + results_row = [frame_size] + results_row.append(case_info) + results_row.append(Mpps) + results_row.append(throughput) + self.result_table_add(results_row) def start_vhost_testpmd(self): """ @@ -166,13 +169,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "in_order=0,packed_vq=1,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1_mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1_mergeable on") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -183,13 +183,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "in_order=0,packed_vq=1,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1 normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1 normal") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -199,13 +196,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable on") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -215,13 +209,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable off", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable off") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -231,13 +222,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("mergeable on") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -247,13 +235,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("normal") + self.close_all_testpmd() self.close_all_session() self.result_table_print() @@ -263,13 +248,10 @@ class TestPVPMultiPathVhostPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0"} - self.vhost_user = self.dut.new_session(suite="user") - self.vhost = self.dut.new_session(suite="vhost") - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("vector rx", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("vector rx") + self.close_all_testpmd() self.close_all_session() self.result_table_print() diff --git a/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py b/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py index e8807a7..8850b10 100644 --- a/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py +++ b/tests/TestSuite_pvp_multi_paths_virtio_single_core_performance.py @@ -83,41 +83,42 @@ class TestPVPMultiPathVirtioPerformance(TestCase): self.table_header.append("% linerate") self.result_table_create(self.table_header) - def send_and_verify(self, case_info, frame_size): + def send_and_verify(self, case_info): """ Send packet with packet generator and verify """ - tgen_input = [] - for port in xrange(self.number_of_ports): - rx_port = self.tester.get_local_port( - self.dut_ports[port % self.number_of_ports]) - tx_port = self.tester.get_local_port( - self.dut_ports[(port) % self.number_of_ports]) - destination_mac = self.dut.get_mac_address( - self.dut_ports[(port) % self.number_of_ports]) + for frame_size in self.frame_sizes: + tgen_input = [] + for port in xrange(self.number_of_ports): + rx_port = self.tester.get_local_port( + self.dut_ports[port % self.number_of_ports]) + tx_port = self.tester.get_local_port( + self.dut_ports[(port) % self.number_of_ports]) + destination_mac = self.dut.get_mac_address( + self.dut_ports[(port) % self.number_of_ports]) - pkt = Packet(pkt_type='UDP', pkt_len=frame_size) - pkt.config_layer('ether', {'dst': '%s' % destination_mac}) - pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) + pkt = Packet(pkt_type='UDP', pkt_len=frame_size) + pkt.config_layer('ether', {'dst': '%s' % destination_mac}) + pkt.save_pcapfile(self.tester, "%s/multi_path_%d.pcap" % (self.out_path, port)) - tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) + tgen_input.append((tx_port, rx_port, "%s/multi_path_%d.pcap" % (self.out_path, port))) - self.tester.pktgen.clear_streams() - streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) - # set traffic option - traffic_opt = {'delay': 5} - _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) - Mpps = pps / 1000000.0 - self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) + self.tester.pktgen.clear_streams() + streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, None, self.tester.pktgen) + # set traffic option + traffic_opt = {'delay': 5} + _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=traffic_opt) + Mpps = pps / 1000000.0 + self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) - throughput = Mpps * 100 / \ - float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) + throughput = Mpps * 100 / \ + float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) - results_row = [frame_size] - results_row.append(case_info) - results_row.append(Mpps) - results_row.append(throughput) - self.result_table_add(results_row) + results_row = [frame_size] + results_row.append(case_info) + results_row.append(Mpps) + results_row.append(throughput) + self.result_table_add(results_row) def start_vhost_testpmd(self): """ @@ -172,11 +173,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=1,in_order=0,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1_mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1_mergeable on") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_virtio11_normal(self): @@ -185,11 +185,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=1,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio_1.1_normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio_1.1_normal") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_inorder_mergeable(self): @@ -198,11 +197,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable on", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable on") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_inorder_no_mergeable(self): @@ -211,11 +209,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=1,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("inoder mergeable off", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("inoder mergeable off") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_mergeable(self): @@ -224,11 +221,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=1", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virito mergeable", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virito mergeable") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_normal(self): @@ -237,11 +233,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0 --enable-hw-vlan-strip"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virito normal", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virito normal") + self.close_all_testpmd() self.result_table_print() def test_perf_virtio_single_core_vector_rx(self): @@ -250,11 +245,10 @@ class TestPVPMultiPathVirtioPerformance(TestCase): """ virtio_pmd_arg = {"version": "packed_vq=0,in_order=0,mrg_rxbuf=0", "path": "--tx-offloads=0x0"} - for frame_size in self.frame_sizes: - self.start_vhost_testpmd() - self.start_virtio_testpmd(virtio_pmd_arg) - self.send_and_verify("virtio vector rx", frame_size) - self.close_all_testpmd() + self.start_vhost_testpmd() + self.start_virtio_testpmd(virtio_pmd_arg) + self.send_and_verify("virtio vector rx") + self.close_all_testpmd() self.result_table_print() def tear_down(self): -- 2.7.4