Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Configuring SR-IOV and DPDK interfaces on the same compute node
This section describes how to deploy SR-IOV and DPDK interfaces on the same Compute node.
This guide provides examples for CPU assignments, memory allocation, and NIC configurations that may vary from your topology and use case. See the Network Functions Virtualization Product Guide and the Network Functions Virtualization Planning Guide to understand the hardware and configuration options.
The process to create and deploy SR-IOV and DPDK interfaces on the same Compute node includes:
-
Set the parameters for SR-IOV role and OVS-DPDK in the
network-environment.yaml
file. -
Configure the
compute.yaml
file with an SR-IOV interface and a DPDK interface. - Deploy the overcloud with this updated set of roles.
- Create the appropriate OpenStack flavor, networks, and ports to support these interface types.
We recommend the following network settings:
- Use floating IP addresses for the guest instances.
- Create a router and attach it to the DPDK VXLAN network (the management network).
- Use SR-IOV for the provider network.
-
Boot the guest instance with two ports attached. We recommend you use
cloud-init
for the guest instance to set the default route for the management network. - Add the floating IP address to booted guest instance.
If needed, use SR-IOV bonding for the guest instance and ensure both SR-IOV interfaces exist on the same NUMA node for optimum performance.
You must install and configure the undercloud before you can deploy the compute node in the overcloud. See the Director Installation and Usage Guide for details.
Ensure that you create an OpenStack flavor that match this custom role.
5.1. Modifying the first-boot.yaml file Copiar o linkLink copiado para a área de transferência!
Modify the first-boot.yaml file to set up OVS and DPDK parameters and to configure tuned
for CPU affinity.
If you have included the following lines in the first-boot.yaml
file in a previous deployment, remove these lines for Red Hat OpenStack Platform 10 with Open vSwitch 2.9.
Add additional resources.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the DPDK parameters.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
tuned
configuration to provide CPU affinity.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the kernel arguments.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Configuring openvswitch for security groups (Technology Preview) Copiar o linkLink copiado para a área de transferência!
Dataplane interfaces need a high degree of performance in a stateful firewall. To protect these interfaces, consider deploying a telco grade firewall (VNF).
Controlplane interfaces can be configured by setting the NeutronOVSFirewallDriver
parameter openvswitch
. This configures OpenStack Networking to use the flow-based OVS firewall driver. This is set in the network-environment.yaml
file under parameter_defaults
.
Example:
parameter_defaults: NeutronOVSFirewallDriver: openvswitch
parameter_defaults:
NeutronOVSFirewallDriver: openvswitch
Openvswitch is a technology preview and should only be used in testing environments. The only supported value for the NeutronOVSFirewallDriver
parameter is noop
.
When the OVS firewall driver is used, it is important to disable it for dataplane interfaces. This can be done with the openstack port set
command.
Example:
openstack port set --no-security-group --disable-port-security ${PORT}
openstack port set --no-security-group --disable-port-security ${PORT}
5.3. Defining the SR-IOV and OVS-DPDK parameters Copiar o linkLink copiado para a área de transferência!
Modify the network-environment.yaml file to configure SR-IOV and OVS-DPDK role-specific parameters:
Add the resource mapping for the OVS-DPDK and SR-IOV services to the
network-environment.yaml
file along with the network configuration for these nodes:resource_registry: # Specify the relative/absolute path to the config files you want to use for override the default. OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml OS::TripleO::NodeUserData: first-boot.yaml
resource_registry: # Specify the relative/absolute path to the config files you want to use for override the default. OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml OS::TripleO::NodeUserData: first-boot.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the flavors:
OvercloudControlFlavor: controller OvercloudComputeFlavor: compute
OvercloudControlFlavor: controller OvercloudComputeFlavor: compute
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the tunnel type:
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling. NeutronTunnelTypes: 'vxlan' # The tenant network type for Neutron (vlan or vxlan). NeutronNetworkType: 'vlan'
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling. NeutronTunnelTypes: 'vxlan' # The tenant network type for Neutron (vlan or vxlan). NeutronNetworkType: 'vlan'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the parameters for SR-IOV. You can obtain the PCI vendor and device values as seen in the
NeutronSupportedPCIVendorDevs
parameter by runninglspci -nv
.NoteThe OpenvSwitch firewall driver, as seen in the following example, is a Technology Preview and should be used for control plane interfaces only. The only supported value for the
NeutronOVSFirewallDriver
parameter isnoop
. See Configuring openvswitch for security groups for details.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the parameters for OVS-DPDK:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou must assign at least one CPU (with sibling thread) on each NUMA node with or without DPDK NICs present for DPDK PMD to avoid failures in creating guest instances.
-
Configure the remainder of the
network-environment.yaml
file to override the default parameters from theneutron-ovs-dpdk-agent.yaml
andneutron-sriov-agent.yaml
files as needed for your OpenStack deployment.
See the Network Functions Virtualization Planning Guide for details on how to determine the best values for the OVS-DPDK parameters that you set in the network-environment.yaml
file to optimize your OpenStack network for OVS-DPDK.
5.4. Configuring the Compute node for SR-IOV and DPDK interfaces Copiar o linkLink copiado para a área de transferência!
This example uses the sample the compute.yaml file to support SR-IOV and DPDK interfaces.
Create the control plane Linux bond for an isolated network:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Assign VLANs to this Linux bond:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set a bridge with a DPDK port to link to the controller:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteTo include multiple DPDK devices, repeat the
type
code section for each DPDK device you want to add.NoteWhen using OVS-DPDK, all bridges on the same Compute node should be of type
ovs_user_bridge
. The director may accept the configuration, but Red Hat OpenStack Platform does not support mixingovs_bridge
andovs_user_bridge
on the same node.Create the SR-IOV interface to the Controller:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.5. Deploying the overcloud Copiar o linkLink copiado para a área de transferência!
The following example defines the overcloud_deploy.sh Bash script that deploys both OVS-DPDK and SR-IOV:
5.6. Creating a flavor and deploying an instance with SR-IOV and DPDK interfaces Copiar o linkLink copiado para a área de transferência!
With a successful deployment, you can now begin populating the overcloud. Start by sourcing the newly created overcloudrc
file in the /home/stack
directory. Then, create a flavor and deploy an instance.
Create a flavor:
source overcloudrc openstack flavor create --vcpus 6 --ram 4096 --disk 40 compute
# source overcloudrc # openstack flavor create --vcpus 6 --ram 4096 --disk 40 compute
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Where:
-
compute
is the flavor name. -
4096
is the memory size in MB. -
40
is the disk size in GB (default 0G). -
6
is the number of vCPUs.
-
Set the flavor for large pages:
openstack flavor set compute --property hw:mem_page_size=1GB
# openstack flavor set compute --property hw:mem_page_size=1GB
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the external network:
openstack network create --share --external \ --provider-physical-network <net-mgmt-physnet> \ --provider-network-type <flat|vlan> external
# openstack network create --share --external \ --provider-physical-network <net-mgmt-physnet> \ --provider-network-type <flat|vlan> external
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the networks for SR-IOV and DPDK:
openstack network create net-dpdk openstack network create net-sriov openstack subnet create --subnet-range <cidr/prefix> --network net-dpdk net-dpdk-subnet openstack subnet create --subnet-range <cidr/prefix> --network net-sriov net-sriov-subnet
# openstack network create net-dpdk # openstack network create net-sriov # openstack subnet create --subnet-range <cidr/prefix> --network net-dpdk net-dpdk-subnet # openstack subnet create --subnet-range <cidr/prefix> --network net-sriov net-sriov-subnet
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the SR-IOV port.
Use
vnic-type
direct to create an SR-IOV VF port:openstack port create --network net-sriov --vnic-type direct sriov_port
# openstack port create --network net-sriov --vnic-type direct sriov_port
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use
vnic-type
direct-physical to create an SR-IOV PF port:openstack port create --network net-sriov --vnic-type direct-physical sriov_port
# openstack port create --network net-sriov --vnic-type direct-physical sriov_port
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create a router and attach to the DPDK VXLAN network:
openstack router create router1 openstack router add subnet router1 net-dpdk-subnet
# openstack router create router1 # openstack router add subnet router1 net-dpdk-subnet
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a floating IP address and associate it with the guest instance port:
openstack floating ip create --floating-ip-address FLOATING-IP external
# openstack floating ip create --floating-ip-address FLOATING-IP external
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy an instance:
openstack server create --flavor compute --image rhel_7.3 --nic port-id=sriov_port --nic net-id=NET_DPDK_ID vm1
# openstack server create --flavor compute --image rhel_7.3 --nic port-id=sriov_port --nic net-id=NET_DPDK_ID vm1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Where:
- compute is the flavor name or ID.
-
rhel_7.3
is the image (name or ID) used to create an instance. -
sriov_port
is the name of the port created in the previous step. - NET_DPDK_ID is the DPDK network ID.
-
vm1
is the name of the instance.
You have now deployed an instance that uses an SR-IOV interface and a DPDK interface on the same Compute node.
For instances with more interfaces, you can use cloud-init
. See Table 3.1 in Create an Instance for details.