From: Phanendra Vukkisala <pvukkisala@marvell.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Cc: pvukkisala <phanendra.vukkisala@caviumnetworks.com>,
Phanendra Vukkisala <pvukkisala@marvell.com>
Subject: [dts] [PATCH] framework/dut: Create huge pages on DUT which do not have numa
Date: Thu, 3 Jan 2019 09:46:19 +0000 [thread overview]
Message-ID: <1546508734-14418-1-git-send-email-pvukkisala@marvell.com> (raw)
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
next reply other threads:[~2019-01-03 9:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 9:46 Phanendra Vukkisala [this message]
2019-01-07 8:46 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546508734-14418-1-git-send-email-pvukkisala@marvell.com \
--to=pvukkisala@marvell.com \
--cc=dts@dpdk.org \
--cc=phanendra.vukkisala@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).