[dpdk-dev] [PATCH 0/4] virtio support for container

Tan, Jianfeng jianfeng.tan at intel.com
Fri Jan 15 07:39:26 CET 2016


Hi Amit,

On 1/14/2016 8:03 PM, Amit Tomer wrote:
> Hello,
>
>> Not necessary. But if you want to use hugepages inside Docker, use -v option
>> to map a hugetlbfs into containers.
> I modified Docker command line in order to make use of Hugetlbfs:
>
> CMD ["/usr/src/dpdk/examples/l2fwd/build/l2fwd", "-c", "0x3", "-n",
> "4","--no-pci", "--socket-mem","512",
> "--vdev=eth_cvio0,queue_num=256,rx=1,tx=1,cq=0,path=/var/run/usvhost",
> "--", "-p", "0x1"]



For this case, please use --single-file option because it creates much 
more than 8 fds, which can be handled by vhost-user sendmsg().


>
> Then, I run docker :
>
>   docker run -i -t --privileged  -v /dev/hugepages:/dev/hugepages  -v
> /home/ubuntu/backup/usvhost:/var/run/usvhost  l6
>
> But this is what I see:
>
> EAL: Support maximum 128 logical core(s) by configuration.
> EAL: Detected 48 lcore(s)
> EAL: Setting up physically contiguous memory...
> EAL: Failed to find phys addr for 2 MB pages
> PANIC in rte_eal_init():
> Cannot init memory
> 1: [/usr/src/dpdk/examples/l2fwd/build/l2fwd(rte_dump_stack+0x20) [0x48ea78]]

 From the log, it's caused by that it still cannot open 
/proc/self/pagemap. But it's strange that you already specify --privileged).

Thanks,
Jianfeng

>
> This is from Host:
>
> # mount | grep hugetlbfs
> hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
> none on /dev/hugepages type hugetlbfs (rw,relatime)
>
>   #cat /proc/meminfo | grep Huge
> AnonHugePages:    548864 kB
> HugePages_Total:    4096
> HugePages_Free:     1024
> HugePages_Rsvd:        0
> HugePages_Surp:        0
> Hugepagesize:       2048 kB
>
> What is it, I'm doing wrong here?
>
> Thanks,
> Amit



More information about the dev mailing list