From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 1BAE11B94B for ; Fri, 11 Jan 2019 03:17:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 18:17:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,463,1539673200"; d="scan'208";a="107385365" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 10 Jan 2019 18:17:56 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 10 Jan 2019 18:17:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.85]) with mapi id 14.03.0415.000; Fri, 11 Jan 2019 10:17:55 +0800 From: "Tu, Lijuan" To: Phanendra Vukkisala , "dts@dpdk.org" CC: Vijaya Bhaskar Annayyolla , Faisal Masood Thread-Topic: [PATCH] max_lcores: Fix max lcore value consideration for cavium devices Thread-Index: AQHUqKU2UZJ8Xv6nWEOVgmGgp6MobaWpVmEg Date: Fri, 11 Jan 2019 02:17:54 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0B9FFEA9@SHSMSX101.ccr.corp.intel.com> References: <1547098045-8737-1-git-send-email-pvukkisala@marvell.com> In-Reply-To: <1547098045-8737-1-git-send-email-pvukkisala@marvell.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.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTA0NWQ0ZjktMjJiNy00YmJiLWE1OWYtM2JhMGJhZWFkYTUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNExXRmVLUG1jXC9BV1FrSk84STVRbVFmMTd2S2krQVpsb1NLaTVRNGVUeU9pMHJDU1h3N01LXC8xdU1UZWtuUXY2In0= 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] max_lcores: Fix max lcore value consideration for cavium devices 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: , X-List-Received-Date: Fri, 11 Jan 2019 02:17:58 -0000 Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Phanendra Vukkisala > Sent: Thursday, January 10, 2019 1:28 PM > To: dts@dpdk.org > Cc: Vijaya Bhaskar Annayyolla ; Faisal Masood > ; Phanendra Vukkisala > Subject: [dts] [PATCH] max_lcores: Fix max lcore value consideration for = cavium > devices >=20 > From: pvukkisala >=20 > Cavium devices have different number of cores on different boards, so lco= res > provided in configuration file may have more number of cores than cores > available on board. So taking which ever value is minimum to avoid failur= es. >=20 > Signed-off-by: phanendra,vukkisala > --- > tests/TestSuite_coremask.py | 2 +- > tests/TestSuite_hello_world.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py in= dex > 1eb9286..921dc31 100644 > --- a/tests/TestSuite_coremask.py > +++ b/tests/TestSuite_coremask.py > @@ -54,7 +54,7 @@ class TestCoremask(TestCase): > config_max_lcore =3D > self.dut.get_def_rte_config('CONFIG_RTE_MAX_LCORE') >=20 > if config_max_lcore: > - available_max_lcore =3D int(config_max_lcore) > + available_max_lcore =3D min(int(config_max_lcore), > + len(self.all_cores) + 1) > else: > available_max_lcore =3D len(self.all_cores) + 1 >=20 > diff --git a/tests/TestSuite_hello_world.py b/tests/TestSuite_hello_world= .py > index d199177..67095e8 100644 > --- a/tests/TestSuite_hello_world.py > +++ b/tests/TestSuite_hello_world.py > @@ -81,7 +81,7 @@ class TestHelloWorld(TestCase): >=20 > config_max_lcore =3D > self.dut.get_def_rte_config('CONFIG_RTE_MAX_LCORE') > if config_max_lcore: > - available_max_lcore =3D int(config_max_lcore) > + available_max_lcore =3D min(int(config_max_lcore), len(cores= ) > + + 1) > else: > available_max_lcore =3D len(cores) + 1 >=20 > -- > 1.7.9.5