Sfoglia il codice sorgente

Merge "Add ability to add linux network interface into OVS dpdk bridge"

pull/148/merge
Ondrej Smola 6 anni fa
parent
commit
48741cfbb9
3 ha cambiato i file con 43 aggiunte e 0 eliminazioni
  1. +19
    -0
      README.rst
  2. +19
    -0
      linux/network/interface.sls
  3. +5
    -0
      tests/pillar/network_openvswitch_dpdk.sls

+ 19
- 0
README.rst Vedi File

@@ -1550,6 +1550,25 @@ If VXLAN is used as tenant segmentation then ip address must be set on br-prv
tag: 101
mtu: 9000



**DPDK OVS bridge with Linux network interface**

.. code-block:: yaml

linux:
network:
...
interface:
eth0:
type: eth
ovs_bridge: br-prv
...
br-prv:
enabled: true
type: dpdk_ovs_bridge
...

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


+ 19
- 0
linux/network/interface.sls Vedi File

@@ -62,6 +62,25 @@ remove_cloud_init_file:

{%- set interface_name = interface.get('name', interface_name) %}

{# add linux network interface into OVS dpdk bridge #}

{%- if interface.type == 'dpdk_ovs_bridge' %}

{%- for int_name, int in network.interface.items() %}

{%- set int_name = int.get('name', int_name) %}

{%- if int.ovs_bridge is defined and interface_name == int.ovs_bridge %}

add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
cmd.run:
- unless: ovs-vsctl show | grep -w {{ int_name }}
- name: ovs-vsctl add-port {{ interface_name }} {{ int_name }}

{%- endif %}
{%- endfor %}
{%- endif %}

{# it is not used for any interface with type preffix dpdk,eg. dpdk_ovs_port #}
{%- if interface.get('managed', True) and not 'dpdk' in interface.type %}


+ 5
- 0
tests/pillar/network_openvswitch_dpdk.sls Vedi File

@@ -20,6 +20,11 @@ linux:
name: "openvswitch-vhost"
path: "/run/openvswitch-vhost"
interface:
eth0:
enabled: true
type: eth
proto: manual
ovs_bridge: br-prv
dpdk0:
name: enp5s0f1
pci: "0000:05:00.1"

Loading…
Annulla
Salva