From: Ondrej Lichtner olichtne@redhat.com
This patch fixes a problem with Open vSwitch bridge bonds. Adding a bond requires specifying ports that should be bonded, however this command also adds those ports to the ovs bridge so they shouldn't be added by the ovs-vsctl add-port command.
This patch also adds support for specifying bond options. These are verified by the ovs-vsctl command so LNST doesn't check their validity.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Controller/RecipeParser.py | 5 +++++ lnst/Slave/NetConfigDevice.py | 26 +++++++++++++++++++++++--- schema-recipe.rng | 4 ++++ 3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/lnst/Controller/RecipeParser.py b/lnst/Controller/RecipeParser.py index 3201719..1109b35 100644 --- a/lnst/Controller/RecipeParser.py +++ b/lnst/Controller/RecipeParser.py @@ -248,6 +248,11 @@ class RecipeParser(XmlParser):
bond_slaves.append(slave_id)
+ opts_tag = bond_tag.find("options") + opts = self._proces_options(opts_tag) + if len(opts) > 0: + bonds[bond_id]["options"] = opts + return [iface]
def _proces_options(self, opts_tag): diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index bdcab5a..77074a6 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -341,7 +341,14 @@ class NetConfigDeviceOvsBridge(NetConfigDeviceGeneric):
br_name = self._dev_config["name"]
+ bond_ports = [] + for bond in self._dev_config["ovs_conf"]["bonds"].itervalues(): + for slave_id in bond["slaves"]: + bond_ports.append(slave_id) + for slave_id in slaves: + if slave_id in bond_ports: + continue slave_dev = self._if_manager.get_mapped_device(slave_id) slave_name = slave_dev.get_name()
@@ -362,7 +369,14 @@ class NetConfigDeviceOvsBridge(NetConfigDeviceGeneric):
br_name = self._dev_config["name"]
+ bond_ports = [] + for bond in self._dev_config["ovs_conf"]["bonds"].itervalues(): + for slave_id in bond["slaves"]: + bond_ports.append(slave_id) + for slave_id in slaves: + if slave_id in bond_ports: + continue slave_dev = self._if_manager.get_mapped_device(slave_id) slave_name = slave_dev.get_name()
@@ -374,9 +388,15 @@ class NetConfigDeviceOvsBridge(NetConfigDeviceGeneric): bonds = self._dev_config["ovs_conf"]["bonds"] for bond_id, bond in bonds.iteritems(): ifaces = "" - for slave in bond["slaves"]: - ifaces += " %s" % slave - exec_cmd("ovs-vsctl add-bond %s %s %s" % (br_name, bond_id, ifaces)) + for slave_id in bond["slaves"]: + slave_dev = self._if_manager.get_mapped_device(slave_id) + slave_name = slave_dev.get_name() + ifaces += " %s" % slave_name + opts = "" + for option in bond["options"]: + opts += " %s=%s" % (option["name"], option["value"]) + exec_cmd("ovs-vsctl add-bond %s %s %s %s" % (br_name, bond_id, + ifaces, opts))
def _del_bonds(self): br_name = self._dev_config["name"] diff --git a/schema-recipe.rng b/schema-recipe.rng index 2391085..81a60aa 100644 --- a/schema-recipe.rng +++ b/schema-recipe.rng @@ -217,6 +217,10 @@ <ref name="define"/> </optional>
+ <optional> + <ref name="options"/> + </optional> + <element name="slaves"> <interleave> <optional>
From: Ondrej Lichtner olichtne@redhat.com
This patch adds 3 Open vSwitch test recipes. These were created from Phase 1 bridge tests by instead using Open vSwitch bridges, and utilizing their bonding and VLAN features.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- ...s_bridge_2_vlans_over_active_backup_bond.README | 77 ++++++++++++++ ...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 99 ++++++++++++++++++ ..._ovs_bridge_2_vlans_over_active_backup_bond.xml | 115 +++++++++++++++++++++ .../phase2/virtual_ovs_bridge_vlan_in_guest.README | 55 ++++++++++ .../phase2/virtual_ovs_bridge_vlan_in_guest.py | 65 ++++++++++++ .../phase2/virtual_ovs_bridge_vlan_in_guest.xml | 50 +++++++++ .../phase2/virtual_ovs_bridge_vlan_in_host.README | 58 +++++++++++ .../phase2/virtual_ovs_bridge_vlan_in_host.py | 66 ++++++++++++ .../phase2/virtual_ovs_bridge_vlan_in_host.xml | 52 ++++++++++ 9 files changed, 637 insertions(+) create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.README create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.README create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.README create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py create mode 100644 recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.README b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.README new file mode 100644 index 0000000..20fb6ac --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.README @@ -0,0 +1,77 @@ +Topology: + + switch + +--------+ + | | + +-------------------------+ +--------------------------+ + | | | | + | +---------------+ +----------------+ | + | | | | | | + | | +--------+ | | + | | | | + | | | | + +--+-+ +--+-+ +--+-+ +--+-+ ++----+eth1+----+eth2+----+ +----+eth1+----+eth2+----+ +| +-+--+ +--+-+ | | +-+--+ +--+-+ | +| | | | | | | | +| | | | | | | | +| | | | | | | | +| +----+----------+----+ | | +----+----------+----+ | +| | +---bond---+ | | | | +---bond---+ | | +| | | | | | | | +| | ovs_bridge | | | | ovs_bridge | | +| | | | | | | | +| | vlan10 vlan20 | | | | vlan10 vlan20 | | +| +--+--------------+--+ | | +--+--------------+--+ | +| | host1 | | | | host2 | | +| | | | | | | | +| | | | | | | | +| +-+-+ +-+-+ | | +-+-+ +-+-+ | ++--+tap+----------+tap+--+ +--+tap+----------+tap+--+ + +-+-+ +-+-+ +-+-+ +-+-+ + | | | | + +-+-+ +-+-+ +-+-+ +-+-+ ++--+eth+--+ +--+eth+--+ +--+eth+--+ +--+eth+--+ +| +---+ | | +---+ | | +---+ | | +---+ | +| | | | | | | | +| guest1 | | guest2 | | guest3 | | guest4 | +| | | | | | | | +| | | | | | | | ++---------+ +---------+ +---------+ +---------+ + +Number of hosts: 6 +Host #1 description: + Two ethernet devices + Two tap devices + One Open vSwitch bridge that connects the ethernet devices into a bond and + uses the tap devices as access ports for vlans 10 and 20. + Host for guest1 and guest2 virtual machines +Host #2 description: + Two ethernet devices + Two tap devices + One Open vSwitch bridge that connects the ethernet devices into a bond and + uses the tap devices as access ports for vlans 10 and 20. + Host for guest3 and guest4 virtual machines +Guest #1 description: + One ethernet device +Guest #2 description: + One ethernet device +Guest #3 description: + One ethernet device +Guest #4 description: + One ethernet device +Test name: + virtual_ovs_bridge_2_vlans_over_bond.py +Test description: + Set offload: + + gso, gro, tso + + guest ethernet devices + Ping: + + count: 100 + + interval: 0.1s + + between guests in same VLANs (should pass) + + between guests in different VLANs (should fail) + Netperf: + + duration: 60s + + TCP_STREAM and UDP_STREAM + + between guests in same VLANs diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py new file mode 100644 index 0000000..36eabd3 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py @@ -0,0 +1,99 @@ +from lnst.Controller.Task import ctl + +# ------ +# SETUP +# ------ + +# Host 1 + guests 1 and 2 +#h1 = ctl.get_host("host1") +g1 = ctl.get_host("guest1") +g1.sync_resources(modules=["IcmpPing", "Netperf"]) +g2 = ctl.get_host("guest2") +g2.sync_resources(modules=["IcmpPing", "Netperf"]) + +# Host 2 + guests 3 and 4 +#h2 = ctl.get_host("host2") +g3 = ctl.get_host("guest3") +g3.sync_resources(modules=["IcmpPing", "Netperf"]) +g4 = ctl.get_host("guest4") +g4.sync_resources(modules=["IcmpPing", "Netperf"]) + +# ------ +# TESTS +# ------ + +offloads = ["gso", "gro", "tso"] + +ping_mod = ctl.get_module("IcmpPing", + options={ + "addr" : g3.get_ip("guestnic"), + "count" : 100, + "iface" : g1.get_devname("guestnic"), + "interval" : 0.1 + }) +ping_mod2 = ctl.get_module("IcmpPing", + options={ + "addr" : g2.get_ip("guestnic"), + "count" : 100, + "iface" : g4.get_devname("guestnic"), + "interval" : 0.1 + }) +netperf_srv = ctl.get_module("Netperf", + options={ + "role": "server", + "bind" : g1.get_ip("guestnic") + }) + +netperf_cli_tcp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("guestnic"), + "duration" : 60, + "testname" : "TCP_STREAM", + "netperf_opts" : "-L %s" % + g3.get_ip("guestnic") + }) + +netperf_cli_udp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("guestnic"), + "duration" : 60, + "testname" : "UDP_STREAM", + "netperf_opts" : "-L %s" % + g3.get_ip("guestnic") + }) +ping_mod_bad = ctl.get_module("IcmpPing", + options={ + "addr" : g4.get_ip("guestnic"), + "count" : 100, + "iface" : g1.get_devname("guestnic"), + "interval" : 0.1 + }) +ping_mod_bad2 = ctl.get_module("IcmpPing", + options={ + "addr" : g2.get_ip("guestnic"), + "count" : 100, + "iface" : g3.get_devname("guestnic"), + "interval" : 0.1 + }) + +for offload in offloads: + for state in ["on", "off"]: + g1.run("ethtool -K %s %s %s" % (g1.get_devname("guestnic"), + offload, state)) + g2.run("ethtool -K %s %s %s" % (g2.get_devname("guestnic"), + offload, state)) + g3.run("ethtool -K %s %s %s" % (g3.get_devname("guestnic"), + offload, state)) + g4.run("ethtool -K %s %s %s" % (g4.get_devname("guestnic"), + offload, state)) + g1.run(ping_mod) + g4.run(ping_mod2) + g1.run(ping_mod_bad, expect="fail") + g3.run(ping_mod_bad2, expect="fail") + + g1.run(netperf_srv, bg=True, timeout=125) + ctl.wait(2) + g3.run(netperf_cli_tcp, timeout=65) + g3.run(netperf_cli_udp, timeout=65) diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml new file mode 100644 index 0000000..c901b16 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml @@ -0,0 +1,115 @@ +<lnstrecipe> + <network> + <host id="host1"> + <interfaces> + <eth id="nic1" label="to_switch" /> + <eth id="nic2" label="to_switch" /> + <eth id="tap1" label="to_guest1" /> + <eth id="tap2" label="to_guest2" /> + <ovs_bridge id="bridge"> + <slaves> + <slave id="nic1"/> + <slave id="nic2"/> + <slave id="tap1"/> + <slave id="tap2"/> + </slaves> + <vlan tag="10"> + <slaves> + <slave id="tap1"/> + </slaves> + </vlan> + <vlan tag="20"> + <slaves> + <slave id="tap2"/> + </slaves> + </vlan> + <bond id="bond"> + <slaves> + <slave id="nic1"/> + <slave id="nic2"/> + </slaves> + <options> + <option name="bond_mode" value="active-backup" /> + <option name="other_config:bond-miimon-interval" value="100" /> + </options> + </bond> + </ovs_bridge> + </interfaces> + </host> + <host id="guest1"> + <interfaces> + <eth id="guestnic" label="to_guest1"> + <addresses> + <address>192.168.10.100/24</address> + </addresses> + </eth> + </interfaces> + </host> + <host id="guest2"> + <interfaces> + <eth id="guestnic" label="to_guest2"> + <addresses> + <address>192.168.20.100/24</address> + </addresses> + </eth> + </interfaces> + </host> + + <host id="host2"> + <interfaces> + <eth id="nic1" label="to_switch"/> + <eth id="nic2" label="to_switch"/> + <eth id="tap1" label="to_guest3"/> + <eth id="tap2" label="to_guest4"/> + <ovs_bridge id="bridge"> + <slaves> + <slave id="nic1"/> + <slave id="nic2"/> + <slave id="tap1"/> + <slave id="tap2"/> + </slaves> + <vlan tag="10"> + <slaves> + <slave id="tap1"/> + </slaves> + </vlan> + <vlan tag="20"> + <slaves> + <slave id="tap2"/> + </slaves> + </vlan> + <bond id="bond"> + <slaves> + <slave id="nic1"/> + <slave id="nic2"/> + </slaves> + <options> + <option name="bond_mode" value="active-backup" /> + <option name="other_config:bond-miimon-interval" value="100" /> + </options> + </bond> + </ovs_bridge> + </interfaces> + </host> + <host id="guest3"> + <interfaces> + <eth id="guestnic" label="to_guest3"> + <addresses> + <address>192.168.10.101/24</address> + </addresses> + </eth> + </interfaces> + </host> + <host id="guest4"> + <interfaces> + <eth id="guestnic" label="to_guest4"> + <addresses> + <address>192.168.20.101/24</address> + </addresses> + </eth> + </interfaces> + </host> + </network> + + <task python="virtual_ovs_bridge_2_vlans_over_active_backup_bond.py" /> +</lnstrecipe> diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.README b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.README new file mode 100644 index 0000000..e14e853 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.README @@ -0,0 +1,55 @@ +Topology: + + +----------+ + | | VLAN10 + +-----------------+ switch +-----------------+ + | | | | + | +----------+ | + | | + +-+-+ | ++------|nic|------+ +-+-+ +| +-+-+ | +------|nic|------+ +| | | | +---+ | +| +----+ | | | +| | | | | +| +-+---------+ | | | +| | ovs_bridge| | | host2 | +| +-+---------+ | | | +| | host1 | | | +| +-+-+ | | | ++-|tap|-----------+ | | + +-+-+ +-----------------+ + | + |VLAN10 + | + +-+-+ ++-|nic|--+ +| +---+ | +| guest1 | +| | ++--------+ + +Number of hosts: 3 +Host #1 description: + One ethernet device + One tap device + One Open vSwitch bridge device, bridging ethernet and tap devices + Host for guest1 virtual machine +Host #2 description: + One ethernet device with one VLAN subinterface +Guest #1 description: + One ethernet device with one VLAN subinterface +Test name: + virtual_ovs_bridge_vlan_in_guest.py +Test description: + Set device offload parameters: + + gso, gro, tso + + Guest#1 and Host#2 ethernet devices + Ping: + + count: 100 + + interval: 0.1s + + between guest1's VLAN10 and host2's VLAN10 + Netperf: + + duration: 60s + + TCP_STREAM and UDP_STREAM + + between guest1's VLAN10 and host2's VLAN10 diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py new file mode 100644 index 0000000..71c7f4d --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py @@ -0,0 +1,65 @@ +from lnst.Controller.Task import ctl + +# ------ +# SETUP +# ------ + +h1 = ctl.get_host("host1") +g1 = ctl.get_host("guest1") + +h2 = ctl.get_host("host2") + +g1.sync_resources(modules=["IcmpPing", "Netperf"]) +h2.sync_resources(modules=["IcmpPing", "Netperf"]) + +# ------ +# TESTS +# ------ + +offloads = ["gso", "gro", "tso"] + +ping_mod = ctl.get_module("IcmpPing", + options={ + "addr" : h2.get_ip("vlan10"), + "count" : 100, + "iface" : g1.get_devname("vlan10"), + "interval" : 0.1 + }) +netperf_srv = ctl.get_module("Netperf", + options={ + "role" : "server", + "bind" : g1.get_ip("vlan10") + }) + +netperf_cli_tcp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("vlan10"), + "duration" : 60, + "testname" : "TCP_STREAM", + "netperf_opts" : "-L %s" % + h2.get_ip("vlan10") + }) + +netperf_cli_udp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("vlan10"), + "duration" : 60, + "testname" : "UDP_STREAM", + "netperf_opts" : "-L %s" % + h2.get_ip("vlan10") + }) +for offload in offloads: + for state in ["on", "off"]: + g1.run("ethtool -K %s %s %s" % (g1.get_devname("guestnic"), + offload, state)) + h2.run("ethtool -K %s %s %s" % (h2.get_devname("nic"), + offload, state)) + g1.run(ping_mod) + server_proc = g1.run(netperf_srv, bg=True) + ctl.wait(2) + h2.run(netperf_cli_tcp, timeout=65) + h2.run(netperf_cli_udp, timeout=65) + + server_proc.intr() diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml new file mode 100644 index 0000000..4442e4a --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml @@ -0,0 +1,50 @@ +<lnstrecipe> + <network> + <host id="host1"> + <interfaces> + <eth id="nic" label="to_switch" /> + <eth id="tap" label="to_guest" /> + <ovs_bridge id="br"> + <slaves> + <slave id="tap" /> + <slave id="nic" /> + </slaves> + </ovs_bridge> + </interfaces> + </host> + <host id="guest1"> + <interfaces> + <eth id="guestnic" label="to_guest" /> + <vlan id="vlan10"> + <options> + <option name="vlan_tci" value="10" /> + </options> + <slaves> + <slave id="guestnic" /> + </slaves> + <addresses> + <address>192.168.10.10/24</address> + </addresses> + </vlan> + </interfaces> + </host> + <host id="host2"> + <interfaces> + <eth id="nic" label="to_switch" /> + <vlan id="vlan10"> + <options> + <option name="vlan_tci" value="10" /> + </options> + <slaves> + <slave id="nic" /> + </slaves> + <addresses> + <address>192.168.10.11/24</address> + </addresses> + </vlan> + </interfaces> + </host> + </network> + + <task python="virtual_ovs_bridge_vlan_in_guest.py" /> +</lnstrecipe> diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.README b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.README new file mode 100644 index 0000000..0674251 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.README @@ -0,0 +1,58 @@ +Topology: + + +----------+ + | | VLAN10 + +-----------------+ switch +--------------------+ + | | | | + | +----------+ | + | | + +-+-+ | ++------|nic|---------+ +-+-+ +| +-+-+ | +------|nic|------+ +| | | | +---+ | +| | | | | +| +------+-------+ | | | +| | vlan10 | | | host2 | +| | | | | | +| | ovs_bridge | | | | +| | | | | | +| +-+------------+ | +-----------------+ +| | | +| +-+-+ | ++-|tap|--------------+ + +-+-+ + | + | + | + +-+-+ ++-|nic|--+ +| +---+ | +| guest1 | +| | ++--------+ + +Number of hosts: 3 +Host #1 description: + One ethernet device + One tap device + One Open vSwitch bridge device, bridging the tap device and the ethernet + device, the ethernet device is used as an access port for VLAN 10 + Host for guest1 virtual machine +Host #2 description: + One ethernet device with one VLAN subinterface +Guest #1 description: + One ethernet device +Test name: + virtual_bridge_vlan_in_guest.py +Test description: + Set offload parameters: + + gso, gro, tso + + Guest#1 and Host#2 ethernet devices + Ping: + + count: 100 + + interval: 0.1s + + between guest1's NIC and host2's VLAN10 + Netperf: + + duration: 60s + + TCP_STREAM and UDP_STREAM + + between guest1's NIC and host2's VLAN10 diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py new file mode 100644 index 0000000..4543387 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py @@ -0,0 +1,66 @@ +from lnst.Controller.Task import ctl + +# ------ +# SETUP +# ------ + +h1 = ctl.get_host("host1") +g1 = ctl.get_host("guest1") + +h2 = ctl.get_host("host2") + +g1.sync_resources(modules=["IcmpPing", "Netperf"]) +h2.sync_resources(modules=["IcmpPing", "Netperf"]) + +# ------ +# TESTS +# ------ + +offloads = ["gso", "gro", "tso"] + +ping_mod = ctl.get_module("IcmpPing", + options={ + "addr" : h2.get_ip("vlan10"), + "count" : 100, + "iface" : g1.get_devname("guestnic"), + "interval" : 0.1 + }) +netperf_srv = ctl.get_module("Netperf", + options={ + "role" : "server", + "bind" : g1.get_ip("guestnic") + }) + +netperf_cli_tcp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("guestnic"), + "duration" : 60, + "testname" : "TCP_STREAM", + "netperf_opts" : "-L %s" % + h2.get_ip("vlan10") + }) + +netperf_cli_udp = ctl.get_module("Netperf", + options={ + "role" : "client", + "netperf_server" : g1.get_ip("guestnic"), + "duration" : 60, + "testname" : "UDP_STREAM", + "netperf_opts" : "-L %s" % + h2.get_ip("vlan10") + }) + +for offload in offloads: + for state in ["on", "off"]: + g1.run("ethtool -K %s %s %s" % (g1.get_devname("guestnic"), + offload, state)) + h2.run("ethtool -K %s %s %s" % (h2.get_devname("nic"), + offload, state)) + g1.run(ping_mod) + server_proc = g1.run(netperf_srv, bg=True) + ctl.wait(2) + h2.run(netperf_cli_tcp, timeout=65) + h2.run(netperf_cli_udp, timeout=65) + + server_proc.intr() diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml new file mode 100644 index 0000000..50eb792 --- /dev/null +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml @@ -0,0 +1,52 @@ +<lnstrecipe> + <network> + <host id="host1"> + <interfaces> + <eth id="nic" label="to_switch"/> + <eth id="tap" label="to_guest"/> + <ovs_bridge id="ovs_br"> + <slaves> + <slave id="tap" /> + <slave id="nic" /> + </slaves> + <vlan tag="10"> + <slaves> + <slave id="tap"/> + </slaves> + </vlan> + </ovs_bridge> + </interfaces> + </host> + <host id="guest1"> + <interfaces> + <eth id="guestnic" label="to_guest"> + <addresses> + <address>192.168.10.10/24</address> + </addresses> + </eth> + </interfaces> + </host> + <host id="host2"> + <interfaces> + <eth id="nic" label="to_switch"> + <params> + <param name="driver" value="virtio"/> + </params> + </eth> + <vlan id="vlan10"> + <options> + <option name="vlan_tci" value="10" /> + </options> + <slaves> + <slave id="nic" /> + </slaves> + <addresses> + <address>192.168.10.11/24</address> + </addresses> + </vlan> + </interfaces> + </host> + </network> + + <task python="./virtual_ovs_bridge_vlan_in_host.py" /> +</lnstrecipe>
lnst-developers@lists.fedorahosted.org