Bug 432

Summary: Entering Non-numeric value for Setup hugepage mappings, dpdk-setup.sh still goes to create_mnt_huge function and prints misleading info
Product: DPDK Reporter: Muhammad Bilal (m.bilal)
Component: otherAssignee: John McNamara (john.mcnamara)
Status: CONFIRMED ---    
Severity: normal CC: ajit.khaparde
Priority: Normal    
Version: 20.02   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Muhammad Bilal 2020-04-01 20:38:23 CEST
During creating hugepages by running dpdk-setup.sh script, if we give Non-Numeric inputs, the dpdk-setup.sh still goes to the create_mnt_huge function and prints the misleading information on terminal
The output of terminal is as follow

Reserving hugepages
sh: echo: I/O error
Creating /mnt/huge and mounting as hugetlbfs

Press enter to continue ...

Here "Creating /mnt/huge and mounting as hugetlbfs" is showing that hugepages has been created, And actually hugepages were not created on system.
So this is giving the misleading information.

We can solve this issue by putting the Non-Numeric check on the input from the user to create hugepages.
Comment 1 Ajit Khaparde 2020-04-01 20:47:10 CEST
John, What do you say? Thanks
Comment 2 Muhammad Bilal 2020-04-09 07:21:12 CEST
I have Submitted the patch for this, which includes the Non-numeric check for input to the 'Setup hugepage mappings' just before going to 'create_mnt_huge' function.

Patch link : http://patches.dpdk.org/patch/67855/