test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework/dut: Create huge pages on DUT which do not have numa
@ 2019-01-03  9:46 Phanendra Vukkisala
  2019-01-07  8:46 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Phanendra Vukkisala @ 2019-01-03  9:46 UTC (permalink / raw)
  To: dts; +Cc: pvukkisala, Phanendra Vukkisala

From: pvukkisala <phanendra.vukkisala@caviumnetworks.com>

Some embedded devices may not have numa like 'VMs', adding support
for such devices.

Signed-off-by: phanendra,vukkisala <pvukkisala@marvell.com>
---
 framework/dut.py |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/framework/dut.py b/framework/dut.py
index a8116ff..e5740f9 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -307,6 +307,10 @@ class Dut(Crb):
         total_huge_pages = self.get_total_huge_pages()
         total_numa_nodes = self.send_expect("ls /sys/devices/system/node | grep node* | wc -l", "# ")
         numa_service_num = self.get_def_rte_config('CONFIG_RTE_MAX_NUMA_NODES')
+        try:
+            int(total_numa_nodes)
+        except ValueError:
+            total_numa_nodes = -1
         if numa_service_num is not None:
             numa = min(int(total_numa_nodes), int(numa_service_num))
         else:
@@ -340,6 +344,8 @@ class Dut(Crb):
                 else:
                     for numa_id in range(0, int(numa)):
                         self.set_huge_pages(arch_huge_pages, numa_id)
+                    if numa == -1:
+                        self.set_huge_pages(arch_huge_pages)
 
         self.mount_huge_pages()
         self.hugepage_path = self.strip_hugepage_path()
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-07  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  9:46 [dts] [PATCH] framework/dut: Create huge pages on DUT which do not have numa Phanendra Vukkisala
2019-01-07  8:46 ` 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).