From patchwork Mon Jan 25 08:44:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yufen.Mo" X-Patchwork-Id: 87201 X-Patchwork-Delegate: lijuan.tu@intel.com 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 7550DA0A0E; Mon, 25 Jan 2021 09:52:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F6B1140E48; Mon, 25 Jan 2021 09:52:02 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 9AAC0140E32 for ; Mon, 25 Jan 2021 09:52:00 +0100 (CET) IronPort-SDR: L2/CqgBuQpCwT6RpV8S3k3wotqz+d4mGk0v1fvbAxgDUs5jz+aem4LUGXaKUIe60FP7iMUBoj5 rCnVcQ5q1Z3A== X-IronPort-AV: E=McAfee;i="6000,8403,9874"; a="167366484" X-IronPort-AV: E=Sophos;i="5.79,373,1602572400"; d="scan'208";a="167366484" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2021 00:51:58 -0800 IronPort-SDR: LOblr7K9ndtwszPU/ylznDPj8VFuut4h+60/AaNYtH1px96Y19o/EwBTyqT/y5M+TpmeRrECZv q8W6F1ZpIbbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,373,1602572400"; d="scan'208";a="471978609" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by fmsmga001.fm.intel.com with ESMTP; 25 Jan 2021 00:51:57 -0800 From: yufengmx To: dts@dpdk.org, lijuan.tu@intel.com Cc: yufengmx Date: Mon, 25 Jan 2021 16:44:12 +0800 Message-Id: <20210125084414.8503-26-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210125084414.8503-1-yufengx.mo@intel.com> References: <20210125084414.8503-1-yufengx.mo@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V1 25/27] tests/l3fwd: update script 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 Sender: "dts" update perf testing enum parameters and methods name. Signed-off-by: yufengmx --- tests/TestSuite_l3fwd.py | 45 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index f82d0b69..4efcca09 100644 --- a/tests/TestSuite_l3fwd.py +++ b/tests/TestSuite_l3fwd.py @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2020 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2021 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,12 +33,11 @@ DPDK Test suite. Layer-3 forwarding test script. """ - from test_case import TestCase -from l3fwd_base import L3fwdBase, LPM, EM, L3_IPV6, L3_IPV4 +from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE -class TestL3fwd(TestCase, L3fwdBase): +class TestL3fwd(TestCase, PerfTestBase): # # Test cases. @@ -59,9 +58,9 @@ class TestL3fwd(TestCase, L3fwdBase): cores = self.dut.get_core_list("1S/8C/1T", socket=socket) self.verify(cores is not None, "Insufficient cores for speed testing") # init l3fwd common base class parameters - self.l3fwd_init(valports, socket) + PerfTestBase.__init__(self, valports, socket) # preset testing environment - self.l3fwd_preset_test_environment(self.get_suite_cfg()) + self.perf_preset_test_environment(self.get_suite_cfg()) def tear_down_all(self): """ @@ -80,36 +79,36 @@ class TestL3fwd(TestCase, L3fwdBase): Run after each test case. """ self.dut.kill_all() - self.l3fwd_reset_cur_case() + self.perf_reset_cur_case() def test_perf_rfc2544_ipv4_lpm(self): - self.l3fwd_set_cur_case('test_perf_rfc2544_ipv4_lpm') - self.qt_rfc2544(l3_proto=L3_IPV4, mode=LPM) + self.perf_set_cur_case('test_perf_rfc2544_ipv4_lpm') + self.qt_rfc2544(l3_proto=IP_TYPE.V4, mode=MATCH_MODE.LPM) def test_perf_rfc2544_ipv4_em(self): - self.l3fwd_set_cur_case('test_perf_rfc2544_ipv4_em') - self.qt_rfc2544(l3_proto=L3_IPV4, mode=EM) + self.perf_set_cur_case('test_perf_rfc2544_ipv4_em') + self.qt_rfc2544(l3_proto=IP_TYPE.V4, mode=MATCH_MODE.EM) def test_perf_throughput_ipv4_lpm(self): - self.l3fwd_set_cur_case('test_perf_throughput_ipv4_lpm') - self.ms_throughput(l3_proto=L3_IPV4, mode=LPM) + self.perf_set_cur_case('test_perf_throughput_ipv4_lpm') + self.ms_throughput(l3_proto=IP_TYPE.V4, mode=MATCH_MODE.LPM) def test_perf_throughput_ipv4_em(self): - self.l3fwd_set_cur_case('test_perf_throughput_ipv4_em') - self.ms_throughput(l3_proto=L3_IPV4, mode=EM) + self.perf_set_cur_case('test_perf_throughput_ipv4_em') + self.ms_throughput(l3_proto=IP_TYPE.V4, mode=MATCH_MODE.EM) def test_perf_rfc2544_ipv6_lpm(self): - self.l3fwd_set_cur_case('test_perf_rfc2544_ipv6_lpm') - self.qt_rfc2544(l3_proto=L3_IPV6, mode=LPM) + self.perf_set_cur_case('test_perf_rfc2544_ipv6_lpm') + self.qt_rfc2544(l3_proto=IP_TYPE.V6, mode=MATCH_MODE.LPM) def test_perf_rfc2544_ipv6_em(self): - self.l3fwd_set_cur_case('test_perf_rfc2544_ipv6_em') - self.qt_rfc2544(l3_proto=L3_IPV6, mode=EM) + self.perf_set_cur_case('test_perf_rfc2544_ipv6_em') + self.qt_rfc2544(l3_proto=IP_TYPE.V6, mode=MATCH_MODE.EM) def test_perf_throughput_ipv6_lpm(self): - self.l3fwd_set_cur_case('test_perf_throughput_ipv6_lpm') - self.ms_throughput(l3_proto=L3_IPV6, mode=LPM) + self.perf_set_cur_case('test_perf_throughput_ipv6_lpm') + self.ms_throughput(l3_proto=IP_TYPE.V6, mode=MATCH_MODE.LPM) def test_perf_throughput_ipv6_em(self): - self.l3fwd_set_cur_case('test_perf_throughput_ipv6_em') - self.ms_throughput(l3_proto=L3_IPV6, mode=EM) + self.perf_set_cur_case('test_perf_throughput_ipv6_em') + self.ms_throughput(l3_proto=IP_TYPE.V6, mode=MATCH_MODE.EM)