Re: [dpdk-dev] [v3 PATCH] usertools: show an error message if unable to reserve requested hugepages
From: Thomas Monjalon <hidden>
Date: 2021-02-05 18:24:16
From: Thomas Monjalon <hidden>
Date: 2021-02-05 18:24:16
08/01/2021 10:06, Sarosh Arif:
Sometimes the system is unable to reserve the requested hugepages because
enough space is not available in the RAM. In that case, currently the
script displays no error message hence the user can be under the delusion
that the hugepages requested are all successfully reserved. This patch
displays an error message if the pages reserved are different from the
requested pages.
Signed-off-by: Sarosh Arif <redacted>
---
v2:
use a global variable SHOW_HUGEPAGES to remove linter warnings
v3:
only print an error message if unable to reserve hugepages.
---
+ if get_hugepages(path) != pages:
+ sys.exit("Unable to reserve required pages.")Replaced double quotes by simple ones. Applied, thanks.