Skip to content

Instantly share code, notes, and snippets.

@stephenfin
Last active October 10, 2018 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenfin/a13fb36bb1afb6fcd770cc24ff125a33 to your computer and use it in GitHub Desktop.
Save stephenfin/a13fb36bb1afb6fcd770cc24ff125a33 to your computer and use it in GitHub Desktop.
Sample DevStack 'local.conf' using SR-IOV

DevStack, Single Node, SR-IOV

Overview

Nodes

1

Version

Rocky

Prerequisites

  • An SR-IOV NIC

    I was using an Mellanox ConnectX-3. Instructions for configuring this can be found here.

Configuration

Two tweaks are necessary to use this.

  • Replace references to enp2s0 with the netdev name of your PF.
  • Replace references to enp6s0 with the netdev name of the device you wish to use with OVS

Notes

This is based on the sample local.conf provided in a Mellanox presentation

[[local|localrc]]
#OFFLINE=True
RECLONE=True
#MULTI_HOST=True
## Passwords
ADMIN_PASSWORD=password
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
HORIZON_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=no-token-password
## Services
disable_service n-net
## Neutron
ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-sriov-agt
## Neutron Options
ENABLE_TENANT_TUNNELS=False
ENABLE_TENANT_VLANS=True
TENANT_VLAN_RANGE=3001:4000
PHYSICAL_NETWORK=sriovnet
OVS_PHYSICAL_BRIDGE=br-enp6s0
PUBLIC_INTERFACE=enp6s0
Q_USE_PROVIDER_NETWORKING=False
Q_L3_ENABLED=True
## Neutron Networking options used to create Neutron Subnets
PROVIDER_NETWORK_TYPE="vlan"
SEGMENTATION_ID=2010
# ML2 Configuration
Q_PLUGIN=ml2
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,sriovnicswitch
Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,flat,local
Q_ML2_TENANT_NETWORK_TYPE=vlan
# ML2 SR-IOV agent configuration
enable_plugin neutron git://git.openstack.org/openstack/neutron.git
PHYSICAL_DEVICE_MAPPINGS=sriovnet:enp2s0
# Add PCI Passthru filter, add alias, add all ports on PF
[[post-config|$NOVA_CONF]]
[scheduler]
enabled_filters=RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter
[pci]
passthrough_whitelist={\\"devname\\":\\"enp2s0\\",\\"physical_network\\":\\"sriovnet\\"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment