Red Hat Openstack Platform-16.2-Network Functions Virtualization Planning and Configuration Guide-En-Us
Red Hat Openstack Platform-16.2-Network Functions Virtualization Planning and Configuration Guide-En-Us
OpenStack Team
[email protected]
Legal Notice
Copyright © 2022 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
This guide contains important planning information and describes the configuration procedures for
single root input/output virtualization (SR-IOV) and dataplane development kit (DPDK) for network
functions virtualization infrastructure (NFVi) in your Red Hat OpenStack Platform deployment.
Table of Contents
Table of Contents
. . . . . . . . . .OPEN
MAKING . . . . . . SOURCE
. . . . . . . . . .MORE
. . . . . . .INCLUSIVE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. . . . . . . . . . . . .
. . . . . . . . . . . . . FEEDBACK
PROVIDING . . . . . . . . . . . . ON
. . . .RED
. . . . .HAT
. . . . .DOCUMENTATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . . . . . . . . .
. . . . . . . . . . . 1.. .OVERVIEW
CHAPTER . . . . . . . . . . . .OF
. . . NFV
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7. . . . . . . . . . . . .
.CHAPTER
. . . . . . . . . . 2.
. . HARDWARE
. . . . . . . . . . . . . REQUIREMENTS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8. . . . . . . . . . . . .
2.1. TESTED NICS 8
2.2. TROUBLESHOOTING HARDWARE OFFLOAD 8
2.3. DISCOVERING YOUR NUMA NODE TOPOLOGY 9
2.4. NFV BIOS SETTINGS 13
.CHAPTER
. . . . . . . . . . 3.
. . SOFTWARE
. . . . . . . . . . . . .REQUIREMENTS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
..............
3.1. REGISTERING AND ENABLING REPOSITORIES 14
3.2. SUPPORTED CONFIGURATIONS FOR NFV DEPLOYMENTS 15
3.2.1. Deploying RHOSP with the OVS mechanism driver 15
3.2.2. Deploying OVN with OVS-DPDK and SR-IOV 16
3.2.3. Deploying OVN with OVS TC Flower offload 17
3.3. SUPPORTED DRIVERS 19
3.4. COMPATIBILITY WITH THIRD-PARTY SOFTWARE 19
. . . . . . . . . . . 4.
CHAPTER . . .NETWORK
. . . . . . . . . . .CONSIDERATIONS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
..............
.CHAPTER
. . . . . . . . . . 5.
. . PLANNING
. . . . . . . . . . . . AN
. . . .SR-IOV
. . . . . . . .DEPLOYMENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
..............
5.1. HARDWARE PARTITIONING FOR AN SR-IOV DEPLOYMENT 21
5.2. TOPOLOGY OF AN NFV SR-IOV DEPLOYMENT 21
5.2.1. Topology for NFV SR-IOV without HCI 22
. . . . . . . . . . . 6.
CHAPTER . . .DEPLOYING
. . . . . . . . . . . . .SR-IOV
. . . . . . . .TECHNOLOGIES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
..............
6.1. PREREQUISITES FOR DEPLOYING SR-IOV TECHNOLOGIES 24
6.2. CONFIGURING SR-IOV 24
6.3. NIC PARTITIONING 27
6.4. CONFIGURING OVS HARDWARE OFFLOAD 35
6.4.1. Verifying OVS hardware offload 37
6.5. TUNING EXAMPLES FOR OVS HARDWARE OFFLOAD 37
6.6. COMPONENTS OF OVS HARDWARE OFFLOAD 38
6.7. TROUBLESHOOTING OVS HARDWARE OFFLOAD 40
6.8. DEBUGGING HW OFFLOAD FLOW 43
6.9. DEPLOYING AN INSTANCE FOR SR-IOV 45
6.10. CREATING HOST AGGREGATES 46
.CHAPTER
. . . . . . . . . . 7.
. . PLANNING
. . . . . . . . . . . . YOUR
. . . . . . .OVS-DPDK
. . . . . . . . . . . . DEPLOYMENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
..............
7.1. OVS-DPDK WITH CPU PARTITIONING AND NUMA TOPOLOGY 48
7.2. WORKFLOWS AND DERIVED PARAMETERS 48
7.3. DERIVED OVS-DPDK PARAMETERS 49
7.4. CALCULATING OVS-DPDK PARAMETERS MANUALLY 50
7.4.1. CPU parameters 50
7.4.2. Memory parameters 52
7.4.3. Networking parameters 54
7.4.4. Other parameters 54
7.4.5. Instance extra specifications 55
7.5. TWO NUMA NODE EXAMPLE OVS-DPDK DEPLOYMENT 55
7.6. TOPOLOGY OF AN NFV OVS-DPDK DEPLOYMENT 57
1
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
.CHAPTER
. . . . . . . . . . 8.
. . .CONFIGURING
. . . . . . . . . . . . . . . AN
. . . .OVS-DPDK
. . . . . . . . . . . . DEPLOYMENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60
..............
8.1. DERIVING DPDK PARAMETERS WITH WORKFLOWS 60
8.2. OVS-DPDK TOPOLOGY 62
Prerequisites 64
8.3. SETTING THE MTU VALUE FOR OVS-DPDK INTERFACES 64
8.4. CONFIGURING A FIREWALL FOR SECURITY GROUPS 65
8.5. SETTING MULTIQUEUE FOR OVS-DPDK INTERFACES 66
8.6. CONFIGURING OVS PMD AUTO LOAD BALANCE 66
8.7. KNOWN LIMITATIONS 68
8.8. CREATING A FLAVOR AND DEPLOYING AN INSTANCE FOR OVS-DPDK 68
8.9. TROUBLESHOOTING THE OVS-DPDK CONFIGURATION 69
.CHAPTER
. . . . . . . . . . 9.
. . .TUNING
........A
. . RED
. . . . . HAT
. . . . . OPENSTACK
. . . . . . . . . . . . . .PLATFORM
. . . . . . . . . . . . .ENVIRONMENT
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
..............
9.1. PINNING EMULATOR THREADS 71
9.1.1. Configuring CPUs to host emulator threads 71
Procedure 71
9.1.2. Verify the emulator thread pinning 71
Procedure 71
9.2. ENABLING RT-KVM FOR NFV WORKLOADS 72
9.2.1. Planning for your RT-KVM Compute nodes 72
9.2.2. Configuring OVS-DPDK with RT-KVM 75
9.2.2.1. Generating the ComputeOvsDpdk composable role 75
9.2.2.2. Configuring the OVS-DPDK parameters 75
9.2.2.3. Deploying the overcloud 76
9.2.3. Launching an RT-KVM instance 76
9.3. TRUSTED VIRTUAL FUNCTIONS 77
9.3.1. Configuring trust between virtual and physical functions 77
Prerequisites 77
Procedure 77
9.3.2. Utilizing trusted VF networks 78
9.4. CONFIGURING RX/TX QUEUE SIZE 78
Prerequisites 79
Procedure 79
Testing 79
9.5. CONFIGURING A NUMA-AWARE VSWITCH 79
Prerequisites 80
Procedure 80
Testing NUMA-aware vSwitch 81
Known Limitations 81
9.6. CONFIGURING QUALITY OF SERVICE (QOS) IN AN NFVI ENVIRONMENT 82
9.7. DEPLOYING AN OVERCLOUD WITH HCI AND DPDK 82
Prerequisites 82
Procedure 82
9.7.1. Example NUMA node configuration 83
CPU allocation: 83
Example of CPU allocation: 83
9.7.2. Example ceph configuration file 83
9.7.3. Example DPDK configuration file 84
9.7.4. Example nova configuration file 85
9.7.5. Recommended configuration for HCI-DPDK deployments 86
9.8. SYNCHRONIZE YOUR COMPUTE NODES WITH TIMEMASTER 86
9.8.1. Timemaster hardware requirements 88
9.8.2. Configuring Timemaster 89
2
Table of Contents
. . . . . . . . . . . 10.
CHAPTER . . . EXAMPLE:
. . . . . . . . . . . .CONFIGURING
. . . . . . . . . . . . . . . .OVS-DPDK
. . . . . . . . . . . .AND
. . . . .SR-IOV
. . . . . . . .WITH
. . . . . .VXLAN
. . . . . . . .TUNNELLING
. . . . . . . . . . . . . . . . . . . . . . . . . . .92
..............
10.1. CONFIGURING ROLES DATA 92
10.2. CONFIGURING OVS-DPDK PARAMETERS 92
10.3. CONFIGURING THE CONTROLLER NODE 94
10.4. CONFIGURING THE COMPUTE NODE FOR DPDK AND SR-IOV 95
10.5. DEPLOYING THE OVERCLOUD 96
. . . . . . . . . . . 11.
CHAPTER . . .UPGRADING
. . . . . . . . . . . . . RED
. . . . . HAT
. . . . .OPENSTACK
. . . . . . . . . . . . . .PLATFORM
. . . . . . . . . . . . WITH
. . . . . . NFV
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
..............
. . . . . . . . . . . 12.
CHAPTER . . . NFV
. . . . . PERFORMANCE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
..............
. . . . . . . . . . . 13.
CHAPTER . . . FINDING
. . . . . . . . . .MORE
. . . . . . .INFORMATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
..............
. . . . . . . . . . . .A.
APPENDIX . . SAMPLE
. . . . . . . . . .DPDK
. . . . . . SRIOV
. . . . . . . YAML
. . . . . . . FILES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
...............
A.1. SAMPLE VXLAN DPDK SRIOV YAML FILES 100
A.1.1. roles_data.yaml 100
A.1.2. network-environment-overrides.yaml 105
A.1.3. controller.yaml 107
A.1.4. compute-ovs-dpdk.yaml 112
A.1.5. overcloud_deploy.sh 117
3
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
4
MAKING OPEN SOURCE MORE INCLUSIVE
5
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
2. Ensure that you see the Feedback button in the upper right corner of the document.
6. Optional: Add your email address so that the documentation team can contact you for
clarification on your issue.
7. Click Submit.
6
CHAPTER 1. OVERVIEW OF NFV
For a high-level overview of NFV concepts, see the Network Functions Virtualization Product Guide .
NOTE
OVS-DPDK and SR-IOV configuration depends on your hardware and topology. This
guide provides examples for CPU assignments, memory allocation, and NIC
configurations that might vary from your topology and use case.
Use Red Hat OpenStack Platform director to isolate specific network types, for example, external,
project, internal API, and so on. You can deploy a network on a single network interface, or distributed
over a multiple-host network interface. With Open vSwitch you can create bonds by assigning multiple
interfaces to a single bridge. Configure network isolation in a Red Hat OpenStack Platform installation
with template files. If you do not provide template files, the service networks deploy on the provisioning
network. There are two types of template configuration files:
network-environment.yaml - this file contains network details, such as subnets and IP address
ranges, for the overcloud nodes. This file also contains the different settings that override the
default parameter values for various scenarios.
Host network templates, for example, compute.yaml and controller.yaml - define the network
interface configuration for the overcloud nodes. The values of the network details are provided
by the network-environment.yaml file.
The Hardware requirements and Software requirements sections provide more details on how to plan
and configure the heat template files for NFV using the Red Hat OpenStack Platform director.
NOTE
You can edit YAML files to configure NFV. For an introduction to the YAML file format,
see: YAML in a Nutshell .
7
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
For a complete list of the certified hardware for Red Hat OpenStack Platform, see Red Hat OpenStack
Platform certified hardware.
If you configure OVS-DPDK on Mellanox ConnectX-4 or ConnectX-5 network interfaces, you must set
the corresponding kernel driver in the compute-ovs-dpdk.yaml file:
members
- type: ovs_dpdk_port
name: dpdk0
driver: mlx5_core
members:
- type: interface
name: enp3s0f0
Procedure
1. Log in to the Compute nodes in your RHOSP deployment that have Mellanox NICs that you
want to configure.
8
CHAPTER 2. HARDWARE REQUIREMENTS
NOTE
You must install and configure the undercloud before you can retrieve NUMA information
through hardware introspection. For more information about undercloud configuration,
see: Director Installation and Usage Guide.
For example, the numa_topology collector is part of the hardware-inspection extras and includes the
following information for each NUMA node:
To retrieve the information listed above, substitute <UUID> with the UUID of the bare-metal node to
complete the following command:
The following example shows the retrieved NUMA information for a bare-metal node:
{
"cpus": [
{
"cpu": 1,
"thread_siblings": [
1,
17
],
"numa_node": 0
},
{
"cpu": 2,
"thread_siblings": [
10,
26
],
"numa_node": 1
9
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
},
{
"cpu": 0,
"thread_siblings": [
0,
16
],
"numa_node": 0
},
{
"cpu": 5,
"thread_siblings": [
13,
29
],
"numa_node": 1
},
{
"cpu": 7,
"thread_siblings": [
15,
31
],
"numa_node": 1
},
{
"cpu": 7,
"thread_siblings": [
7,
23
],
"numa_node": 0
},
{
"cpu": 1,
"thread_siblings": [
9,
25
],
"numa_node": 1
},
{
"cpu": 6,
"thread_siblings": [
6,
22
],
"numa_node": 0
},
{
"cpu": 3,
"thread_siblings": [
11,
27
],
"numa_node": 1
10
CHAPTER 2. HARDWARE REQUIREMENTS
},
{
"cpu": 5,
"thread_siblings": [
5,
21
],
"numa_node": 0
},
{
"cpu": 4,
"thread_siblings": [
12,
28
],
"numa_node": 1
},
{
"cpu": 4,
"thread_siblings": [
4,
20
],
"numa_node": 0
},
{
"cpu": 0,
"thread_siblings": [
8,
24
],
"numa_node": 1
},
{
"cpu": 6,
"thread_siblings": [
14,
30
],
"numa_node": 1
},
{
"cpu": 3,
"thread_siblings": [
3,
19
],
"numa_node": 0
},
{
"cpu": 2,
"thread_siblings": [
2,
18
],
"numa_node": 0
11
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
}
],
"ram": [
{
"size_kb": 66980172,
"numa_node": 0
},
{
"size_kb": 67108864,
"numa_node": 1
}
],
"nics": [
{
"name": "ens3f1",
"numa_node": 1
},
{
"name": "ens3f0",
"numa_node": 1
},
{
"name": "ens2f0",
"numa_node": 0
},
{
"name": "ens2f1",
"numa_node": 0
},
{
"name": "ens1f1",
"numa_node": 0
},
{
"name": "ens1f0",
"numa_node": 0
},
{
"name": "eno4",
"numa_node": 0
},
{
"name": "eno1",
"numa_node": 0
},
{
"name": "eno3",
"numa_node": 0
},
{
"name": "eno2",
"numa_node": 0
}
]
}
12
CHAPTER 2. HARDWARE REQUIREMENTS
Parameter Setting
DCA Enabled.
13
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Procedure
1. Register your system with the Content Delivery Network, entering your Customer Portal user
name and password when prompted.
2. Determine the entitlement pool ID for Red Hat OpenStack Platform director, for example {Pool
ID} from the following command and output:
3. Include the Pool ID value in the following command to attach the Red Hat OpenStack Platform
16.2 entitlement.
5. Enable the required repositories for Red Hat OpenStack Platform with NFV.
14
CHAPTER 3. SOFTWARE REQUIREMENTS
6. Update your system so you have the latest base system packages.
NOTE
Additionally, you can deploy RHOSP with any of the following features:
Composable roles
Procedure
parameter_defaults:
ContainerImagePrepare:
- push_destination: true
set:
neutron_driver: null
...
15
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
TEMPLATES=/usr/share/openstack-tripleo-heat-templates
Procedure
3. Add the custom resources for OVS-DPDK with the resource_registry parameter:
resource_registry:
# Specify the relative/absolute path to the config files you want to use for override the
default.
OS::TripleO::ComputeOvsDpdkSriov::Net::SoftwareConfig:
nic-configs/computeovsdpdksriov.yaml
OS::TripleO::Controller::Net::SoftwareConfig:
nic-configs/controller.yaml
4. In the parameter_defaults section, edit the value of the tunnel type parameter to geneve:
NeutronTunnelTypes: 'geneve'
NeutronNetworkType: ['geneve', 'vlan']
5. Optional: If you use a centralized routing model, disable Distributed Virtual Routing (DVR):
NeutronEnableDVR: false
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
ovs_extra:
- str_replace:
16
CHAPTER 3. SOFTWARE REQUIREMENTS
neutron-ovn-dpdk.yaml
neutron-ovn-sriov.yaml
NOTE
Open Virtual Networking (OVN) is the default networking mechanism driver in Red Hat
OpenStack Platform 16.2. If you want to use OVN with distributed virtual routing (DVR),
you must include the environments/services/neutron-ovn-dvr-ha.yaml file in the
openstack overcloud deploy command. If you want to use OVN without DVR, you must
include the environments/services/neutron-ovn-ha.yaml file in the openstack
overcloud deploy command, and set the NeutronEnableDVR parameter to false. If you
want to use OVN with SR-IOV, you must include the environments/services/neutron-
ovn-sriov.yaml file as the last of the OVN environment files in the openstack overcloud
deploy command.
Procedure
For VLAN, set the physical_network parameter to the name of the network that you
17
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
For VLAN, set the physical_network parameter to the name of the network that you
create in neutron after deployment. Use this value for the NeutronBridgeMappings
parameter also.
parameter_defaults:
NeutronBridgeMappings: 'datacentre:br-ex,tenant:br-offload'
NeutronNetworkVLANRanges: 'tenant:502:505'
NeutronFlatNetworks: 'datacentre,tenant'
NeutronPhysicalDevMappings:
- tenant:ens1f0
- tenant:ens1f1
NovaPCIPassthrough:
- devname: "ens1f0"
physical_network: "tenant"
- devname: "ens1f1"
physical_network: "tenant"
NeutronTunnelTypes: ''
NeutronNetworkType: 'vlan'
ComputeSriovOffloadParameters:
OvsHwOffload: True
KernelArgs: "default_hugepagesz=1GB hugepagesz=1G hugepages=32
intel_iommu=on iommu=pt isolcpus=1-11,13-23"
IsolCpusList: "1-11,13-23"
NovaReservedHostMemory: 4096
NovaComputeCpuDedicatedSet: ['1-11','13-23']
NovaComputeCpuSharedSet: ['0','12']
- type: ovs_bridge
name: br-offload
mtu: 9000
use_dhcp: false
addresses:
- ip_netmask:
get_param: TenantIpSubnet
members:
- type: linux_bond
name: bond-pf
bonding_options: "mode=active-backup miimon=100"
members:
- type: sriov_pf
name: ens1f0
numvfs: 3
primary: true
promisc: true
use_dhcp: false
defroute: false
link_mode: switchdev
- type: sriov_pf
name: ens1f1
numvfs: 3
18
CHAPTER 3. SOFTWARE REQUIREMENTS
promisc: true
use_dhcp: false
defroute: false
link_mode: switchdev
ovs-hw-offload.yaml
neutron-ovn-sriov.yaml
TEMPLATES_HOME=”/usr/share/openstack-tripleo-heat-templates”
CUSTOM_TEMPLATES=”/home/stack/templates”
For a list of NICs tested for Red Hat OpenStack Platform deployments with NFV, see Tested NICs.
For a complete list of products and services tested, supported, and certified to perform with Red Hat
Enterprise Linux, see Third Party Software compatible with Red Hat Enterprise Linux . You can filter the
list by product version and software category.
19
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Provisioning network - Provides DHCP and PXE-boot functions to help discover bare-metal
systems for use in the overcloud.
External network - A separate network for remote connectivity to all nodes. The interface
connecting to this network requires a routable IP address, either defined statically, or generated
dynamically from an external DHCP service.
The minimal overcloud network configuration includes the following NIC configurations:
Single NIC configuration - One NIC for the provisioning network on the native VLAN and
tagged VLANs that use subnets for the different overcloud network types.
Dual NIC configuration - One NIC for the provisioning network and the other NIC for the
external network.
Dual NIC configuration - One NIC for the provisioning network on the native VLAN, and the
other NIC for tagged VLANs that use subnets for different overcloud network types.
Multiple NIC configuration - Each NIC uses a subnet for a different overcloud network type.
20
CHAPTER 5. PLANNING AN SR-IOV DEPLOYMENT
See Discovering your NUMA node topology to evaluate your hardware impact on the SR-IOV
parameters.
A typical topology includes 14 cores per NUMA node on dual socket Compute nodes. Both hyper-
threading (HT) and non-HT cores are supported. Each core has two sibling threads. One core is
dedicated to the host on each NUMA node. The virtual network function (VNF) handles the SR-IOV
interface bonding. All the interrupt requests (IRQs) are routed on the host cores. The VNF cores are
dedicated to the VNFs. They provide isolation from other VNFs and isolation from the host. Each VNF
must use resources on a single NUMA node. The SR-IOV NICs used by the VNF must also be associated
with that same NUMA node. This topology does not have a virtualization overhead. The host, OpenStack
Networking (neutron), and Compute (nova) configuration parameters are exposed in a single file for
ease, consistency, and to avoid incoherence that is fatal to proper isolation, causing preemption, and
packet loss. The host and virtual machine isolation depend on a tuned profile, which defines the boot
parameters and any Red Hat OpenStack Platform modifications based on the list of isolated CPUs.
21
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
The image shows a VNF that uses DPDK at an application level, and has access to SR-IOV virtual
functions (VFs) and physical functions (PFs), for better availability or performance, depending on the
fabric configuration. DPDK improves performance, while the VF/PF DPDK bonds provide support for
failover, and high availability. The VNF vendor must ensure that the DPDK poll mode driver (PMD)
supports the SR-IOV card that is being exposed as a VF/PF. The management network uses OVS,
therefore the VNF sees a mgmt network device using the standard virtIO drivers. You can use that
device to initially connect to the VNF, and ensure that the DPDK application bonds the two VF/PFs.
22
CHAPTER 5. PLANNING AN SR-IOV DEPLOYMENT
23
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NOTE
NOTE
The following CPU assignments, memory allocation, and NIC configurations are examples,
and might be different from your use case.
Procedure
3. Generate a new roles data file named roles_data_compute_sriov.yaml that includes the
Controller and ComputeSriov roles:
ComputeSriov is a custom role provided with your RHOSP installation that includes the
NeutronSriovAgent, NeutronSriovHostConfig services, in addition to the default compute
services.
24
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
For more information on container image preparation, see Preparing container images in the
Director Installation and Usage guide .
$ cp /usr/share/openstack-tripleo-heat-templates/environments/network-environment.yaml
/home/stack/templates/network-environment-sriov.yaml
NeutronNetworkType: 'vlan'
NeutronNetworkVLANRanges:
- tenant:22:22
- tenant:25:25
NeutronTunnelTypes: ''
7. To determine the vendor_id and product_id for each PCI device type, use one of the following
commands on the physical server that has the PCI cards:
To return the vendor_id and product_id from a deployed overcloud, use the following
command:
To return the vendor_id and product_id of a physical function (PF) if you have not yet
deployed the overcloud, use the following command:
8. Configure role specific parameters for SR-IOV compute nodes in your network-environment-
sriov.yaml file:
ComputeSriovParameters:
IsolCpusList: "1-19,21-39"
KernelArgs: "default_hugepagesz=1GB hugepagesz=1G hugepages=32 iommu=pt
intel_iommu=on isolcpus=1-19,21-39"
TunedProfileName: "cpu-partitioning"
NeutronBridgeMappings:
- tenant:br-link0
NeutronPhysicalDevMappings:
- tenant:p7p1
NovaComputeCpuDedicatedSet: '1-19,21-39'
NovaReservedHostMemory: 4096
NOTE
25
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
9. Configure the PCI passthrough devices for the SR-IOV compute nodes in your network-
environment-sriov.yaml file:
ComputeSriovParameters:
...
NovaPCIPassthrough:
- vendor_id: "<vendor_id>"
product_id: "<product_id>"
address: <NIC_address>
physical_network: "<physical_network>"
...
Replace <NIC_address> with the address of the PCI device. For information about how to
configure the address parameter, see Guidelines for configuring NovaPCIPassthrough in
the Configuring the Compute Service for Instance Creation guide.
Replace <physical_network> with the name of the physical network the PCI device is
located on.
NOTE
Do not use the devname parameter when you configure PCI passthrough
because the device name of a NIC can change. To create a Networking
service (neutron) port on a PF, specify the vendor_id, the product_id, and
the PCI device address in NovaPCIPassthrough, and create the port with
the --vnic-type direct-physical option. To create a Networking service port
on a virtual function (VF), specify the vendor_id and product_id in
NovaPCIPassthrough, and create the port with the --vnic-type direct
option. The values of the vendor_id and product_id parameters might be
different between physical function (PF) and VF contexts. For more
information about how to configure NovaPCIPassthrough, see Guidelines
for configuring NovaPCIPassthrough in the Configuring the Compute
Service for Instance Creation guide.
10. Configure the SR-IOV enabled interfaces in the compute.yaml network configuration template.
To create SR-IOV VFs, configure the interfaces as standalone NICs:
- type: sriov_pf
name: p7p3
mtu: 9000
numvfs: 10
use_dhcp: false
defroute: false
nm_controlled: true
hotplug: true
promisc: false
- type: sriov_pf
name: p7p4
mtu: 9000
numvfs: 10
26
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
use_dhcp: false
defroute: false
nm_controlled: true
hotplug: true
promisc: false
NOTE
11. Ensure that the list of default filters includes the value AggregateInstanceExtraSpecsFilter:
NovaSchedulerDefaultFilters:
['AvailabilityZoneFilter','ComputeFilter','ComputeCapabilitiesFilter','ImagePropertiesFilter','Serve
rGroupAntiAffinityFilter','ServerGroupAffinityFilter','PciPassthroughFilter','AggregateInstanceExt
raSpecsFilter']
You can configure single root I/O virtualization (SR-IOV) so that a RHOSP host can use virtual functions
(VFs).
When you partition a single, high-speed NIC into multiple VFs, you can use the NIC for both control and
data plane traffic.
Procedure
2. Add an entry for the interface type sriov_pf to configure a physical function that the host can
use:
- type: sriov_pf
name: <interface name>
use_dhcp: false
numvfs: <number of vfs>
promisc: <true/false> #optional (Defaults to true)
NOTE
27
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NOTE
3. Add an entry for the interface type sriov_vf to configure virtual functions that the host can use:
- type: <bond_type>
name: internal_bond
bonding_options: mode=<bonding_option>
use_dhcp: false
members:
- type: sriov_vf
device: <pf_device_name>
vfid: <vf_id>
- type: sriov_vf
device: <pf_device_name>
vfid: <vf_id>
- type: vlan
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
device: internal_bond
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
routes:
list_concat_unique:
- get_param: InternalApiInterfaceRoutes
Replace <bond_type> with the required bond type, for example, linux_bond. You can
apply VLAN tags on the bond for other bonds, such as ovs_bond.
active-backup
Balance-slb
NOTE
Specify the sriov_vf as the interface type to bond in the members section.
NOTE
28
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
NOTE
If you are using an OVS bridge as the interface type, you can configure only
one OVS bridge on the sriov_vf of a sriov_pf device. More than one OVS
bridge on a single sriov_pf device can result in packet duplication across VFs,
and decreased performance.
Replace <vf_id> with the ID of the VF. The applicable VF ID range starts at zero, and ends
at the maximum number of VFs minus one.
4. Disable spoof checking, and apply VLAN tags on the sriov_vf for linux_bond over VFs.
NovaPCIPassthrough:
- devname: "eno3"
trusted: "true"
physical_network: "sriov1"
- devname: "eno4"
trusted: "true"
physical_network: "sriov2"
Director identifies the host VFs, and derives the PCI addresses of the VFs that are available to
the instance.
6. Enable IOMMU on all nodes that require NIC partitioning. For example, if you want NIC
Partitioning for Compute nodes, enable IOMMU using the KernelArgs parameter for that role.
parameter_defaults:
ComputeParameters:
KernelArgs: "intel_iommu=on iommu=pt"
NOTE
When you first add the KernelArgs parameter to the configuration of a role, the
overcloud nodes are automatically rebooted. If required, you can disable the
automatic rebooting of nodes and instead perform node reboots manually after
each overcloud deployment. For more information, see Configuring manual node
reboot to define KernelArgs.
7. Add your role file and environment files to the stack with your other environment files and
deploy the overcloud:
29
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
To configure a Linux bond over VFs, disable spoofcheck, and apply VLAN tags to sriov_vf:
- type: linux_bond
name: bond_api
bonding_options: "mode=active-backup"
members:
- type: sriov_vf
device: eno2
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
- type: sriov_vf
device: eno3
vfid: 1
vlan_id:
get_param: InternalApiNetworkVlanID
spoofcheck: false
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
routes:
list_concat_unique:
- get_param: InternalApiInterfaceRoutes
- type: ovs_bridge
name: br-bond
use_dhcp: true
members:
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
routes:
list_concat_unique:
- get_param: ControlPlaneStaticRoutes
- type: ovs_bond
name: bond_vf
ovs_options: "bond_mode=active-backup"
members:
- type: sriov_vf
device: p2p1
vfid: 2
- type: sriov_vf
device: p2p2
vfid: 2
To configure an OVS user bridge on VFs, apply VLAN tags to the ovs_user_bridge parameter:
- type: ovs_user_bridge
name: br-link0
30
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
use_dhcp: false
mtu: 9000
ovs_extra:
- str_replace:
template: set port br-link0 tag=_VLAN_TAG_
params:
_VLAN_TAG_:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
routes:
list_concat_unique:
- get_param: TenantInterfaceRoutes
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
ovs_extra:
- set port dpdkbond0 bond_mode=balance-slb
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: sriov_vf
device: eno2
vfid: 3
- type: ovs_dpdk_port
name: dpdk1
members:
- type: sriov_vf
device: eno3
vfid: 3
Validation
31
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
32
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
Interface br-sriov2
type: internal
Bridge br-sriov1
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port phy-br-sriov1
Interface phy-br-sriov1
type: patch
options: {peer=int-br-sriov1}
Port br-sriov1
Interface br-sriov1
type: internal
Bridge br-ex
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port br-ex
Interface br-ex
type: internal
Port phy-br-ex
Interface phy-br-ex
type: patch
options: {peer=int-br-ex}
Bridge br-tenant
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port br-tenant
tag: 305
Interface br-tenant
type: internal
Port phy-br-tenant
Interface phy-br-tenant
type: patch
options: {peer=int-br-tenant}
Port dpdkbond0
Interface dpdk0
type: dpdk
options: {dpdk-devargs="0000:18:0e.0"}
Interface dpdk1
type: dpdk
options: {dpdk-devargs="0000:18:0a.0"}
Bridge br-tun
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port vxlan-98140025
Interface vxlan-98140025
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow,
local_ip="152.20.0.229", out_key=flow, remote_ip="152.20.0.37"}
33
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Port br-tun
Interface br-tun
type: internal
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-tun}
Port vxlan-98140015
Interface vxlan-98140015
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow,
local_ip="152.20.0.229", out_key=flow, remote_ip="152.20.0.21"}
Port vxlan-9814009f
Interface vxlan-9814009f
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow,
local_ip="152.20.0.229", out_key=flow, remote_ip="152.20.0.159"}
Port vxlan-981400cc
Interface vxlan-981400cc
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow,
local_ip="152.20.0.229", out_key=flow, remote_ip="152.20.0.204"}
Bridge br-int
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port int-br-tenant
Interface int-br-tenant
type: patch
options: {peer=phy-br-tenant}
Port int-br-ex
Interface int-br-ex
type: patch
options: {peer=phy-br-ex}
Port int-br-sriov1
Interface int-br-sriov1
type: patch
options: {peer=phy-br-sriov1}
Port patch-tun
Interface patch-tun
type: patch
options: {peer=patch-int}
Port br-int
Interface br-int
type: internal
Port int-br-sriov2
Interface int-br-sriov2
type: patch
options: {peer=phy-br-sriov2}
Port vhu4142a221-93
tag: 1
Interface vhu4142a221-93
34
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_sockets/vhu4142a221-93"}
ovs_version: "2.13.2"
If you used NovaPCIPassthrough to pass VFs to instances, test by deploying an SR-IOV instance .
NOTE
Since Red Hat OpenStack Platform 16.2.3, to offload traffic from Compute nodes with
OVS hardware offload and ML2/OVS, you must set the disable_packet_marking
parameter to true in the openvswitch_agent.ini configuration file, and then restart the
neutron_ovs_agent container.
cat /var/lib/config-data/puppet-
generated/neutron/etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs]
disable_packet_marking=True
Procedure
1. Generate an overcloud role for OVS hardware offload that is based on the Compute role:
3. Add the OvsHwOffload parameter under role-specific parameters with a value of true.
4. To configure neutron to use the iptables/hybrid firewall driver implementation, include the line:
NeutronOVSFirewallDriver: iptables_hybrid. For more information about
NeutronOVSFirewallDriver, see Using the Open vSwitch Firewall in the Advanced Overcloud
Customization Guide.
For VLAN, set the physical_network parameter to the name of the network you create in
neutron after deployment. This value should also be in NeutronBridgeMappings.
parameter_defaults:
NeutronOVSFirewallDriver: iptables_hybrid
ComputeSriovParameters:
IsolCpusList: 2-9,21-29,11-19,31-39
KernelArgs: "default_hugepagesz=1GB hugepagesz=1G hugepages=128
intel_iommu=on iommu=pt"
35
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
OvsHwOffload: true
TunedProfileName: "cpu-partitioning"
NeutronBridgeMappings:
- tenant:br-tenant
NovaPCIPassthrough:
- vendor_id: <vendor-id>
product_id: <product-id>
address: <address>
physical_network: "tenant"
- vendor_id: <vendor-id>
product_id: <product-id>
address: <address>
physical_network: "null"
NovaReservedHostMemory: 4096
NovaComputeCpuDedicatedSet: 1-9,21-29,11-19,31-39
NovaSchedulerDefaultFilters:
[\'AvailabilityZoneFilter',\'ComputeFilter',\'ComputeCapabilitiesFilter',\'ImagePropertiesFilter',\'Se
rverGroupAntiAffinityFilter',\'ServerGroupAffinityFilter',\'PciPassthroughFilter',\'NUMATopologyF
ilter']
NOTE
7. Configure one or more network interfaces intended for hardware offload in the compute-
sriov.yaml configuration file:
- type: ovs_bridge
name: br-tenant
mtu: 9000
members:
- type: sriov_pf
name: p7p1
numvfs: 5
mtu: 9000
primary: true
promisc: true
use_dhcp: false
link_mode: switchdev
NOTE
36
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
NOTE
TEMPLATES_HOME=”/usr/share/openstack-tripleo-heat-templates”
CUSTOM_TEMPLATES=”/home/stack/templates”
Adjusting the number of channels for each network interface to improve performance
A channel includes an interrupt request (IRQ) and the set of queues that trigger the IRQ. When you set
the mlx5_core driver to switchdev mode, the mlx5_core driver defaults to one combined channel,
which might not deliver optimal performance.
Procedure
On the PF representors, enter the following command to adjust the number of CPUs available
to the host. Replace $(nproc) with the number of CPUs you want to make available:
CPU pinning
37
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
To prevent performance degradation from cross-NUMA operations, locate NICs, their applications, the
VF guest, and OVS in the same NUMA node. For more information, see Configuring CPU pinning on
Compute nodes in the Configuring the Compute Service for Instance Creation guide.
Nova
Configure the Nova scheduler to use the NovaPCIPassthrough filter with the NUMATopologyFilter
and DerivePciWhitelistEnabled parameters. When you enable OVS HW Offload, the Nova scheduler
operates similarly to SR-IOV passthrough for instance spawning.
Neutron
When you enable OVS HW Offload, use the devlink cli tool to set the NIC e-switch mode to switchdev.
Switchdev mode establishes representor ports on the NIC that are mapped to the VFs.
Procedure
1. To allocate a port from a switchdev-enabled NIC, log in as an admin user, create a neutron port
with a binding-profile value of capabilities, and disable port security:
Pass this port information when you create the instance. You associate the representor port with the
instance VF interface and connect the representor port to OVS bridge br-int for one-time OVS
datapath processing. A VF port representor functions like a software version of a physical “patch panel”
front-end. For more information about new instance creation, see: Deploying an Instance for SR-IOV
OVS
In an environment with hardware offload configured, the first packet transmitted traverses the OVS
kernel path, and this packet journey establishes the ml2 OVS rules for incoming and outgoing traffic for
the instance traffic. When the flows of the traffic stream are established, OVS uses the traffic control
(TC) Flower utility to push these flows on the NIC hardware.
Procedure
Procedure
1. Apply the following configuration. This is the default option if you do not explicitly configure tc-
38
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
1. Apply the following configuration. This is the default option if you do not explicitly configure tc-
policy:
2. Restart OVS.
Procedure
Use the following devlink commands to query the mode of the PCI device.
NIC firmware
The NIC firmware performs the following tasks:
Creates VFs.
Although the NIC firmware is non-volatile and persists after you reboot, you can modify the
configuration during run time.
Procedure
Apply the following configuration on the interfaces, and the representor ports, to ensure that
TC Flower pushes the flow programming at the port level:
NOTE
Ensure that you keep the firmware updated.Yum or dnf updates might not complete the
firmware update. For more information, see your vendor documentation.
39
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Prerequisites
RHOSP 12 or newer
For more information about supported prerequisites, see see the Red Hat Knowledgebase solution
Network Adapter Fast Datapath Feature Support Matrix .
You can base guest VMs on VXLAN and VLAN by using either the same set of interfaces
attached to a bond, or a different set of NICs for each type.
You can bond two ports of a Mellanox NIC by using Linux bond.
You can host tenant VXLAN networks on VLAN interfaces on top of a Mellanox Linux bond.
- type: ovs_bridge
name: br-offload
mtu: 9000
use_dhcp: false
members:
- type: linux_bond
name: bond-pf
bonding_options: "mode=active-backup miimon=100"
members:
- type: sriov_pf
name: p5p1
numvfs: 3
primary: true
promisc: true
use_dhcp: false
defroute: false
link_mode: switchdev
- type: sriov_pf
name: p5p2
numvfs: 3
promisc: true
use_dhcp: false
defroute: false
40
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
link_mode: switchdev
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
device: bond-pf
addresses:
- ip_netmask:
get_param: TenantIpSubnet
active-backup - mode=1
xmit_hash_policy=layer3+4
Procedure
1. During deployment, use the host network configuration tool os-net-config to enable hw-tc-
offload.
2. Enable hw-tc-offload on the sriov_config service any time you reboot the Compute node.
3. Set the hw-tc-offload parameter to on for the NICs that are attached to the bond:.
Procedure
1. Set the eswitch mode to switchdev for the interfaces you use for HW offload.
2. Use the host network configuration tool os-net-config to enable eswitch during deployment.
3. Enable eswitch on the sriov_config service any time you reboot the Compute node.
NOTE
41
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NOTE
Procedure
After deployment, verify that the VF representor ports are named correctly.
Procedure
42
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
3. Examine the in_hw flags and the statistics in this output. The word hardware indicates that the
hardware processes the network traffic. If you use tc-policy=none, you can check this output or
a tcpdump to investigate when hardware or software handles the packets. You can see a
corresponding log message in dmesg or in ovs-vswitch.log when the driver is unable to offload
packets.
4. For Mellanox, as an example, the log entries resemble syndrome messages in dmesg.
In this example, the error code (0x6b1266) represents the following behavior:
Validating systems
Validate your system with the following procedure.
Procedure
2. Enable IOMMU in Linux by adding intel_iommu=on to kernel parameters, for example, using
GRUB.
Limitations
You cannot use the OVS firewall driver with HW offload because the connection tracking properties of
the flows are unsupported in the offload path in OVS 2.11.
43
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Procedure
1. To enable logging on the offload modules and to get additional log information for this failure,
use the following commands on the Compute node:
2. Inspect the ovs-vswitchd logs again to see additional details about the issue.
In the following example logs, the offload failed because of an unsupported attribute mark.
2020-01-31T06:22:11.218Z|00471|dpif_netlink(handler402)|DBG|system@ovs-system:
put[create] ufid:61bd016e-eb89-44fc-a17e-958bc8e45fda
recirc_id(0),dp_hash(0/0),skb_priority(0/0),in_port(7),skb_mark(0),ct_state(0/0),ct_zone(0/0),ct
_mark(0/0),ct_label(0/0),eth(src=fa:16:3e:d2:f5:f3,dst=fa:16:3e:c4:a3:eb),eth_type(0x0800),ipv
4(src=10.1.1.8/0.0.0.0,dst=10.1.1.31/0.0.0.0,proto=1/0,tos=0/0x3,ttl=64/0,frag=no),icmp(type=0/
0,code=0/0),
actions:set(tunnel(tun_id=0x3d,src=10.10.141.107,dst=10.10.141.124,ttl=64,tp_dst=4789,flags(
df|key))),6
2020-01-31T06:22:11.253Z|00472|netdev_tc_offloads(handler402)|DBG|offloading attribute
pkt_mark isn't supported
https://github.com/Mellanox/linux-sysinfo-snapshot/blob/master/sysinfo-snapshot.py
When you run this command, you create a zip file of the relevant log information, which is useful for
support cases.
Procedure
You can run this system information script with the following command:
You can also install Mellanox Firmware Tools (MFT), mlxconfig, mlxlink and the OpenFabrics Enterprise
Distribution (OFED) drivers.
44
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
Use the tcpdump utility at the representor and PF ports to similarly check traffic flow.
Any changes you make to the link state of the representor port, affect the VF link state also.
$ ovs-appctl dpctl/dump-flows -m
$ tc monitor
NOTE
Pinned CPU instances can be located on the same Compute node as unpinned instances.
For more information, see Configuring CPU pinning on Compute nodes in the
Configuring the Compute Service for Instance Creation guide.
Deploy an instance for single root I/O virtualization (SR-IOV) by performing the following steps:
1. Create a flavor.
$ openstack flavor create <flavor> --ram <MB> --disk <GB> --vcpus <#>
TIP
You can specify the NUMA affinity policy for PCI passthrough devices and SR-IOV interfaces
by adding the extra spec hw:pci_numa_affinity_policy to your flavor. For more information,
see Flavor metadata in the Configuring the Compute Service for Instance Creation guide.
45
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Use the following command to create a virtual function with hardware offload. You must be
an admin user to set --binding-profile.
Use vnic-type direct-physical to create an SR-IOV physical function (PF) port that is
dedicated to a single instance. This PF port is a Networking service (neutron) port but is not
controlled by the Networking service, and is not visible as a network adapter because it is a
PCI device that is passed through to the instance.
4. Deploy an instance.
$ openstack server create --flavor <flavor> --image <image> --nic port-id=<id> <instance
name>
1. You can configure the AggregateInstanceExtraSpecsFilter value, and other necessary filters,
through the heat parameter NovaSchedulerDefaultFilters under parameter_defaults in your
deployment templates.
parameter_defaults:
NovaSchedulerDefaultFilters:
['AggregateInstanceExtraSpecsFilter','AvailabilityZoneFilter','ComputeFilter','ComputeCapabilitie
sFilter','ImagePropertiesFilter','ServerGroupAntiAffinityFilter','ServerGroupAffinityFilter','PciPass
throughFilter','NUMATopologyFilter']
NOTE
To add this parameter to the configuration of an existing cluster, you can add it to
the heat templates, and run the original deployment script again.
2. Create an aggregate group for SR-IOV, and add relevant hosts. Define metadata, for example,
sriov=true, that matches defined flavor metadata.
46
CHAPTER 6. DEPLOYING SR-IOV TECHNOLOGIES
3. Create a flavor.
# openstack flavor create <flavor> --ram <MB> --disk <GB> --vcpus <#>
4. Set additional flavor properties. Note that the defined metadata, sriov=true, matches the
defined metadata on the SR-IOV aggregate.
47
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
IMPORTANT
When using OVS-DPDK and the OVS native firewall (a stateful firewall based on
conntrack), you can track only packets that use ICMPv4, ICMPv6, TCP, and UDP
protocols. OVS marks all other types of network traffic as invalid.
For a high-level introduction to CPUs and NUMA topology, see NFV performance considerations .
A sample partitioning includes 16 cores per NUMA node on dual-socket Compute nodes. The traffic
requires additional NICs because you cannot share NICs between the host and OVS-DPDK.
NOTE
You must reserve DPDK PMD threads on both NUMA nodes, even if a NUMA node does
not have an associated DPDK NIC.
For optimum OVS-DPDK performance, reserve a block of memory local to the NUMA node. Choose
NICs associated with the same NUMA node that you use for memory and CPU pinning. Ensure that both
bonded interfaces are from NICs on the same NUMA node.
This feature is available in this release as a Technology Preview, and therefore is not fully supported by
48
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
This feature is available in this release as a Technology Preview, and therefore is not fully supported by
Red Hat. It should only be used for testing, and should not be deployed in a production environment. For
more information about Technology Preview features, see Scope of Coverage Details.
You can use the Red Hat OpenStack Platform Workflow (mistral) service to derive parameters based on
the capabilities of your available bare-metal nodes. Workflows use a YAML file to define a set of tasks
and actions to perform. You can use a pre-defined workbook, derive_params.yaml, in the directory
tripleo-common/workbooks/. This workbook provides workflows to derive each supported parameter
from the results of Bare Metal introspection. The derive_params.yaml workflows use the formulas
from tripleo-common/workbooks/derive_params_formulas.yaml to calculate the derived
parameters.
NOTE
The derive_params.yaml workbook assumes all nodes for a particular composable role have the same
hardware specifications. The workflow considers the flavor-profile association and nova placement
scheduler to match nodes associated with a role, then uses the introspection data from the first node
that matches the role.
For more information about Workflows, see Troubleshooting Workflows and Executions
You can use the -p or --plan-environment-file option to add a custom plan_environment.yaml file,
containing a list of workbooks and any input values, to the openstack overcloud deploy command. The
resultant workflows merge the derived parameters back into the custom plan_environment.yaml,
where they are available for the overcloud deployment.
For details on how to use the --plan-environment-file option in your deployment, see Plan Environment
Metadata.
The workflows can automatically derive the following parameters for OVS-DPDK. The NovaVcpuPinSet
parameter is now deprecated, and is replaced by NovaComputeCpuDedicatedSet for dedicated,
pinned workflows:
IsolCpusList
KernelArgs
NovaReservedHostMemory
NovaComputeCpuDedicatedSet
OvsDpdkSocketMemory
OvsPmdCoreList
NOTE
To avoid errors, you must configure role-specific tagging for role-specific parameters.
49
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
The OvsDpdkMemoryChannels parameter cannot be derived from the introspection memory bank
data because the format of memory slot names are inconsistent across different hardware
environments.
In most cases, the default number of OvsDpdkMemoryChannels is four. Consult your hardware manual
to determine the number of memory channels per socket, and update the default number with this
value.
For more information about workflow parameters, see Section 8.1, “Deriving DPDK parameters with
workflows”.
NOTE
NOTE
Always pair CPU sibling threads, or logical CPUs, together in the physical core when
allocating CPU cores.
For details on how to determine the CPU and NUMA nodes on your Compute nodes, see Discovering
your NUMA node topology. Use this information to map CPU and other parameters to support the host,
guest instance, and OVS-DPDK process needs.
OvsPmdCoreList
Provides the CPU cores that are used for the DPDK poll mode drivers (PMD). Choose CPU cores
that are associated with the local NUMA nodes of the DPDK interfaces. Use OvsPmdCoreList for
the pmd-cpu-mask value in OVS. Use the following recommendations for OvsPmdCoreList:
Performance depends on the number of physical cores allocated for this PMD Core list. On
the NUMA node which is associated with DPDK NIC, allocate the required cores.
For NUMA nodes with a DPDK NIC, determine the number of physical cores required based
on the performance requirement, and include all the sibling threads or logical CPUs for each
physical core.
For NUMA nodes without DPDK NICs, allocate the sibling threads or logical CPUs of any
physical core except the first physical core of the NUMA node.
NOTE
50
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
NOTE
You must reserve DPDK PMD threads on both NUMA nodes, even if a NUMA node does
not have an associated DPDK NIC.
NovaComputeCpuDedicatedSet
A comma-separated list or range of physical host CPU numbers to which processes for pinned
instance CPUs can be scheduled. For example, NovaComputeCpuDedicatedSet: [4-12,^8,15]
reserves cores from 4-12 and 15, excluding 8.
NovaComputeCpuSharedSet
A comma-separated list or range of physical host CPU numbers used to determine the host CPUs
for instance emulator threads.
IsolCpusList
A set of CPU cores isolated from the host processes. IsolCpusList is the isolated_cores value in
the cpu-partitioning-variable.conf file for the tuned-profiles-cpu-partitioning component. Use the
following recommendations for IsolCpusList:
DerivePciWhitelistEnabled
To reserve virtual functions (VF) for VMs, use the NovaPCIPassthrough parameter to create a list
of VFs passed through to Nova. VFs excluded from the list remain available for the host.
For each VF in the list, populate the address parameter with a regular expression that resolves to the
address value.
The following is an example of the manual list creation process. If NIC partitioning is enabled in a
device named eno2, list the PCI addresses of the VFs with the following command:
In this case, the VFs 0, 4, and 6 are used by eno2 for NIC Partitioning. Manually configure
NovaPCIPassthrough to include VFs 1-3, 5, and 7, and consequently exclude VFs 0,4, and 6, as in
the following example:
NovaPCIPassthrough:
- physical_network: "sriovnet2"
51
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
OvsDpdkMemoryChannels
Maps memory channels in the CPU per NUMA node. OvsDpdkMemoryChannels is the
other_config:dpdk-extra="-n <value>" value in OVS. Observe the following recommendations for
OvsDpdkMemoryChannels:
Use dmidecode -t memory or your hardware manual to determine the number of memory
channels available.
Divide the number of memory channels available by the number of NUMA nodes.
NovaReservedHostMemory
Reserves memory in MB for tasks on the host. NovaReservedHostMemory is the
reserved_host_memory_mb value for the Compute node in nova.conf. Observe the following
recommendation for NovaReservedHostMemory:
OvsDpdkSocketMemory
Specifies the amount of memory in MB to pre-allocate from the hugepage pool, per NUMA node.
OvsDpdkSocketMemory is the other_config:dpdk-socket-mem value in OVS. Observe the
following recommendations for OvsDpdkSocketMemory:
For a NUMA node without a DPDK NIC, use the static recommendation of 1024 MB (1GB)
Calculate the OvsDpdkSocketMemory value from the MTU value of each NIC on the NUMA
node.
Add the MEMORY_REQD_PER_MTU for each of the MTU values set on the NUMA node and
add another 512 MB as buffer. Round the value up to a multiple of 1024.
NOTE
52
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
NOTE
If the MTU size is not 1500, you might get a Failed to create memory pool error
message in /var/log/messages. You can ignore this error message if it occurs at instance
start up. To avoid this message, add the extra OvsDpdkSocketMemory amount for 1500
MTU onto your OvsDpdkSocketMemory calculation.
1. Round off the MTU values to the nearest multiple of 1024 bytes.
2. Calculate the required memory for each MTU value based on these rounded byte values.
This calculation represents (Memory required for MTU of 9000) + (Memory required for MTU
of 2000) + (512 MB buffer).
OvsDpdkSocketMemory: "4096,1024"
1. Round off the MTU values to the nearest multiple of 1024 bytes.
2. Calculate the required memory for each MTU value based on these rounded byte values.
53
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
This calculation represents (Memory required for MTU of 2000) + (512 MB buffer).
OvsDpdkSocketMemory: "2048,1024"
hugepagesz: Sets the size of the huge pages on a CPU. This value can vary depending on
the CPU hardware. Set to 1G for OVS-DPDK deployments (default_hugepagesz=1GB
hugepagesz=1G). Use this command to check for the pdpe1gb CPU flag that confirms your
CPU supports 1G.
hugepages count: Sets the number of huge pages available based on available host
54
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
hugepages count: Sets the number of huge pages available based on available host
memory. Use most of your available memory, except NovaReservedHostMemory. You must
also configure the huge pages count value within the flavor of your Compute nodes.
isolcpus: Sets the CPU cores for tuning. This value matches IsolCpusList.
For more information about CPU isolation, see the Red Hat Knowledgebase solution OpenStack
CPU isolation guidance for RHEL 8 and RHEL 9
DdpPackage
Configures Dynamic Device Personalization (DDP), to apply a profile package to a device at
deployment to change the packet processing pipeline of the device. Add the following lines to your
network_environment.yaml template to include the DDP package:
parameter_defaults:
ComputeOvsDpdkSriovParameters:
DdpPackage: "ddp-comms"
hw:cpu_policy
When this parameter is set to dedicated, the guest uses pinned CPUs. Instances created from a
flavor with this parameter set have an effective overcommit ratio of 1:1. The default value is shared.
hw:mem_page_size
Set this parameter to a valid string of a specific value with standard suffix (For example, 4KB, 8MB, or
1GB). Use 1GB to match the hugepagesz boot parameter. Calculate the number of huge pages
available for the virtual machines by subtracting OvsDpdkSocketMemory from the boot parameter.
The following values are also valid:
large - Only use large page sizes. (2MB or 1GB on x86 architectures)
any - The compute driver can attempt to use large pages, but defaults to small if none
available.
hw:emulator_threads_policy
Set the value of this parameter to share so that emulator threads are locked to CPUs that you’ve
identified in the heat parameter, NovaComputeCpuSharedSet. If an emulator thread is running on a
vCPU with the poll mode driver (PMD) or real-time processing, you can experience negative effects,
such as packet loss.
NUMA 0 has cores 0-7. The sibling thread pairs are (0,1), (2,3), (4,5), and (6,7)
55
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NUMA 1 has cores 8-15. The sibling thread pairs are (8,9), (10,11), (12,13), and (14,15).
Each NUMA node connects to a physical NIC, namely NIC1 on NUMA 0, and NIC2 on NUMA 1.
NOTE
Reserve the first physical cores or both thread pairs on each NUMA node (0,1 and 8,9)
for non-datapath DPDK processes.
This example also assumes a 1500 MTU configuration, so the OvsDpdkSocketMemory is the same for
all use cases:
OvsDpdkSocketMemory: "1024,1024"
OvsPmdCoreList: "2,3,10,11"
NovaComputeCpuDedicatedSet: "4,5,6,7,12,13,14,15"
OvsPmdCoreList: "2,3,4,5,10,11"
NovaComputeCpuDedicatedSet: "6,7,12,13,14,15"
OvsPmdCoreList: "2,3,10,11"
NovaComputeCpuDedicatedSet: "4,5,6,7,12,13,14,15"
In this use case, you allocate two physical cores on NUMA 1 for PMD. You must also allocate one physical
56
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
In this use case, you allocate two physical cores on NUMA 1 for PMD. You must also allocate one physical
core on NUMA 0, even though DPDK is not enabled on the NIC for that NUMA node. The remaining
cores are allocated for guest instances. The resulting parameter settings are:
OvsPmdCoreList: "2,3,10,11,12,13"
NovaComputeCpuDedicatedSet: "4,5,6,7,14,15"
NIC 1 and NIC2 for DPDK, with two physical cores for PMD
In this use case, you allocate two physical cores on each NUMA node for PMD. The remaining cores are
allocated for guest instances. The resulting parameter settings are:
OvsPmdCoreList: "2,3,4,5,10,11,12,13"
NovaComputeCpuDedicatedSet: "6,7,14,15"
In the OVS-DPDK deployment, the VNFs operate with inbuilt DPDK that supports the physical
interface. OVS-DPDK enables bonding at the vSwitch level. For improved performance in your OVS-
DPDK deployment, it is recommended that you separate kernel and OVS-DPDK NICs. To separate the
management (mgt) network, connected to the Base provider network for the virtual machine, ensure
you have additional NICs. The Compute node consists of two regular NICs for the Red Hat OpenStack
Platform API management that can be reused by the Ceph API but cannot be shared with any
OpenStack project.
57
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
58
CHAPTER 7. PLANNING YOUR OVS-DPDK DEPLOYMENT
59
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
You must install and configure the undercloud before you can deploy the overcloud. See the Director
Installation and Usage Guide for details.
IMPORTANT
You must determine the best values for the OVS-DPDK parameters found in the
network-environment.yaml file to optimize your OpenStack network for OVS-DPDK.
NOTE
IMPORTANT
This feature is available in this release as a Technology Preview, and therefore is not fully
supported by Red Hat. It should only be used for testing, and should not be deployed in a
production environment. For more information about Technology Preview features, see
Scope of Coverage Details.
See Section 7.2, “Workflows and derived parameters” for an overview of the Mistral workflow for DPDK.
Prerequisites
You must have bare metal introspection, including hardware inspection extras (inspection_extras)
enabled to provide the data retrieved by this workflow. Hardware inspection extras are enabled by
default. For more information about hardware of the nodes, see: Inspecting the hardware of nodes .
num_phy_cores_per_numa_node_for_pmd
This input parameter specifies the required minimum number of cores for the NUMA node
associated with the DPDK NIC. One physical core is assigned for the other NUMA nodes not
associated with DPDK NIC. Ensure that this parameter is set to 1.
huge_page_allocation_percentage
This input parameter specifies the required percentage of total memory, excluding
NovaReservedHostMemory, that can be configured as huge pages. The KernelArgs parameter is
derived using the calculated huge pages based on the huge_page_allocation_percentage
specified. Ensure that this parameter is set to 50.
The workflows calculate appropriate DPDK parameter values from these input parameters and the bare-
metal introspection details.
60
CHAPTER 8. CONFIGURING AN OVS-DPDK DEPLOYMENT
workflow_parameters:
tripleo.derive_params.v1.derive_parameters:
# DPDK Parameters #
# Specifies the minimum number of CPU physical cores to be allocated for DPDK
# PMD threads. The actual allocation will be based on network config, if
# the a DPDK port is associated with a numa node, then this configuration
# will be used, else 1.
num_phy_cores_per_numa_node_for_pmd: 1
# Amount of memory to be configured as huge pages in percentage. Ouf the
# total available memory (excluding the NovaReservedHostMemory), the
# specified percentage of the remaining is configured as huge pages.
huge_page_allocation_percentage: 50
2. Run the openstack overcloud deploy command and include the following information:
The role file and all environment files specific to your environment
The output of this command shows the derived results, which are also merged into the plan-
environment.yaml file.
61
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NovaComputeCpuDedicatedSet: 2,3,4,5,6,7,18,19,20,21,22,23,10,11,12,13,14,15,26,27,28,29,30,31
OvsDpdkMemoryChannels: 4
OvsDpdkSocketMemory: 1024,1024
OvsPmdCoreList: 1,17,9,25
NOTE
1. Copy the derived parameters from the deploy command output to the network-
environment.yaml file.
NOTE
These parameters apply to the specific role, ComputeOvsDpdk. You can apply
these parameters globally, but role-specific parameters overwrite any global
parameters.
2. Deploy the overcloud using the role file and all environment files specific to your environment.
NOTE
With Red Hat OpenStack Platform, you can create custom deployment roles, using the composable
62
CHAPTER 8. CONFIGURING AN OVS-DPDK DEPLOYMENT
With Red Hat OpenStack Platform, you can create custom deployment roles, using the composable
roles feature to add or remove services from each role. For more information on Composable Roles, see
Composable Services and Custom Roles in Advanced Overcloud Customization.
This image shows a example OVS-DPDK topology with two bonded ports for the control plane and data
plane:
If you use composable roles, copy and modify the roles_data.yaml file to add the custom role
for OVS-DPDK.
Update the compute.yaml file to include the bridge for DPDK interface parameters.
Update the controller.yaml file to include the same bridge details for DPDK interface
parameters.
63
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
Run the overcloud_deploy.sh script to deploy the overcloud with the DPDK parameters.
NOTE
This guide provides examples for CPU assignments, memory allocation, and NIC
configurations that can vary from your topology and use case. For more information on
hardware and configuration options, see: Network Functions Virtualization Product Guide
and Chapter 2, Hardware requirements .
Prerequisites
OVS 2.10
DPDK 17
A supported NIC. To view the list of supported NICs for NFV, see Section 2.1, “Tested NICs”.
NOTE
The Red Hat OpenStack Platform operates in OVS client mode for OVS-DPDK
deployments.
Set the global MTU value for networking in the network-environment.yaml file.
Set the physical DPDK port MTU value in the compute.yaml file. This value is also used by the
vhost user interface.
Set the MTU value within any guest instances on the Compute node to ensure that you have a
comparable MTU value from end to end in your configuration.
NOTE
VXLAN packets include an extra 50 bytes in the header. Calculate your MTU
requirements based on these additional header bytes. For example, an MTU value of
9000 means the VXLAN tunnel MTU value is 8950 to account for these extra bytes.
NOTE
You do not need any special configuration for the physical NIC because the NIC is
controlled by the DPDK PMD, and has the same MTU value set by the compute.yaml file.
You cannot set an MTU value larger than the maximum value supported by the physical
NIC.
64
CHAPTER 8. CONFIGURING AN OVS-DPDK DEPLOYMENT
parameter_defaults:
# MTU global configuration
NeutronGlobalPhysnetMtu: 9000
NOTE
2. Set the MTU value on the bridge to the Compute node in the controller.yaml file.
-
type: ovs_bridge
name: br-link0
use_dhcp: false
members:
-
type: interface
name: nic3
mtu: 9000
3. Set the MTU values for an OVS-DPDK bond in the compute.yaml file:
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
rx_queue: 2
members:
- type: ovs_dpdk_port
name: dpdk0
mtu: 9000
members:
- type: interface
name: nic4
- type: ovs_dpdk_port
name: dpdk1
mtu: 9000
members:
- type: interface
name: nic5
65
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
environment.yaml file under parameter_defaults. In an OVN deployment, you can implement security
groups with Access Control Lists (ACL).
You cannot use the OVS firewall driver with HW offload because the connection tracking properties of
the flows are unsupported in the offload path.
Example:
parameter_defaults:
NeutronOVSFirewallDriver: openvswitch
Use the openstack port set command to disable the OVS firewall driver for dataplane interfaces.
Example:
NOTE
Procedure
To set the same number of queues for interfaces in OVS-DPDK on the Compute node, modify
the compute.yaml file:
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
rx_queue: 2
members:
- type: ovs_dpdk_port
name: dpdk0
mtu: 9000
members:
- type: interface
name: nic4
- type: ovs_dpdk_port
name: dpdk1
mtu: 9000
members:
- type: interface
name: nic5
IMPORTANT
66
CHAPTER 8. CONFIGURING AN OVS-DPDK DEPLOYMENT
IMPORTANT
This feature is available in this release as a Technology Preview, and therefore is not fully
supported by Red Hat. It should only be used for testing, and should not be deployed in a
production environment. For more information about Technology Preview features, see
Scope of Coverage Details.
You can use Open vSwitch (OVS) Poll Mode Driver (PMD) threads to perform the following tasks for
user space context switching:
You can configure your RHOSP deployment to automatically load balance the OVS PMD threads with
the following parameters:
OvsPmdAutoLb
OvsPmdLoadThreshold
OvsPmdImprovementThreshold
OvsPmdRebalInterval
Procedure
1. Change the value of the OvsPmdAutoLb parameter to true to enable automatic PMD load
balancing:
parameter_defaults:
OvsPmdAutoLb: true
2. Specify the percentage limit of used cycles that triggers the PMD load balance with the
OvsPmdLoadThreshold parameter:
parameter_defaults:
OvsPmdAutoLb: true
OvsPmdLoadThreshold: <load_threshold>
Replace <load_threshold> with a number between 0 and 100, to represent the minimum
percentage of PMD thread load that triggers the automatic load balancing.
3. Specify the minimum percentage of evaluated improvement across the non-isolated PMD
threads that triggers a PMD Auto Load Balance OvsPmdImprovementThreshold parameter:
parameter_defaults:
OvsPmdAutoLb: true
OvsPmdLoadThreshold: <load_threshold>
OvsPmdImprovementThreshold: <improvement_threshold>
67
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
4. Specify the minimum time between two consecutive PMD Auto Load Balance operations with
the OvsPmdRebalInterval parameter:
parameter_defaults:
OvsPmdAutoLb: true
OvsPmdLoadThreshold: <load_threshold>
OvsPmdImprovementThreshold: <improvement_threshold>
OvsPmdRebalInterval: <interval>
Replace <interval> with a number between 0 and 20,000, to represent the time in minutes.
5. Add your OVS PMD environment file to the stack with your other environment files, and deploy
the overcloud:
Use Linux bonds for non-DPDK traffic, and control plane networks, such as Internal,
Management, Storage, Storage Management, and Tenant. Ensure that both the PCI devices
used in the bond are on the same NUMA node for optimum performance. Neutron Linux bridge
configuration is not supported by Red Hat.
You require huge pages for every instance running on the hosts with OVS-DPDK. If huge pages
are not present in the guest, the interface appears but does not function.
With OVS-DPDK, there is a performance degradation of services that use tap devices, such as
Distributed Virtual Routing (DVR). The resulting performance is not suitable for a production
environment.
When using OVS-DPDK, all bridges on the same Compute node must be of type
ovs_user_bridge. The director may accept the configuration, but Red Hat OpenStack Platform
does not support mixing ovs_bridge and ovs_user_bridge on the same node.
1. Create an aggregate group, and add relevant hosts for OVS-DPDK. Define metadata, for
example dpdk=true, that matches defined flavor metadata.
NOTE
68
CHAPTER 8. CONFIGURING AN OVS-DPDK DEPLOYMENT
NOTE
Pinned CPU instances can be located on the same Compute node as unpinned
instances. For more information, see Configuring CPU pinning on Compute
nodes in the Configuring the Compute Service for Instance Creation guide.
2. Create a flavor.
# openstack flavor create <flavor> --ram <MB> --disk <GB> --vcpus <#>
3. Set flavor properties. Note that the defined metadata, dpdk=true, matches the defined
metadata in the DPDK aggregate.
For details about the emulator threads policy for performance improvements, see Configuring
emulator threads.
6. Deploy an instance.
# openstack server create --flavor <flavor> --image <glance image> --nic net-id=<network
ID> <server_name>
1. Review the bridge configuration, and confirm that the bridge has datapath_type=netdev.
69
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
mcast_snooping_enable: false
mirrors : []
name : "br0"
netflow : []
other_config : {}
ports : [52725b91-de7f-41e7-bb49-3b7e50354138]
protocols : []
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
2. Optionally, you can view logs for errors, such as if the container fails to start.
# less /var/log/containers/neutron/openvswitch-agent.log
3. Confirm that the Poll Mode Driver CPU mask of the ovs-dpdk is pinned to the CPUs. In case of
hyper threading, use sibling CPUs.
For example, to check the sibling of CPU4, run the following command:
# cat /sys/devices/system/cpu/cpu4/topology/thread_siblings_list
4,20
The sibling of CPU4 is CPU20, therefore proceed with the following command:
70
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
You can separate emulator threads from VM processing tasks by pinning the threads to their own guest
CPUs, increasing performance as a result.
Procedure
1. Deploy an overcloud with NovaComputeCpuSharedSet defined for a given role. The value of
NovaComputeCpuSharedSet applies to the cpu_shared_set parameter in the nova.conf file
for hosts within that role.
parameter_defaults:
ComputeOvsDpdkParameters:
NovaComputeCpuSharedSet: "0-1,16-17"
NovaComputeCpuDedicatedSet: "2-15,18-31"
2. Create a flavor to build instances with emulator threads separated into a shared pool.
openstack flavor create --ram <size_mb> --disk <size_gb> --vcpus <vcpus> <flavor>
3. Add the hw:emulator_threads_policy extra specification, and set the value to share. Instances
created with this flavor will use the instance CPUs defined in the cpu_share_set parameter in
the nova.conf file.
NOTE
You must set the cpu_share_set parameter in the nova.conf file to enable the share
policy for this extra specification. You should use heat for this preferably, as editing
nova.conf manually might not persist across redeployments.
71
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
ssh heat-admin@compute-1
[compute-1]$ sudo virsh dumpxml instance-00001 | grep `'emulatorpin cpuset'`
A real-time Compute node role that provisions Red Hat Enterprise Linux for real-time.
For details on how to enable the rhel-8-server-nfv-rpms repository for RT-KVM, and ensuring your
system is up to date, see: Registering and updating your undercloud
NOTE
You need a separate subscription to a Red Hat OpenStack Platform for Real Time SKU
before you can access this repository.
1. Install the libguestfs-tools package on the undercloud to get the virt-customize tool:
IMPORTANT
72
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
4. Register your image to enable Red Hat repositories relevant to your customizations. Replace
[username] and [password] with valid credentials in the following example.
NOTE
For security, you can remove credentials from the history file if they are used on
the command prompt. You can delete individual lines in history using the history
-d command followed by the line number.
5. Find a list of pool IDs from your account’s subscriptions, and attach the appropriate pool ID to
your image.
6. Add the repositories necessary for Red Hat OpenStack Platform with NFV.
set -eux
NOTE
73
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NOTE
If you see the following line in the rt.sh script output, "grubby fatal error:
unable to find a suitable template", you can ignore this error.
9. Examine the virt-customize.log file that resulted from the previous command, to check that
the packages installed correctly using the rt.sh script .
NOTE
The software version in the vmlinuz and initramfs filenames vary with the kernel
version.
You now have a real-time image you can use with the ComputeOvsDpdkRT composable role on your
selected Compute nodes.
74
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
Power Management
Hyper-Threading
Logical processors
See Setting BIOS parameters for descriptions of these settings and the impact of disabling them. See
your hardware manufacturer documentation for complete details on how to change BIOS settings.
NOTE
You must 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.
For more details, see Section 8.1, “Deriving DPDK parameters with workflows” .
Use the ComputeOvsDpdkRT role to specify Compute nodes for the real-time compute image.
IMPORTANT
Determine the best values for the OVS-DPDK parameters in the network-
environment.yaml file to optimize your deployment. For more information, see
Section 8.1, “Deriving DPDK parameters with workflows” .
1. Add the NIC configuration for the OVS-DPDK role you use under resource_registry:
resource_registry:
# Specify the relative/absolute path to the config files you want to use for override the
default.
OS::TripleO::ComputeOvsDpdkRT::Net::SoftwareConfig: nic-configs/compute-ovs-
dpdk.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
75
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
"1,2,3,4,5,6,7,9,10,17,18,19,20,21,22,23,11,12,13,14,15,25,26,27,28,29,30,31"
NovaComputeCpuDedicatedSet:
['2,3,4,5,6,7,18,19,20,21,22,23,10,11,12,13,14,15,26,27,28,29,30,31']
NovaReservedHostMemory: 4096
OvsDpdkSocketMemory: "1024,1024"
OvsDpdkMemoryChannels: "4"
OvsPmdCoreList: "1,17,9,25"
VhostuserSocketGroup: "hugetlbfs"
ComputeOvsDpdkRTImage: "overcloud-realtime-compute"
# openstack server create --image <rhel> --flavor r1.small --nic net-id=<dpdk-net> test-rt
3. To verify that the instance uses the assigned emulator threads, run the following command:
76
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
Procedure
Complete the following steps to configure and deploy the overcloud with trust between physical and
virtual functions:
parameter_defaults:
NeutronPhysicalDevMappings:
- sriov2:p5p2
parameter_defaults:
NeutronPhysicalDevMappings:
- sriov2:p5p2
NovaPCIPassthrough:
- vendor_id: "8086"
product_id: "1572"
physical_network: "sriov2"
trusted: "true"
NOTE
You must include double quotation marks around the value "true".
IMPORTANT
parameter_defaults:
NeutronApiPolicies: {
operator_create_binding_profile: { key: 'create_port:binding:profile', value:
'rule:admin_or_network_owner'},
operator_get_binding_profile: { key: 'get_port:binding:profile', value:
'rule:admin_or_network_owner'},
operator_update_binding_profile: { key: 'update_port:binding:profile', value:
'rule:admin_or_network_owner'}
}
77
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
2. Create a subnet.
3. Create a port. Set the vnic-type option to direct, and the binding-profile option to true.
openstack server create --image rhel --flavor dpdk --network internal --port
trusted_vf_network_port_trusted --config-drive True --wait rhel-dpdk-sriov_trusted
1. On the compute node that you created the instance, enter the following command:
# ip link
7: p5p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP mode
DEFAULT group default qlen 1000
link/ether b4:96:91:1c:40:fa brd ff:ff:ff:ff:ff:ff
vf 6 MAC fa:16:3e:b8:91:c2, vlan 111, spoof checking off, link-state auto, trust on,
query_rss off
vf 7 MAC fa:16:3e:84:cf:c8, vlan 111, spoof checking off, link-state auto, trust off, query_rss
off
2. Verify that the trust status of the VF is trust on. The example output contains details of an
environment that contains two ports. Note that vf 6 contains the text trust on.
3. You can disable spoof checking if you set port_security_enabled: false in the Networking
service (neutron) network, or if you include the argument --disable-port-security when you run
the openstack port create command.
a network interrupt
a SMI
78
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
To prevent packet loss, increase the queue size from the default of 512 to a maximum of 1024.
Prerequisites
To configure RX, ensure that you have libvirt v2.3 and QEMU v2.7.
To configure TX, ensure that you have libvirt v3.7 and QEMU v2.10.
Procedure
To increase the RX and TX queue size, include the following lines to the parameter_defaults:
section of a relevant director role. Here is an example with ComputeOvsDpdk role:
parameter_defaults:
ComputeOvsDpdkParameters:
-NovaLibvirtRxQueueSize: 1024
-NovaLibvirtTxQueueSize: 1024
Testing
You can observe the values for RX queue size and TX queue size in the nova.conf file:
[libvirt]
rx_queue_size=1024
tx_queue_size=1024
You can check the values for RX queue size and TX queue size in the VM instance XML file
generated by libvirt on the compute host.
<devices>
<interface type='vhostuser'>
<mac address='56:48:4f:4d:5e:6f'/>
<source type='unix' path='/tmp/vhost-user1' mode='server'/>
<model type='virtio'/>
<driver name='vhost' rx_queue_size='1024' tx_queue_size='1024' />
<address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
</interface>
</devices>
To verify the values for RX queue size and TX queue size, use the following command on a KVM
host:
You can check for improved performance, such as 3.8 mpps/core at 0 frame loss.
IMPORTANT
79
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
IMPORTANT
This feature is available in this release as a Technology Preview, and therefore is not fully
supported by Red Hat. It should only be used for testing, and should not be deployed in a
production environment. For more information about Technology Preview features, see
Scope of Coverage Details.
Before you implement a NUMA-aware vSwitch, examine the following components of your hardware
configuration:
Memory-mapped I/O (MMIO) devices, such as PCIe NICs, are associated with specific NUMA nodes.
When a VM and the NIC are on different NUMA nodes, there is a significant decrease in performance. To
increase performance, align PCIe NIC placement and instance processing on the same NUMA node.
Use this feature to ensure that instances that share a physical network are located on the same NUMA
node. To optimize utilization of datacenter hardware, you must use multiple physnets.
WARNING
To prevent a cross-NUMA configuration, place the VM on the correct NUMA node, by providing the
location of the NIC to Nova.
Prerequisites
Procedure
If you use tunnels, such as VxLAN or GRE, you must also set the NeutronTunnelNUMANodes
parameter.
parameter_defaults:
NeutronPhysnetNUMANodesMapping: {<physnet_name>: [<NUMA_NODE>]}
NeutronTunnelNUMANodes: <NUMA_NODE>,<NUMA_NODE>
80
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
parameter_defaults:
NeutronBridgeMappings:
- tenant:br-link0
NeutronPhysnetNUMANodesMapping: {tenant: [1], mgmt: [0,1]}
NeutronTunnelNUMANodes: 0
In the below example, assign the physnet of the device named eno2 to NUMA number 0.
# ethtool -i eno2
bus-info: 0000:18:00.1
# cat /sys/devices/pci0000:16/0000:16:02.0/0000:18:00.1/numa_node
0
NeutronBridgeMappings: 'physnet1:br-physnet1'
NeutronPhysnetNUMANodesMapping: {physnet1: [0] }
- type: ovs_user_bridge
name: br-physnet1
mtu: 9000
members:
- type: ovs_dpdk_port
name: dpdk2
members:
- type: interface
name: eno2
[neutron_physnet_tenant]
numa_nodes=1
[neutron_tunnel]
numa_nodes=1
$ lscpu
Known Limitations
You cannot start a VM that has two NICs connected to physnets on different NUMA nodes, if
you did not specify a two-node guest NUMA topology.
You cannot start a VM that has one NIC connected to a physnet and another NIC connected to
81
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
You cannot start a VM that has one NIC connected to a physnet and another NIC connected to
a tunneled network on different NUMA nodes, if you did not specify a two-node guest NUMA
topology.
You cannot start a VM that has one vhost port and one VF on different NUMA nodes, if you did
not specify a two-node guest NUMA topology.
NUMA-aware vSwitch parameters are specific to overcloud roles. For example, Compute node 1
and Compute node 2 can have different NUMA topologies.
If the interfaces of a VM have NUMA affinity, ensure that the affinity is for a single NUMA node
only. You can locate any interface without NUMA affinity on any NUMA node.
Configure NUMA affinity for data plane networks, not management networks.
NUMA affinity for tunneled networks is a global setting that applies to all VMs.
For more information about hyper-converged infrastructure (HCI), see: Hyper Converged Infrastructure
Guide
Prerequisites
Procedure
3. Create and configure a new flavor with the openstack flavor create and openstack flavor set
82
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
3. Create and configure a new flavor with the openstack flavor create and openstack flavor set
commands. For more information about creating a flavor, see Creating a new role in the
Advanced Overcloud Customization Guide.
4. Deploy the overcloud with the custom roles_data.yaml file that you generated.
CPU allocation:
NUMA-0 NUMA-1
Number of Ceph OSDs * 4 HT Guest vCPU for the VNF and non-NFV VMs
NUMA-0 NUMA-1
nova 5,7,9,11,13,15,17,19,21,23,25,27,29,31,
33,35,37,39,41,43,49,51,53,55,57,
59,61,63,65,67,69,71,73,75,77,79,
81,83,85,87
parameter_defaults:
83
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
CephPoolDefaultSize: 3
CephPoolDefaultPgNum: 64
CephPools:
- {"name": backups, "pg_num": 128, "pgp_num": 128, "application": "rbd"}
- {"name": volumes, "pg_num": 256, "pgp_num": 256, "application": "rbd"}
- {"name": vms, "pg_num": 64, "pgp_num": 64, "application": "rbd"}
- {"name": images, "pg_num": 32, "pgp_num": 32, "application": "rbd"}
CephConfigOverrides:
osd_recovery_op_priority: 3
osd_recovery_max_active: 3
osd_max_backfills: 1
CephAnsibleExtraConfig:
nb_retry_wait_osd_up: 60
delay_wait_osd_up: 20
is_hci: true
# 3 OSDs * 4 vCPUs per SSD = 12 vCPUs (list below not used for VNF)
ceph_osd_docker_cpuset_cpus: "32,34,36,38,40,42,76,78,80,82,84,86" # 1
# cpu_limit 0 means no limit as we are limiting CPUs with cpuset above
ceph_osd_docker_cpu_limit: 0 # 2
# numactl preferred to cross the numa boundary if we have to
# but try to only use memory from numa node0
# cpuset-mems would not let it cross numa boundary
# lots of memory so NUMA boundary crossing unlikely
ceph_osd_numactl_opts: "-N 0 --preferred=0" # 3
CephAnsibleDisksConfig:
osds_per_device: 1
osd_scenario: lvm
osd_objectstore: bluestore
devices:
- /dev/sda
- /dev/sdb
- /dev/sdc
Assign CPU resources for ceph OSD processes with the following parameters. Adjust the values based
on the workload and hardware in this hyperconverged environment.
1 ceph_osd_docker_cpuset_cpus: Allocate 4 CPU threads for each OSD for SSD disks, or 1 CPU for
each OSD for HDD disks. Include the list of cores and sibling threads from the NUMA node
associated with ceph, and the CPUs not found in the three lists: NovaComputeCpuDedicatedSet,
and OvsPmdCoreList.
2 ceph_osd_docker_cpu_limit: Set this value to 0, to pin the ceph OSDs to the CPU list from
ceph_osd_docker_cpuset_cpus.
parameter_defaults:
ComputeHCIParameters:
KernelArgs: "default_hugepagesz=1GB hugepagesz=1G hugepages=240 intel_iommu=on
iommu=pt # 1
isolcpus=2,46,3,47,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,49,51,53,55,57,59,61,63,
84
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
65,67,69,71,73,75,77,79,81,83,85,87"
TunedProfileName: "cpu-partitioning"
IsolCpusList: # 2
”2,46,3,47,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,49,51,
53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87"
VhostuserSocketGroup: hugetlbfs
OvsDpdkSocketMemory: "4096,4096" # 3
OvsDpdkMemoryChannels: "4"
OvsPmdCoreList: "2,46,3,47" # 4
2 IsolCpusList: Assign a set of CPU cores that you want to isolate from the host processes with this
parameter. Add the value of the OvsPmdCoreList parameter to the value of the
NovaComputeCpuDedicatedSet parameter to calculate the value for the IsolCpusList
parameter.
4 OvsPmdCoreList: Specify the CPU cores that are used for the DPDK poll mode drivers (PMD) with
this parameter. Choose CPU cores that are associated with the local NUMA nodes of the DPDK
interfaces. Allocate 2 HT sibling threads for each NUMA node to calculate the value for the
OvsPmdCoreList parameter.
parameter_defaults:
ComputeHCIExtraConfig:
nova::cpu_allocation_ratio: 16 # 2
NovaReservedHugePages: # 1
- node:0,size:1GB,count:4
- node:1,size:1GB,count:4
NovaReservedHostMemory: 123904 # 2
# All left over cpus from NUMA-1
NovaComputeCpuDedicatedSet: # 3
['5','7','9','11','13','15','17','19','21','23','25','27','29','31','33','35','37','39','41','43','49','51','|
53','55','57','59','61','63','65','67','69','71','73','75','77','79','81','83','85','87
4GB for general host processing. Ensure that you allocate sufficient memory to prevent
85
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
4GB for general host processing. Ensure that you allocate sufficient memory to prevent
potential performance degradation caused by cross-NUMA OSD operation.
Disk controller
Storage networks
Allocate another NUMA node for the following functions of the DPDK provider network:
NIC
PMD CPUs
Socket memory
IMPORTANT
This feature is available in this release as a Technology Preview, and therefore is not fully
supported by Red Hat. It should only be used for testing, and should not be deployed in a
production environment. For more information about Technology Preview features, see
Scope of Coverage Details.
86
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
Red Hat OpenStack Platform (RHOSP) includes support for Precision Time Protocol (PTP) and
Network Time Protocol (NTP). You can use NTP to synchronize clocks in your network in the millisecond
range, and you can use PTP to synchronize clocks to a higher, sub-microsecond, accuracy. An example
use case for PTP is a virtual radio access network (vRAN) that contains multiple antennas which provide
higher throughput with more risk of interference.
Timemaster is a program that uses ptp4l and phc2sys in combination with chronyd or ntpd to
synchronize the system clock to NTP and PTP time sources. The phc2sys and ptp4l programs use
Shared Memory Driver (SHM) reference clocks to send PTP time to chronyd or ntpd, which compares
the time sources to synchronize the system clock.
The implementation of the PTPv2 protocol in the Red Hat Enterprise Linux (RHEL) kernel is linuxptp.
The linuxptp package includes the ptp4l program for PTP boundary clock and ordinary clock
synchronization, and the phc2sys program for hardware time stamping. For more information about
PTP, see: Introduction to PTP in the Red Hat Enterprise Linux System Administrator’s Guide .
Chrony is an implementation of the NTP protocol. The two main components of Chrony are chronyd,
which is the Chrony daemon, and chronyc which is the Chrony command line interface. For more
information about Chrony, see: Using chrony to configure ntp in the Red Hat Enterprise Linux System
Administrator’s Guide.
The following image is a overview of a packet journey in the Compute node in a PTP configuration.
87
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
You have configured the switch to also function as a boundary or transparent clock.
You can verify the hardware timestamping with the command ethtool -T <device>.
$ ethtool -T p5p1
Time stamping parameters for p5p1:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 6
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
You can use either a transparent or boundary clock switch for better accuracy and less latency. You can
use an uplink switch for the boundary clock. The boundary clock switch uses an 8-bit correctionField on
the PTPv2 header to correct delay variations, and ensure greater accuracy on the end clock. In a
transparent clock switch, the end clock calculates the delay variation, not the correctionField.
88
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
Known limitations
Enable NTP for virtualized controllers, and enable PTP for bare metal nodes.
Virtio interfaces are incompatible, because ptp4l requires a compatible PTP device.
Use a physical function (PF) for a VM with SR-IOV. A virtual function (VF) does not expose the
registers necessary for PTP, and a VM uses kvm_ptp to calculate time.
High Availability (HA) interfaces with multiple sources and multiple network paths are
incompatible.
Procedure
1. To enable the Timemaster service on the nodes that belong to a role that you choose, replace
the line that contains OS::TripleO::Services::Timesync with the line
OS::TripleO::Services::TimeMaster in the roles_data.yaml file section for that role.
#- OS::TripleO::Services::Timesync
- OS::TripleO::Services::TimeMaster
2. Configure the heat parameters for the compute role that you use.
#Example
ComputeSriovParameters:
PTPInterfaces: ‘0:eno1,1:eno2’
PTPMessageTransport: ‘UDPv4’
3. Include the new environment file in the openstack overcloud deploy command with any other
environment files that are relevant to your environment:
…
-e <existing_overcloud_environment_files> \
-e <new_environment_file1> \
-e <new_environment_file2> \
…
Replace <new_environment_file> with the new environment file or files that you want to
include in the overcloud deployment process.
Verification
Use the command phc_ctl, installed with ptp4linux, to query the NIC hardware clock.
89
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
$ cat /etc/timemaster.conf
# Configuration file for timemaster
#[ntp_server ntp-server.local]
#minpoll 4
#maxpoll 4
[ptp_domain 0]
interfaces eno1
#ptp4l_setting network_transport l2
#delay 10e-6
[timemaster]
ntp_program chronyd
[chrony.conf]
#include /etc/chrony.conf
server clock.redhat.com iburst minpoll 6 maxpoll 10
[ntp.conf]
includefile /etc/ntp.conf
[ptp4l.conf]
#includefile /etc/ptp4l.conf
network_transport L2
[chronyd]
path /usr/sbin/chronyd
[ntpd]
path /usr/sbin/ntpd
options -u ntp:ntp -g
[phc2sys]
path /usr/sbin/phc2sys
#options -w
[ptp4l]
path /usr/sbin/ptp4l
#options -2 -i eno1
90
CHAPTER 9. TUNING A RED HAT OPENSTACK PLATFORM ENVIRONMENT
Memory: 5.1M
CGroup: /system.slice/timemaster.service
├─2573 /usr/sbin/timemaster -f /etc/timemaster.conf
├─2577 /usr/sbin/chronyd -n -f /var/run/timemaster/chrony.conf
├─2582 /usr/sbin/ptp4l -l 5 -f /var/run/timemaster/ptp4l.0.conf -H -i eno1
├─2583 /usr/sbin/phc2sys -l 5 -a -r -R 1.00 -z /var/run/timemaster/ptp4l.0.socket -t [0:eno1] -n
0 -E ntpshm -M 0
├─2587 /usr/sbin/ptp4l -l 5 -f /var/run/timemaster/ptp4l.1.conf -H -i eno2
└─2588 /usr/sbin/phc2sys -l 5 -a -r -R 1.00 -z /var/run/timemaster/ptp4l.1.socket -t [0:eno2] -n
0 -E ntpshm -M 1
91
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
IMPORTANT
In your roles configuration file, for example roles_data.yaml, comment out or remove the
line that contains OS::TripleO::Services::Tuned, when you generate the overcloud roles.
ServicesDefault:
# - OS::TripleO::Services::Tuned
When you have commented out or removed OS::TripleO::Services::Tuned, you can set
the TunedProfileName parameter to suit your requirements, for example "cpu-
partitioning". If you do not comment out or remove the line
OS::TripleO::Services::Tuned and redeploy, the TunedProfileName parameter gets
the default value of "throughput-performance", instead of any other value that you set.
For the purposes of this example, the ComputeOvsDpdkSriov role is created. For information on
creating roles in Red Hat OpenStack Platform, see Advanced Overcloud Customization. For details on
the specific role used for this example, see roles_data.yaml.
IMPORTANT
You must 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.
For details, see Deriving DPDK parameters with workflows .
resource_registry:
# Specify the relative/absolute path to the config files you want to use for override the
default.
OS::TripleO::ComputeOvsDpdkSriov::Net::SoftwareConfig: nic-
configs/computeovsdpdksriov.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
2. Under parameter_defaults, set the tunnel type to vxlan, and the network type to vxlan,vlan:
NeutronTunnelTypes: 'vxlan'
NeutronNetworkType: 'vxlan,vlan'
92
CHAPTER 10. EXAMPLE: CONFIGURING OVS-DPDK AND SR-IOV WITH VXLAN TUNNELLING
##########################
# OVS DPDK configuration #
##########################
ComputeOvsDpdkSriovParameters:
KernelArgs: "default_hugepagesz=1GB hugepagesz=1G hugepages=32 iommu=pt
intel_iommu=on isolcpus=2-19,22-39"
TunedProfileName: "cpu-partitioning"
IsolCpusList: "2-19,22-39"
NovaComputeCpuDedicatedSet: ['4-19,24-39']
NovaReservedHostMemory: 4096
OvsDpdkSocketMemory: "3072,1024"
OvsDpdkMemoryChannels: "4"
OvsPmdCoreList: "2,22,3,23"
NovaComputeCpuSharedSet: [0,20,1,21]
NovaLibvirtRxQueueSize: 1024
NovaLibvirtTxQueueSize: 1024
NOTE
To prevent failures during guest creation, assign at least one CPU with sibling
thread on each NUMA node. In the example, the values for the OvsPmdCoreList
parameter denote cores 2 and 22 from NUMA 0, and cores 3 and 23 from NUMA
1.
NOTE
These huge pages are consumed by the virtual machines, and also by OVS-DPDK
using the OvsDpdkSocketMemory parameter as shown in this procedure. The
number of huge pages available for the virtual machines is the boot parameter
minus the OvsDpdkSocketMemory.
You must also add hw:mem_page_size=1GB to the flavor you associate with
the DPDK instance.
NOTE
NovaPCIPassthrough:
- vendor_id: "8086"
product_id: "1528"
93
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
address: "0000:06:00.0"
trusted: "true"
physical_network: "sriov-1"
- vendor_id: "8086"
product_id: "1528"
address: "0000:06:00.1"
trusted: "true"
physical_network: "sriov-2"
- type: linux_bond
name: bond_api
bonding_options: "mode=active-backup"
use_dhcp: false
dns_servers:
get_param: DnsServers
members:
- type: interface
name: nic2
primary: true
- type: vlan
vlan_id:
get_param: InternalApiNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
- type: vlan
vlan_id:
get_param: StorageNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: vlan
vlan_id:
get_param: StorageMgmtNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: StorageMgmtIpSubnet
- type: vlan
vlan_id:
get_param: ExternalNetworkVlanID
device: bond_api
addresses:
94
CHAPTER 10. EXAMPLE: CONFIGURING OVS-DPDK AND SR-IOV WITH VXLAN TUNNELLING
- ip_netmask:
get_param: ExternalIpSubnet
routes:
- default: true
next_hop:
get_param: ExternalInterfaceDefaultRoute
- type: ovs_bridge
name: br-link0
use_dhcp: false
mtu: 9000
members:
- type: interface
name: nic3
mtu: 9000
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
mtu: 9000
addresses:
- ip_netmask:
get_param: TenantIpSubnet
- type: linux_bond
name: bond_api
bonding_options: "mode=active-backup"
use_dhcp: false
dns_servers:
get_param: DnsServers
members:
- type: interface
name: nic3
primary: true
- type: interface
name: nic4
- type: vlan
vlan_id:
get_param: InternalApiNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
95
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
- type: vlan
vlan_id:
get_param: StorageNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
ovs_extra:
- str_replace:
template: set port br-link0 tag=_VLAN_TAG_
params:
_VLAN_TAG_:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
rx_queue: 2
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: interface
name: nic7
- type: ovs_dpdk_port
name: dpdk1
members:
- type: interface
name: nic8
NOTE
To include multiple DPDK devices, repeat the type code section for each DPDK
device that you want to add.
NOTE
When using OVS-DPDK, all bridges on the same Compute node must be of type
ovs_user_bridge. Red Hat OpenStack Platform does not support both
ovs_bridge and ovs_user_bridge located on the same node.
96
CHAPTER 11. UPGRADING RED HAT OPENSTACK PLATFORM WITH NFV
97
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
You can enable high-performance packet switching between physical NICs and virtual machines using
data plane development kit (DPDK) accelerated virtual machines. OVS 2.10 embeds support for DPDK
17 and includes support for vhost-user multiqueue, allowing scalable performance. OVS-DPDK
provides line-rate performance for guest VNFs.
Single root I/O virtualization (SR-IOV) networking provides enhanced performance, including improved
throughput for specific networks and virtual machines.
Other important features for performance tuning include huge pages, NUMA alignment, host isolation,
and CPU pinning. VNF flavors require huge pages and emulator thread isolation for better performance.
Host isolation and CPU pinning improve NFV performance and prevent spurious packet loss.
For a high-level introduction to CPUs and NUMA topology, see: NFV Performance Considerations and
Configuring emulator threads.
98
CHAPTER 13. FINDING MORE INFORMATION
The Red Hat OpenStack Platform documentation suite can be found here: Red Hat OpenStack
Platform Documentation Suite
Component Reference
Red Hat Enterprise Linux Red Hat OpenStack Platform is supported on Red Hat Enterprise
Linux 8.0. For information on installing Red Hat Enterprise Linux,
see the corresponding installation guide at: Red Hat Enterprise
Linux Documentation Suite.
Red Hat OpenStack Platform To install OpenStack components and their dependencies, use the
Red Hat OpenStack Platform director. The director uses a basic
OpenStack installation as the undercloud to install, configure, and
manage the OpenStack nodes in the final overcloud. Ensure that
you have one extra host machine for the installation of the
undercloud, in addition to the environment necessary for the
deployed overcloud. For detailed instructions, see Red Hat
OpenStack Platform Director Installation and Usage.
NFV Documentation For more details on planning and configuring your Red Hat
OpenStack Platform deployment with single root I/O virtualization
(SR-IOV) and Open vSwitch with Data Plane Development Kit
(OVS-DPDK), see Network Function Virtualization Planning and
Configuration Guide.
99
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
NOTE
A.1.1. roles_data.yaml
1. Run the openstack overcloud roles generate command to generate the roles_data.yaml file.
Include role names in the command according to the roles that you want to deploy in your
environment, such as Controller, ComputeSriov, ComputeOvsDpdkRT,
ComputeOvsDpdkSriov, or other roles. For example, to generate a roles_data.yaml file that
contains the roles Controller and ComputeHCIOvsDpdkSriov, run the following command:
###############################################################################
# File generated by TripleO
###############################################################################
###############################################################################
# Role: Controller #
###############################################################################
- name: Controller
description: |
Controller role that has all the controller services loaded and handles
Database, Messaging and Network functions.
CountDefault: 1
tags:
- primary
- controller
networks:
External:
subnet: external_subnet
InternalApi:
subnet: internal_api_subnet
Storage:
subnet: storage_subnet
StorageMgmt:
subnet: storage_mgmt_subnet
Tenant:
subnet: tenant_subnet
# For systems with both IPv4 and IPv6, you may specify a gateway network for
# each, such as ['ControlPlane', 'External']
default_route_networks: ['External']
HostnameFormatDefault: '%stackname%-controller-%index%'
100
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
101
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
- OS::TripleO::Services::DesignateApi
- OS::TripleO::Services::DesignateCentral
- OS::TripleO::Services::DesignateProducer
- OS::TripleO::Services::DesignateWorker
- OS::TripleO::Services::DesignateMDNS
- OS::TripleO::Services::DesignateSink
- OS::TripleO::Services::Docker
- OS::TripleO::Services::Ec2Api
- OS::TripleO::Services::Etcd
- OS::TripleO::Services::ExternalSwiftProxy
- OS::TripleO::Services::GlanceApi
- OS::TripleO::Services::GnocchiApi
- OS::TripleO::Services::GnocchiMetricd
- OS::TripleO::Services::GnocchiStatsd
- OS::TripleO::Services::HAproxy
- OS::TripleO::Services::HeatApi
- OS::TripleO::Services::HeatApiCloudwatch
- OS::TripleO::Services::HeatApiCfn
- OS::TripleO::Services::HeatEngine
- OS::TripleO::Services::Horizon
- OS::TripleO::Services::IpaClient
- OS::TripleO::Services::Ipsec
- OS::TripleO::Services::IronicApi
- OS::TripleO::Services::IronicConductor
- OS::TripleO::Services::IronicInspector
- OS::TripleO::Services::IronicPxe
- OS::TripleO::Services::IronicNeutronAgent
- OS::TripleO::Services::Iscsid
- OS::TripleO::Services::Keepalived
- OS::TripleO::Services::Kernel
- OS::TripleO::Services::Keystone
- OS::TripleO::Services::LoginDefs
- OS::TripleO::Services::ManilaApi
- OS::TripleO::Services::ManilaBackendCephFs
- OS::TripleO::Services::ManilaBackendIsilon
- OS::TripleO::Services::ManilaBackendNetapp
- OS::TripleO::Services::ManilaBackendUnity
- OS::TripleO::Services::ManilaBackendVNX
- OS::TripleO::Services::ManilaBackendVMAX
- OS::TripleO::Services::ManilaScheduler
- OS::TripleO::Services::ManilaShare
- OS::TripleO::Services::Memcached
- OS::TripleO::Services::MetricsQdr
- OS::TripleO::Services::MistralApi
- OS::TripleO::Services::MistralEngine
- OS::TripleO::Services::MistralExecutor
- OS::TripleO::Services::MistralEventEngine
- OS::TripleO::Services::Multipathd
- OS::TripleO::Services::MySQL
- OS::TripleO::Services::MySQLClient
- OS::TripleO::Services::NeutronApi
- OS::TripleO::Services::NeutronBgpVpnApi
- OS::TripleO::Services::NeutronSfcApi
- OS::TripleO::Services::NeutronCorePlugin
- OS::TripleO::Services::NeutronDhcpAgent
- OS::TripleO::Services::NeutronL2gwAgent
102
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
- OS::TripleO::Services::NeutronL2gwApi
- OS::TripleO::Services::NeutronL3Agent
- OS::TripleO::Services::NeutronLinuxbridgeAgent
- OS::TripleO::Services::NeutronMetadataAgent
- OS::TripleO::Services::NeutronML2FujitsuCfab
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic
- OS::TripleO::Services::NovaMetadata
- OS::TripleO::Services::NovaScheduler
- OS::TripleO::Services::NovaVncProxy
- OS::TripleO::Services::ContainersLogrotateCrond
- OS::TripleO::Services::OctaviaApi
- OS::TripleO::Services::OctaviaDeploymentConfig
- OS::TripleO::Services::OctaviaHealthManager
- OS::TripleO::Services::OctaviaHousekeeping
- OS::TripleO::Services::OctaviaWorker
- OS::TripleO::Services::OpenStackClients
- OS::TripleO::Services::OVNDBs
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::Pacemaker
- OS::TripleO::Services::PankoApi
- OS::TripleO::Services::PlacementApi
- OS::TripleO::Services::OsloMessagingRpc
- OS::TripleO::Services::OsloMessagingNotify
- OS::TripleO::Services::Podman
- OS::TripleO::Services::Rear
- OS::TripleO::Services::Redis
- OS::TripleO::Services::Rhsm
- OS::TripleO::Services::Rsyslog
- OS::TripleO::Services::RsyslogSidecar
- OS::TripleO::Services::SaharaApi
- OS::TripleO::Services::SaharaEngine
- OS::TripleO::Services::Securetty
- OS::TripleO::Services::Snmp
- OS::TripleO::Services::Sshd
- OS::TripleO::Services::SwiftProxy
- OS::TripleO::Services::SwiftDispersion
- OS::TripleO::Services::SwiftRingBuilder
- OS::TripleO::Services::SwiftStorage
- OS::TripleO::Services::Timesync
- OS::TripleO::Services::Timezone
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::TripleoPackages
- OS::TripleO::Services::Tuned
- OS::TripleO::Services::Vpp
- OS::TripleO::Services::Zaqar
###############################################################################
# Role: ComputeHCIOvsDpdkSriov #
###############################################################################
- name: ComputeHCIOvsDpdkSriov
description: |
103
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
104
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
- OS::TripleO::Services::Securetty
- OS::TripleO::Services::Snmp
- OS::TripleO::Services::Sshd
- OS::TripleO::Services::Timesync
- OS::TripleO::Services::Timezone
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::TripleoPackages
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::OVNMetadataAgent
- OS::TripleO::Services::Ptp
A.1.2. network-environment-overrides.yaml
resource_registry:
# Specify the relative/absolute path to the config files you want to use for override the default.
OS::TripleO::ComputeOvsDpdkSriov::Net::SoftwareConfig: nic-configs/computeovsdpdksriov.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
ControllerHostnameFormat: 'controller-%index%'
ControllerSchedulerHints:
'capabilities:node': 'controller-%index%'
ComputeOvsDpdkSriovHostnameFormat: 'computeovsdpdksriov-%index%'
ComputeOvsDpdkSriovSchedulerHints:
'capabilities:node': 'computeovsdpdksriov-%index%'
105
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
##########################
# OVS DPDK configuration #
##########################
############################
# Scheduler configuration #
############################
NovaSchedulerDefaultFilters:
- "AvailabilityZoneFilter"
- "ComputeFilter"
- "ComputeCapabilitiesFilter"
- "ImagePropertiesFilter"
- "ServerGroupAntiAffinityFilter"
- "ServerGroupAffinityFilter"
- "PciPassthroughFilter"
- "NUMATopologyFilter"
- "AggregateInstanceExtraSpecsFilter"
106
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
A.1.3. controller.yaml
heat_template_version: rocky
description: >
Software Config to drive os-net-config to configure VLANs for the controller role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
ExternalInterfaceRoutes:
default: []
description: >
Routes for the external network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
InternalApiInterfaceRoutes:
default: []
description: >
Routes for the internal_api network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageInterfaceRoutes:
default: []
description: >
Routes for the storage network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
StorageMgmtInterfaceRoutes:
default: []
description: >
Routes for the storage_mgmt network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
107
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
attribute.
type: json
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
TenantInterfaceRoutes:
default: []
description: >
Routes for the tenant network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
ManagementInterfaceRoutes:
default: []
description: >
Routes for the management network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
BondInterfaceOvsOptions:
default: bond_mode=active-backup
description: >-
The ovs_options string for the bond interface. Set things like lacp=active and/or
bond_mode=balance-slb using this option.
type: string
ExternalNetworkVlanID:
default: 10
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: 20
description: Vlan ID for the internal_api network traffic.
type: number
StorageNetworkVlanID:
default: 30
description: Vlan ID for the storage network traffic.
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
108
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
ExternalInterfaceDefaultRoute:
default: 10.0.0.1
description: default route for the external network
type: string
ControlPlaneSubnetCidr:
default: ''
description: >
The subnet CIDR of the control plane network. (The parameter is automatically resolved from the
ctlplane subnet's cidr
attribute.)
type: string
ControlPlaneDefaultRoute:
default: ''
description: >-
The default route of the control plane network. (The parameter is automatically resolved from the
ctlplane subnet's
gateway_ip attribute.)
type: string
DnsServers: # Override this via parameter_defaults
default: []
description: >
DNS servers to use for the Overcloud (2 max for some implementations). If not set the
nameservers configured in the
ctlplane subnet's dns_nameservers attribute will be used.
type: comma_delimited_list
EC2MetadataIp:
default: ''
description: >-
The IP address of the EC2 metadata server. (The parameter is automatically resolved from the
ctlplane subnet's host_routes
attribute.)
type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
ControlPlaneMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the network. (The parameter is automatically resolved from the ctlplane network's mtu
attribute.)
type: number
StorageMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the Storage network.
type: number
StorageMgmtMtu:
109
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the StorageMgmt network.
type: number
InternalApiMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the InternalApi network.
type: number
TenantMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the Tenant network.
type: number
ExternalMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the External network.
type: number
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
- type: interface
name: nic1
use_dhcp: false
addresses:
- ip_netmask:
list_join:
-/
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes:
- ip_netmask: 169.254.169.254/32
next_hop:
get_param: EC2MetadataIp
- type: ovs_bridge
name: br-link0
use_dhcp: false
110
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
mtu: 9000
members:
- type: interface
name: nic2
mtu: 9000
- type: vlan
vlan_id:
get_param: TenantNetworkVlanID
mtu: 9000
addresses:
- ip_netmask:
get_param: TenantIpSubnet
- type: vlan
vlan_id:
get_param: InternalApiNetworkVlanID
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
- type: vlan
vlan_id:
get_param: StorageNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: vlan
vlan_id:
get_param: StorageMgmtNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageMgmtIpSubnet
- type: ovs_bridge
name: br-access
use_dhcp: false
mtu: 9000
members:
- type: interface
name: nic3
mtu: 9000
- type: vlan
vlan_id:
get_param: ExternalNetworkVlanID
mtu: 9000
addresses:
- ip_netmask:
get_param: ExternalIpSubnet
routes:
- default: true
next_hop:
get_param: ExternalInterfaceDefaultRoute
outputs:
OS::stack_id:
111
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
A.1.4. compute-ovs-dpdk.yaml
heat_template_version: rocky
description: >
Software Config to drive os-net-config to configure VLANs for the
compute role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
ExternalInterfaceRoutes:
default: []
description: >
Routes for the external network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
InternalApiInterfaceRoutes:
default: []
description: >
Routes for the internal_api network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageInterfaceRoutes:
default: []
description: >
Routes for the storage network traffic.
JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
Unless the default is changed, the parameter is automatically resolved
from the subnet host_routes attribute.
type: json
StorageMgmtIpSubnet:
default: ''
112
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
113
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
default: 50
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
ExternalInterfaceDefaultRoute:
default: '10.0.0.1'
description: default route for the external network
type: string
ControlPlaneSubnetCidr:
default: ''
description: >
The subnet CIDR of the control plane network. (The parameter is
automatically resolved from the ctlplane subnet's cidr attribute.)
type: string
ControlPlaneDefaultRoute:
default: ''
description: The default route of the control plane network. (The parameter
is automatically resolved from the ctlplane subnet's gateway_ip attribute.)
type: string
DnsServers: # Override this via parameter_defaults
default: []
description: >
DNS servers to use for the Overcloud (2 max for some implementations).
If not set the nameservers configured in the ctlplane subnet's
dns_nameservers attribute will be used.
type: comma_delimited_list
EC2MetadataIp:
default: ''
description: The IP address of the EC2 metadata server. (The parameter
is automatically resolved from the ctlplane subnet's host_routes attribute.)
type: string
ControlPlaneStaticRoutes:
default: []
description: >
Routes for the ctlplane network traffic. JSON route e.g. [{'destination':'10.0.0.0/16',
'nexthop':'10.0.0.1'}] Unless
the default is changed, the parameter is automatically resolved from the subnet host_routes
attribute.
type: json
ControlPlaneMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the network. (The parameter is automatically resolved from the ctlplane network's mtu
attribute.)
type: number
StorageMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the Storage network.
114
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
type: number
InternalApiMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the InternalApi network.
type: number
TenantMtu:
default: 1500
description: >-
The maximum transmission unit (MTU) size(in bytes) that is guaranteed to pass through the data
path of the segments
in the Tenant network.
type: number
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
- type: interface
name: nic1
use_dhcp: false
defroute: false
- type: interface
name: nic2
use_dhcp: false
addresses:
- ip_netmask:
list_join:
-/
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes:
- ip_netmask: 169.254.169.254/32
next_hop:
get_param: EC2MetadataIp
- default: true
next_hop:
get_param: ControlPlaneDefaultRoute
- type: linux_bond
name: bond_api
bonding_options: mode=active-backup
use_dhcp: false
dns_servers:
get_param: DnsServers
115
Red Hat OpenStack Platform 16.2 Network Functions Virtualization Planning and Configuration Guide
members:
- type: interface
name: nic3
primary: true
- type: interface
name: nic4
- type: vlan
vlan_id:
get_param: InternalApiNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
- type: vlan
vlan_id:
get_param: StorageNetworkVlanID
device: bond_api
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: ovs_user_bridge
name: br-link0
use_dhcp: false
ovs_extra:
- str_replace:
template: set port br-link0 tag=_VLAN_TAG_
params:
_VLAN_TAG_:
get_param: TenantNetworkVlanID
addresses:
- ip_netmask:
get_param: TenantIpSubnet
members:
- type: ovs_dpdk_bond
name: dpdkbond0
mtu: 9000
rx_queue: 2
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: interface
name: nic7
- type: ovs_dpdk_port
name: dpdk1
members:
- type: interface
name: nic8
- type: sriov_pf
name: nic9
mtu: 9000
numvfs: 10
116
APPENDIX A. SAMPLE DPDK SRIOV YAML FILES
use_dhcp: false
defroute: false
nm_controlled: true
hotplug: true
promisc: false
- type: sriov_pf
name: nic10
mtu: 9000
numvfs: 10
use_dhcp: false
defroute: false
nm_controlled: true
hotplug: true
promisc: false
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl
A.1.5. overcloud_deploy.sh
#!/bin/bash
THT_PATH='/home/stack/ospd-16-vxlan-dpdk-sriov-ctlplane-dataplane-bonding-hybrid'
117