文章目录
#虚拟机使用脚本安装测试DPDK
安装及测试详细过程请见大神的帖子: http://www.cnblogs.com/zzqcn/p/4024205.html。这里我只记录我遇到坑。
Display current Ethernet/Crypto device settings 显示网卡设置时报错
Traceback (most recent call last):
File "/home/clzfile/dpdk/usertools/dpdk-devbind.py", line 709, in <module>
main()
File "/home/clzfile/dpdk/usertools/dpdk-devbind.py", line 702, in main
get_device_details(network_devices)
File "/home/clzfile/dpdk/usertools/dpdk-devbind.py", line 274, in get_device_details
dev_lines = check_output(["lspci", "-Dvmmnnk"]).splitlines()
File "/home/clzfile/dpdk/usertools/dpdk-devbind.py", line 149, in check_output
stderr=stderr).communicate()[0]
File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
感谢dpdk社区的大神:http://sysight.com/index.php?qa=347&qa_1=dpdk安装问题,有关-dpdk_nic_bind-py-status&show=347#q347
这是由于CentOS7中没有lspci的原因,安装一下就可以解决:yum install pciutils -y。
测试时Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)报错
bitmask: f
Launching app
EAL: Detected 2 lcore(s)
EAL: lcore 2 unavailable
EAL: invalid coremask
Usage: x86_64-native-linuxapp-gcc/app/testpmd [options]
EAL common options:
-c COREMASK Hexadecimal bitmask of cores to run on
-l CORELIST List of cores to run on
The argument format is <c1>[-c2][,c3[-c4],...]
where c1, c2, etc are core indexes between 0 and 128
--lcores COREMAP Map lcore set to physical cpu set
The argument format is
'<lcores[@cpus]>[<,lcores[@cpus]>...]'
lcores and cpus list are grouped by '(' and ')'
Within the group, '-' is used for range separator,
',' is used for single number separator.
'( )' can be omitted for single element group,
'@' can be omitted if cpus and lcores have the same value
--master-lcore ID Core ID that is used as master
-n CHANNELS Number of memory channels
-m MB Memory to allocate (see also --socket-mem)
-r RANKS Force number of memory ranks (don't detect)
-b, --pci-blacklist Add a PCI device in black list.
Prevent EAL from using this PCI device. The argument
format is <domain:bus:devid.func>.
-w, --pci-whitelist Add a PCI device in white list.
Only use the specified PCI devices. The argument format
is <[domain:]bus:devid.func>. This option can be present
several times (once per device).
[NOTE: PCI whitelist cannot be used with -b option]
--vdev Add a virtual device.
The argument format is <driver><id>[,key=val,...]
(ex: --vdev=net_pcap0,iface=eth2).
-d LIB.so|DIR Add a driver or driver directory
(can be used multiple times)
--vmware-tsc-map Use VMware TSC map instead of native RDTSC
--proc-type Type of this process (primary|secondary|auto)
--syslog Set syslog facility
--log-level=<int> Set global log level
--log-level=<type-regexp>,<int>
Set specific log level
-v Display version information on startup
-h, --help This help
EAL options for DEBUG use only:
--huge-unlink Unlink hugepage files after init
--no-huge Use malloc instead of hugetlbfs
--no-pci Disable PCI
--no-hpet Disable HPET
--no-shconf No shared config (mmap'd files)
EAL Linux options:
--socket-mem Memory to allocate on sockets (comma separated values)
--huge-dir Directory where hugetlbfs is mounted
--file-prefix Prefix for hugepage filenames
--base-virtaddr Base virtual address
--create-uio-dev Create /dev/uioX (usually done by hotplug)
--vfio-intr Interrupt mode for VFIO (legacy|msi|msix)
--xen-dom0 Support running on Xen dom0 without hugetlbfs
EAL: FATAL: Invalid 'command line' arguments.
EAL: Invalid 'command line' arguments.
PANIC in main():
Cannot init EAL
5: [x86_64-native-linuxapp-gcc/app/testpmd() [0x4552e1]]
4: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f3e7f5a6b15]]
3: [x86_64-native-linuxapp-gcc/app/testpmd(main+0x5e9) [0x451469]]
2: [x86_64-native-linuxapp-gcc/app/testpmd(__rte_panic+0xb0) [0x44a0d2]]
1: [x86_64-native-linuxapp-gcc/app/testpmd(rte_dump_stack+0x1a) [0x4b9f3a]]
感谢大神解答:http://sysight.com/index.php?qa=510&qa_1=centos7-0系统使用脚本进行安装测试,使用交互模式运行测试程序,报错lcore-unavailable
只有两个CPU,掩码应该用3.
测试时Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)报错
Interactive-mode selected
Warning: NUMA should be configured manually by using --port-numa-config and --ring-numa-config parameters along with --numa.
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176, socket=0
EAL: Error - exiting with code: 1
Cause: Creation of mbuf pool for socket 0 failed: Cannot allocate memory
在社区中找到了解决方法:http://sysight.com/index.php?qa=39&qa_1=vmware搭建dpdk环境,执行-application-interactive-%24rte_target&show=39#q39
内存设置小了,将内存设置大一些,问题解决。
本人dpdk新手,问题的解决主要依靠dpdk交流社区和其他大神的博客,在此引用,为他人也为自己留一个记录。如有侵权,请联系删除帖。