Quellcode durchsuchen

Linux OVS dpdk vxlan tunnel endpoint ip address

Add possiblity to add ip address and mtu on dpdk ovs bridge to
be able use VXLAN as tenant segmentation.

Change-Id: I1394d30c5d9935218841b17ff7651dac7b4abefa
Epic: PROD-8957
tags/2017.4
Jakub Pavlik vor 7 Jahren
Ursprung
Commit
aa75906e0b
2 geänderte Dateien mit 64 neuen und 2 gelöschten Zeilen
  1. +19
    -0
      README.rst
  2. +45
    -2
      linux/network/dpdk.sls

+ 19
- 0
README.rst Datei anzeigen

@@ -798,6 +798,7 @@ DPDK OVS interfaces
type: dpdk_ovs_port
n_rxq: 2
bridge: br-prv
mtu: 9000
br-prv:
enabled: true
type: dpdk_ovs_bridge
@@ -826,6 +827,7 @@ DPDK OVS interfaces
enabled: true
type: dpdk_ovs_port
n_rxq: 2
mtu: 9000
dpdk_first_nic:
name: ${_param:primary_first_nic}
pci: 0000:05:00.0
@@ -834,6 +836,7 @@ DPDK OVS interfaces
enabled: true
type: dpdk_ovs_port
n_rxq: 2
mtu: 9000
dpdkbond0:
enabled: true
bridge: br-prv
@@ -843,6 +846,22 @@ DPDK OVS interfaces
enabled: true
type: dpdk_ovs_bridge

**DPDK OVS bridge for VXLAN**

If VXLAN is used as tenant segmentation then ip address must be set on br-prv

.. code-block:: yaml

linux:
network:
...
interface:
br-prv:
enabled: true
type: dpdk_ovs_bridge
address: 192.168.50.0
netmask: 255.255.255.0
mtu: 9000

Linux storage
-------------

+ 45
- 2
linux/network/dpdk.sls Datei anzeigen

@@ -109,6 +109,35 @@ linux_network_dpdk_bridge_interface_{{ interface_name }}:
- name: "ovs-vsctl add-br {{ interface_name }} -- set bridge {{ interface_name }} datapath_type=netdev"
- unless: "ovs-vsctl show | grep {{ interface_name }}"

{# OVS dpdk needs ip address for vxlan termination on bridge br-prv #}
{%- if interface.address is defined %}

{# create override for openvswitch dependency for dpdk br-prv #}
/etc/systemd/system/ifup@{{ interface_name }}.service.d/override.conf:
file.managed:
- require:
- cmd: linux_network_dpdk_bridge_interface_{{ interface_name }}
- contents: |
[Unit]
Requires=openvswitch-switch.service
After=openvswitch-switch.service

{# enforce ip address and mtu for ovs dpdk br-prv #}
/etc/network/interfaces.d/ifcfg-{{ interface_name }}:
file.managed:
- contents: |
auto {{ interface_name }}
iface {{ interface_name }} inet static
address {{ interface.address }}
netmask {{ interface.netmask }}
{%- if interface.mtu is defined %}
mtu {{ interface.mtu }}
{%- endif %}
- require:
- file: /etc/systemd/system/ifup@{{ interface_name }}.service.d/override.conf

{%- endif %}

{%- elif interface.type == 'dpdk_ovs_port' and interface.bridge is defined %}

linux_network_dpdk_bridge_port_interface_{{ interface_name }}:
@@ -118,8 +147,10 @@ linux_network_dpdk_bridge_port_interface_{{ interface_name }}:
- require:
- cmd: linux_network_dpdk_bridge_interface_{{ interface.bridge }}

{# Multiqueue n_rxq setup on interfaces #}
{%- elif interface.type == 'dpdk_ovs_port' and interface.n_rxq is defined %}
{# Multiqueue n_rxq and mtu setup on interfaces #}
{%- elif interface.type == 'dpdk_ovs_port' and (interface.n_rxq is defined or interface.mtu is defined) %}

{%- if interface.n_rxq is defined %}

linux_network_dpdk_bridge_port_interface_n_rxq_{{ interface_name }}:
cmd.run:
@@ -129,6 +160,18 @@ linux_network_dpdk_bridge_port_interface_n_rxq_{{ interface_name }}:

{%- endif %}

{%- if interface.mtu is defined %}

{# MTU ovs dpdk setup on interfaces #}
linux_network_dpdk_bridge_port_interface_mtu_{{ interface_name }}:
cmd.run:
- name: "ovs-vsctl set Interface {{ interface_name }} mtu_request={{ interface.mtu }} "
- unless: "ovs-vsctl get Interface {{ interface_name }} mtu_request | grep {{ interface.mtu }}"

{%- endif %}

{%- endif %}

{%- endfor %}

{%- endif %}

Laden…
Abbrechen
Speichern