[dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium devices
Tu, Lijuan
lijuan.tu at intel.com
Fri Jan 11 03:17:54 CET 2019
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Phanendra Vukkisala
> Sent: Thursday, January 10, 2019 1:28 PM
> To: dts at dpdk.org
> Cc: Vijaya Bhaskar Annayyolla <avijay at marvell.com>; Faisal Masood
> <fmasood at marvell.com>; Phanendra Vukkisala <pvukkisala at marvell.com>
> Subject: [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium
> devices
>
> From: pvukkisala <pvukkisala at marvell.com>
>
> Cavium devices have different number of cores on different boards, so lcores
> provided in configuration file may have more number of cores than cores
> available on board. So taking which ever value is minimum to avoid failures.
>
> Signed-off-by: phanendra,vukkisala <pvukkisala at marvell.com>
> ---
> tests/TestSuite_coremask.py | 2 +-
> tests/TestSuite_hello_world.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py index
> 1eb9286..921dc31 100644
> --- a/tests/TestSuite_coremask.py
> +++ b/tests/TestSuite_coremask.py
> @@ -54,7 +54,7 @@ class TestCoremask(TestCase):
> config_max_lcore =
> self.dut.get_def_rte_config('CONFIG_RTE_MAX_LCORE')
>
> if config_max_lcore:
> - available_max_lcore = int(config_max_lcore)
> + available_max_lcore = min(int(config_max_lcore),
> + len(self.all_cores) + 1)
> else:
> available_max_lcore = len(self.all_cores) + 1
>
> 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):
>
> config_max_lcore =
> self.dut.get_def_rte_config('CONFIG_RTE_MAX_LCORE')
> if config_max_lcore:
> - available_max_lcore = int(config_max_lcore)
> + available_max_lcore = min(int(config_max_lcore), len(cores)
> + + 1)
> else:
> available_max_lcore = len(cores) + 1
>
> --
> 1.7.9.5
More information about the dts
mailing list