Ask Your Question

DPDK support in openstack juno

asked 2016-01-05 03:57:46 -0500

fresher gravatar image

Hi All,

I have a multinode openstack juno setup (1 controller node and 3 compute nodes). I want to enable DPDK on it. Can someone please help me with the steps to configure it. I am using VXLAN tunneling between the nodes and network cards support DPDK.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-05 20:53:38 -0500

xiangfei-ma gravatar image

OpenStack supports pci-passthrough for DPDK so you might try this:

  1. get your NICs' information, (replace the NIC type to yours or other keyword)
    # lspci -nn | grep 540
    82:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)
    82:00.1 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)
    84:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)
    84:00.1 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)

    It shows 4 records for me, means 2 NIC with 2 ports on each NIC. In the end of each line, it shows vendor_id(8086), product_id(1528).
  2. Configure your OpenStack to use thes NIC for DPDK
    on controller:
    configure pci_alias in nova.conf. For example:

    pci_alias={"name":"dpdk","product_id": "1528", "vendor_id": "8086"}
    See official docs for more info about pci_alias configuration.

    on compute node:
    configure pci_passthrough_whitelist in nova.conf. For example:

    pci_passthrough_whitelist=[{"vendor_id": "8086", "product_id": "1528"}]
    See official docs for more info about pci_passthrough_whitelist configuration.
    Restart nova service both on controller and compute node to aplly the changing.

  3. create flavor to use these NIC for DPDK by OpenStack instance
    When you create the pci_pass_through flavor, the extra_spec like below is needed:

    "pci_passthrough:alias": "dpdk:1"
    dpdk is the name of pci_alias we configured on controller, 1 is the number of it we asks.

  4. Create instance by using the pci_pass_though flavor.
    The dpdk NIC will be detached from compute host and attached to the instance automatically by OpenStack(libvirt driver, more exactly), now you can use that NIC in the instance for DPDK.
edit flag offensive delete link more


Thanks a lot. Can I enable dpdk for an already existing instance? Also, I have access to the compute node thorugh this NIC itself. DPDK NIC will be detached from compute node (point 4) so can I access the compute node? Thanks ans sorry for asking so many questions.

fresher gravatar imagefresher ( 2016-01-05 23:33:42 -0500 )edit

First question, I guess you're asking that can you use the DPDK-able NIC in the existing instance without pci_passthrough spec configured for DPDK?
If so, the awnser is negative.
At least you have to rebuild the instance with a pci_passthrough spec configured flavor;
(character limit reached)

xiangfei-ma gravatar imagexiangfei-ma ( 2016-01-06 00:13:08 -0500 )edit

or, edit the xml file of instance manually to add the DPDK-able NIC's info to <device> section then restart the instance to aplly it. The point is you have to do something to let the instance know that this NIC is useable.

xiangfei-ma gravatar imagexiangfei-ma ( 2016-01-06 00:15:59 -0500 )edit

Currently, the NIC is just can used by one of compute-host/instance at the same time. Because the pci_passthrough tech in OpenStack is based on SR-IOV(Single Root Input/Output Virtualization), it doesn't support the feature you asked.

xiangfei-ma gravatar imagexiangfei-ma ( 2016-01-06 00:20:55 -0500 )edit

AFAIK, SR-IOV just support to detach device from one user and attach it to another user. Here the device is the entire NIC but not one or some ports of NIC. So you have to prepare 2 NICs, one for DPDK, one for compute-host accessing.

xiangfei-ma gravatar imagexiangfei-ma ( 2016-01-06 00:29:00 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-01-05 03:57:46 -0500

Seen: 307 times

Last updated: Jan 05 '16