Add SR-IOV support
* Add Neutron SR-IOV NIC switch agent * Add config options for ccp.yaml Change-Id: I1125ff53e3d980c5a37d270c328206bd9a71f92f
This commit is contained in:
parent
073415fad8
commit
67230431c6
2
docker/neutron-sriov-nic-agent/Dockerfile.j2
Normal file
2
docker/neutron-sriov-nic-agent/Dockerfile.j2
Normal file
@ -0,0 +1,2 @@
|
||||
FROM {{ image_spec("neutron-base") }}
|
||||
MAINTAINER {{ maintainer }}
|
@ -35,6 +35,8 @@ configs:
|
||||
connection: "unix:/run/openvswitch/db.sock"
|
||||
enable_lbaas: false
|
||||
enable_qos: false
|
||||
sriov:
|
||||
enabled: false
|
||||
calico:
|
||||
etcd_host: "etcd-k8s"
|
||||
etcd_port: 2379
|
||||
|
@ -10,7 +10,11 @@ tenant_network_types = {{ neutron.ml2.tenant_network_types|join(',') }}
|
||||
{% endif %}
|
||||
|
||||
{% if neutron.plugin_agent == "openvswitch" %}
|
||||
{% if neutron.sriov.enabled %}
|
||||
mechanism_drivers = openvswitch,sriovnicswitch
|
||||
{% else %}
|
||||
mechanism_drivers = openvswitch,l2population
|
||||
{% endif %}
|
||||
{% elif neutron.plugin_agent == "linuxbridge" %}
|
||||
mechanism_drivers = linuxbridge,l2population
|
||||
{% elif neutron.plugin_agent == "calico" %}
|
||||
|
44
service/files/sriov_agent.ini.j2
Normal file
44
service/files/sriov_agent.ini.j2
Normal file
@ -0,0 +1,44 @@
|
||||
[agent]
|
||||
|
||||
{% if neutron.enable_qos %}
|
||||
extensions = qos
|
||||
{% endif %}
|
||||
|
||||
|
||||
[securitygroup]
|
||||
firewall_driver = neutron.agent.firewall.NoopFirewallDriver
|
||||
|
||||
[sriov_nic]
|
||||
|
||||
#
|
||||
# From neutron.ml2.sriov.agent
|
||||
#
|
||||
|
||||
# Comma-separated list of <physical_network>:<network_device> tuples mapping
|
||||
# physical network names to the agent's node-specific physical network device
|
||||
# interfaces of SR-IOV physical function to be used for VLAN networks. All
|
||||
# physical networks listed in network_vlan_ranges on the server should have
|
||||
# mappings to appropriate interfaces on each agent. (list value)
|
||||
physical_device_mappings =
|
||||
{%- for dev in neutron.sriov.devices -%}
|
||||
{%- for net in dev.physnets -%}
|
||||
{%- if not loop.first %},{% endif -%}
|
||||
{{ net }}:{{ dev.name }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
# Comma-separated list of <network_device>:<vfs_to_exclude> tuples, mapping
|
||||
# network_device to the agent's node-specific list of virtual functions that
|
||||
# should not be used for virtual networking. vfs_to_exclude is a semicolon-
|
||||
# separated list of virtual functions to exclude from network_device. The
|
||||
# network_device in the mapping should appear in the physical_device_mappings
|
||||
# list. (list value)
|
||||
exclude_devices =
|
||||
{%- for dev in neutron.sriov.devices if dev.exclude_vfs -%}
|
||||
{%- if not loop.first %},{% endif -%}
|
||||
{{ dev.name }}:
|
||||
{%- for vf in dev.exclude_vfs -%}
|
||||
{%- if not loop.first %};{% endif -%}
|
||||
{{ vf }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
34
service/neutron-sriov-nic-agent.yaml
Normal file
34
service/neutron-sriov-nic-agent.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
dsl_version: 0.1.0
|
||||
service:
|
||||
name: neutron-sriov-nic-agent
|
||||
kind: DaemonSet
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: neutron-sriov-nic-agent
|
||||
image: neutron-sriov-nic-agent
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: ovs-socket
|
||||
type: host
|
||||
path: /run/openvswitch
|
||||
- name: modules
|
||||
type: host
|
||||
path: /lib/modules
|
||||
daemon:
|
||||
command: neutron-sriov-nic-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/sriov_agent.ini
|
||||
dependencies:
|
||||
- neutron-db-sync
|
||||
- rpc
|
||||
- notifications
|
||||
files:
|
||||
- neutron.conf
|
||||
- sriov_agent.ini
|
||||
files:
|
||||
neutron.conf:
|
||||
path: /etc/neutron/neutron.conf
|
||||
content: neutron.conf.j2
|
||||
perm: "0600"
|
||||
sriov_agent.ini:
|
||||
path: /etc/neutron/plugins/ml2/sriov_agent.ini
|
||||
content: sriov_agent.ini.j2
|
||||
perm: "0600"
|
Loading…
x
Reference in New Issue
Block a user