DPDK OVS 与 Ubuntu 14.04

DPDK OVS 与 Ubuntu 14.04

我们正在尝试在单台服务器上的 Ubuntu 14.04 kernel 3.19 中的 openstack juno 上安装 DPDK OVS。我们参考以下步骤执行相同操作。

https://software.intel.com/en-us/blogs/2015/06/09/building-vhost-user-for-ovs-today-using-dpdk-200

在执行过程中,我们遇到了 ovs-vswitchd 服务的一些问题,因为它在启动时挂起了。

命令输出./ovs-vswitchd --dpdk -c 0x0FF8 -n 4 --socket-mem 1024,0 -- --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/op penvswitch/ovs-vswitchd.pid如下


AL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
EAL:   Not managed by a supported kernel driver, skipped
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
EAL:   Not managed by a supported kernel driver, skipped
Zone 0: name:<MALLOC_S0_HEAP_0>, phys:0x30400000, len:0xb00000, virt:0x7f2d1ba00000, socket_id:0, flags:0
Zone 1: name:<RG_MP_log_history>, phys:0x35400000, len:0x2080, virt:0x7f2d1b600000, socket_id:0, flags:0
Zone 2: name:<MP_log_history>, phys:0xe3ce00000, len:0x28a0c0, virt:0x7f2d09400000, socket_id:0, flags:0
2015-11-24T13:14:12Z|00002|vlog|INFO|opened log file /var/log/openvswitch/ovs-vswitchd.log
2015-11-24T13:14:12Z|00003|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 0
2015-11-24T13:14:12Z|00004|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 1
2015-11-24T13:14:12Z|00005|ovs_numa|INFO|Discovered 2 NUMA nodes and 48 CPU cores
2015-11-24T13:14:12Z|00006|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
2015-11-24T13:14:12Z|00007|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connected
2015-11-24T13:14:12Z|00008|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports recirculation
2015-11-24T13:14:12Z|00009|ofproto_dpif|INFO|netdev@ovs-netdev: MPLS label stack length probed as 3
2015-11-24T13:14:12Z|00010|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports unique flow ids
2015-11-24T13:14:12Z|00011|dpif_netlink|ERR|Generic Netlink family 'ovs_datapath' does not exist. The Open vSwitch kernel module is probably not loaded.
2015-11-24T13:14:12Z|00012|dpif|WARN|failed to enumerate system datapaths: No such file or directory
2015-11-24T13:14:12Z|00013|dpif|WARN|failed to create datapath ovs-system: No such file or directory
2015-11-24T13:14:12Z|00014|ofproto_dpif|ERR|failed to open datapath of type system: No such file or directory
2015-11-24T13:14:12Z|00015|ofproto|ERR|failed to open datapath br-eth1: No such file or directory
2015-11-24T13:14:12Z|00016|bridge|ERR|failed to create bridge br-eth1: No such file or directory
2015-11-24T13:14:12Z|00017|bridge|INFO|bridge br-ex: added interface br-ex on port 65534
2015-11-24T13:14:12Z|00018|bridge|INFO|bridge br-int: added interface tapb6327a6f-e3 on port 1
2015-11-24T13:14:12Z|00019|bridge|INFO|bridge br-int: added interface br-int on port 65534
2015-11-24T13:14:12Z|00020|bridge|INFO|bridge br-ex: using datapath ID 0000be3137b62448
2015-11-24T13:14:12Z|00021|connmgr|INFO|br-ex: added service controller "punix:/var/run/openvswitch/br-ex.mgmt"
2015-11-24T13:14:12Z|00022|bridge|INFO|bridge br-int: using datapath ID 000016d2ab534949
2015-11-24T13:14:12Z|00023|connmgr|INFO|br-int: added service controller "punix:/var/run/openvswitch/br-int.mgmt"
2015-11-24T13:14:12Z|00024|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.4.90
2015-11-24T13:14:19Z|00025|memory|INFO|25200 kB peak resident set size after 10.3 seconds
2015-11-24T13:14:19Z|00026|memory|INFO|handlers:17 ports:3 revalidators:7 rules:9

  • 我们尝试设置echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages,但没有成功。

如果我们缺少任何东西并导致 ovs-vswitchd 在启动时卡住,您能帮助我们获取这些东西吗?

此外,当我们使用 DPDK OVS 在 openstack 中创建虚拟机时,会自动创建 dpdkvhost-user 类型的接口。如果这些接口使用常规 br-int 桥而不是 DPDK 桥 br0 进行映射,那么这是否意味着我们已成功启用带有 netdev 数据路径的 DPDK?

答案1

您的问题是关于“不受支持的内核驱动程序管理,已跳过”。

您必须从内核驱动程序取消分配给 uio 驱动程序的设备,以便 DPDK 可以使用它们。

对于 Ubuntu 16.04,以下内容将帮助您:https://help.ubuntu.com/16.04/serverguide/DPDK.html#dpdk-config-dev

可以手动完成dpdk_nic_bind

--help输出来看:

显示当前设备状态:

   dpdk_nic_bind --status

从当前驱动程序绑定 eth1 并转而使用 igb_uio

   dpdk_nic_bind --bind=igb_uio eth1

解除 0000:01:00.0 与任何驱动程序的绑定

   dpdk_nic_bind -u 0000:01:00.0

将 0000:02:00.0 和 0000:02:00.1 绑定到 ixgbe 内核驱动程序

   dpdk_nic_bind -b ixgbe 02:00.0 02:00.1

相关内容