* [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium devices
@ 2019-01-10 5:27 Phanendra Vukkisala
2019-01-11 2:17 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: Phanendra Vukkisala @ 2019-01-10 5:27 UTC (permalink / raw)
To: dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood, Phanendra Vukkisala
From: pvukkisala <pvukkisala@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium devices
2019-01-10 5:27 [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium devices Phanendra Vukkisala
@ 2019-01-11 2:17 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-01-11 2:17 UTC (permalink / raw)
To: Phanendra Vukkisala, dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood
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 <avijay@marvell.com>; Faisal Masood
> <fmasood@marvell.com>; Phanendra Vukkisala <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium
> devices
>
> From: pvukkisala <pvukkisala@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-11 2:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 5:27 [dts] [PATCH] max_lcores: Fix max lcore value consideration for cavium devices Phanendra Vukkisala
2019-01-11 2:17 ` Tu, Lijuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).