Kaynağa Gözat

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

pull/148/merge
Ondrej Smola 6 yıl önce
ebeveyn
işleme
48741cfbb9
3 değiştirilmiş dosya ile 43 ekleme ve 0 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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"

Yükleniyor…
İptal
Kaydet