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 B794DA0567; Fri, 13 Mar 2020 07:38:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A53091BFA5; Fri, 13 Mar 2020 07:38:19 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 040002BE3 for ; Fri, 13 Mar 2020 07:38:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 23:38:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,547,1574150400"; d="scan'208";a="322707246" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 12 Mar 2020 23:38:17 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:38:17 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:38:17 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by shsmsx102.ccr.corp.intel.com ([169.254.2.50]) with mapi id 14.03.0439.000; Fri, 13 Mar 2020 14:38:14 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env Thread-Index: AQHV9sXklH25cNeev0agyFGbBm/f9ahGFl6g Date: Fri, 13 Mar 2020 06:38:14 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEC852@SHSMSX101.ccr.corp.intel.com> References: <1583835430-454738-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1583835430-454738-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores depends on env 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai > Sent: Tuesday, March 10, 2020 6:17 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1]tests/TestSuite_loopback_multi_queues: get cores > depends on env >=20 > *. get cores depends on env >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_loopback_multi_queues.py | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) >=20 > diff --git a/tests/TestSuite_loopback_multi_queues.py > b/tests/TestSuite_loopback_multi_queues.py > index daba71e..589bf06 100644 > --- a/tests/TestSuite_loopback_multi_queues.py > +++ b/tests/TestSuite_loopback_multi_queues.py > @@ -50,19 +50,16 @@ class TestLoopbackMultiQueues(TestCase): > """ > self.frame_sizes =3D [64, 128, 256, 512, 1024, 1518] > self.verify_queue =3D [1, 8] > - self.cores_num =3D len([n for n in self.dut.cores if int(n['sock= et']) =3D=3D 0]) > + self.dut_ports =3D self.dut.get_ports() > + port_socket =3D self.dut.get_numa_id(self.dut_ports[0]) > + self.core_list =3D self.dut.get_core_list(config=3D'all', socket= =3Dport_socket) > + self.cores_num =3D len(self.core_list) > self.logger.info("you can config packet_size in file %s.cfg," % > self.suite_name + \ > "in region 'suite' like packet_sizes=3D[64, 128,= 256]") > # get the frame_sizes from cfg file > if 'packet_sizes' in self.get_suite_cfg(): > self.frame_sizes =3D self.get_suite_cfg()['packet_sizes'] >=20 > - # set diff arg about mem_socket base on socket number > - if len(set([int(core['socket']) for core in self.dut.cores])) = =3D=3D 1: > - self.socket_mem =3D '1024' > - else: > - self.socket_mem =3D '1024,1024' > - > def set_up(self): > """ > Run before each test case. > @@ -81,13 +78,11 @@ class TestLoopbackMultiQueues(TestCase): > """ > get the coremask about vhost and virito depend on the queue numb= er > """ > - self.core_config =3D "1S/%dC/1T" % (2*self.nb_cores+2) > - self.verify(self.cores_num >=3D (2*self.nb_cores+2), > + self.verify(self.cores_num > (2*self.nb_cores + 2), > "There has not enought cores to test this case %= s" % > self.running_case) > - self.core_list =3D self.dut.get_core_list(self.core_config) > - self.core_list_user =3D self.core_list[0:self.nb_cores + 1] > - self.core_list_host =3D self.core_list[self.nb_cores + 1:2 * sel= f.nb_cores + 2] > + self.core_list_user =3D self.core_list[1:self.nb_cores + 2] > + self.core_list_host =3D self.core_list[self.nb_cores + 2:2 * sel= f.nb_cores + > 3] >=20 > def start_vhost_testpmd(self): > """ > -- > 1.8.3.1