DPDK中的ifconfig缺少接口

时间:2015-06-28 08:56:42

标签: virtualbox ubuntu-14.04 ifconfig dpdk

我正在运行Oracle VirtualBox,我创建了两个接口。我运行DPDK并向DPDK添加一个接口,我发现它从ifconfig中丢失了。

以下屏幕截图:

root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ifconfig
eth1      Link encap:Ethernet  HWaddr 08:00:27:3f:34:56  
      inet addr:192.168.0.123  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fe3f:3456/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:132 errors:0 dropped:0 overruns:0 frame:0
      TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:20982 (20.9 KB)  TX bytes:3724 (3.7 KB)

eth2      Link encap:Ethernet  HWaddr 08:00:27:f7:13:f5  
      inet addr:1.1.1.1  Bcast:1.1.1.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fef7:13f5/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:51932 errors:0 dropped:0 overruns:0 frame:0
      TX packets:660805 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:32407739 (32.4 MB)  TX bytes:1647410289 (1.6 GB)

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:1681 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1681 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:358901 (358.9 KB)  TX bytes:358901 (358.9 KB)

root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py --status

使用DPDK兼容驱动程序的网络设备

使用内核驱动程序的网络设备

 0000:00:03.0 '82540EM Gigabit Ethernet Controller' if=eth1 drv=e1000 unused=igb_uio,vfio-pci *Active*
 0000:00:08.0 '82540EM Gigabit Ethernet Controller' if=eth2 drv=e1000 unused=igb_uio,vfio-pci *Active*

其他网络设备

root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py -b igb_uio 0000:00:08.0

root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ./dpdk_nic_bind.py --status

使用DPDK兼容驱动程序的网络设备

0000:00:08.0 '82540EM Gigabit Ethernet Controller' drv=igb_uio unused=vfio-pci

使用内核驱动程序的网络设备

0000:00:03.0 '82540EM Gigabit Ethernet Controller' if=eth1 drv=e1000 unused=igb_uio,vfio-pci *Active*

其他网络设备

我没有看到我添加的eth2,我修改了使用兼容DPDK的驱动程序。

 root@VirtualBox:/home/akabra/dpdk/dpdk-2.0.0/tools# ifconfig
 eth1      Link encap:Ethernet  HWaddr 08:00:27:3f:34:56  
      inet addr:192.168.0.123  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fe3f:3456/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:182 errors:0 dropped:0 overruns:0 frame:0
      TX packets:86 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:27757 (27.7 KB)  TX bytes:12789 (12.7 KB)

 lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:1705 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1705 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:360948 (360.9 KB)  TX bytes:360948 (360.9 KB)

1 个答案:

答案 0 :(得分:1)

DPDK的igb_uio驱动程序无法生成' netdev'接口,所以我无法通过ifconfig看到任何接口。 (但是,它们在DPDK应用程序中注册为' rte_eth_dev'。)我应该使用KNI驱动程序来获得' netdev'接口