Removing currently reserved hugepages
.echo_tmp: line 2: /sys/devices/system/node/node?/hugepages/hugepages-2048kB/nr_hugepages: 没有那个文件或目录
Unmounting /mnt/huge and removing directory
Input the number of 2MB pages
Example: to have 128MB of hugepages available, enter '64' to
reserve 64 * 2MB pages
Number of pages: 64
Reserving hugepages
Creating /mnt/huge and mounting as hugetlbfs
Network devices using IGB_UIO driver
====================================
<none>
Network devices using kernel driver
===================================
0000:02:01.0 '79c970 [PCnet32 LANCE]' if=eth0 drv=pcnet32 unused= *Active*
0000:02:05.0 '79c970 [PCnet32 LANCE]' if=eth1 drv=pcnet32 unused= *Active*
0000:02:06.0 '82545EM Gigabit Ethernet Controller (Copper)' if=eth2 drv=e1000 unused=igb_uio
Other network devices
=====================
<none>
Enter PCI address of device to bind to IGB UIO driver: 02:06.0
OK
让你输入pci的地址, 你只要将0000:02:06.0 中的,0000冒号后面的几位输入就行了, 如 02:06.0 记得标点也要输入啊, 注意绑定的时候可以能有个错误的提示如下;
Enter PCI address of device to bind to IGB UIO driver: 02:06.0 02:07.0
Routing table indicates that interface 0000:02:06.0 is active. Not modifying
OK
is active ,可能是你当前的对应的网卡处于up状态,所以你要执行down命令将其关闭;
例如我的网卡是eth2;
Enter hex bitmask of cores to execute testpmd app on
Example: to execute app on cores 0 to 7, enter 0xff
bitmask: 0x3
由于我的虚拟机只有2个cpu ,所以按照16进制掩码就选择了 0x3 ,回车运行一下试试 ;
再输入 start发一下包
Interactive-mode selected
Configuring Port 0 (socket -1)
Checking link statuses...
Port 0 Link Up - speed 1000 Mbps - full-duplex
Done
testpmd>
testpmd> start
Warning! Cannot handle an odd number of ports with the current port topology. Configuration must be changed to have an even number of ports, or relaunch application with --port-topology=chained
io packet forwarding - CRC stripping disabled - packets/burst=16
nb forwarding cores=1 - nb forwarding ports=1
RX queues=1 - RX desc=128 - RX free threshold=0
RX threshold registers: pthresh=8 hthresh=8 wthresh=4
TX queues=1 - TX desc=512 - TX free threshold=0
TX threshold registers: pthresh=36 hthresh=0 wthresh=0
TX RS bit threshold=0 - TXQ flags=0x0
有警告,是什么意思,????????
2014年1月1日22:32:10 星期三
上面这个错误,经由同样学习dpdk 的同学 frank 解决了,是因为我只添加了1块intel的网卡,你在再添加一块就ok了
输入stop 停止;
Telling cores to stop...
Waiting for lcores to finish...
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.