LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to use DPDK inside Linux containers? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-dpdk-inside-linux-containers-4175537584/)

sindh 03-23-2015 03:49 AM

How to use DPDK inside Linux containers?
 
Hi,
I am trying to use DPDK inside containers.

While running any example application in a container, I am getting the below error.
EAL: 20480 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
PANIC in rte_eal_init():
Cannot get hugepage information
6: [./build/l2fwd() [0x402a49]]
5: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7ffff761776d]]
4: [./build/l2fwd() [0x402093]]
3: [./build/l2fwd() [0x45f3bf]]
2: [./build/l2fwd() [0x401fd9]]
1: [./build/l2fwd() [0x464dd3]]
Aborted (core dumped)


The problem is with hugepages. I have allocated memory for hugepages in host. And it is visible in containers.
But while accessing hugepages through containers, it's giving the error, permission denied.

My host machine has Ubuntu 12.04.
DPDK version 1.7

Please let me know, if I miss any info to be provided.

Any help would be greatly appreciated.

Thank you

dijetlo 03-25-2015 03:28 AM

The error
Quote:

EAL: 20480 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
The instructions.
Quote:

mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
The error suggests you have 20480 hugepages
Not 64 hugepages each 20480kB.

sindh 03-25-2015 04:01 AM

Thanks for the reply.
This was resolved by adding the below line to the container config file.
lxc.mount.entry = /mnt/huge mnt/huge none bind,create=dir 0 0


All times are GMT -5. The time now is 09:25 AM.