aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/libraries/bash/function/device.sh4
-rw-r--r--resources/libraries/python/L2Util.py2
-rw-r--r--resources/libraries/python/QemuUtils.py7
-rw-r--r--resources/libraries/python/ssh.py62
-rw-r--r--tests/vpp/device/__init__.robot4
-rw-r--r--tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot26
-rw-r--r--tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot26
-rw-r--r--tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot26
-rw-r--r--tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot26
-rw-r--r--tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot108
-rw-r--r--tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot112
-rw-r--r--tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot112
-rw-r--r--tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot95
13 files changed, 542 insertions, 68 deletions
diff --git a/resources/libraries/bash/function/device.sh b/resources/libraries/bash/function/device.sh
index e4ed319c7f..7363dc0df6 100644
--- a/resources/libraries/bash/function/device.sh
+++ b/resources/libraries/bash/function/device.sh
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -517,6 +517,8 @@ function start_topology_containers () {
# Mount vfio to be able to bind to see binded interfaces. We cannot use
# --device=/dev/vfio as this does not see newly binded interfaces.
dcr_stc_params+="--volume /dev/vfio:/dev/vfio "
+ # Mount nested_vm image to be able to run VM tests.
+ dcr_stc_params+="--volume /var/lib/vm/vhost-nested.img:/var/lib/vm/vhost-nested.img "
# Docker Container UUIDs.
declare -gA DCR_UUIDS
diff --git a/resources/libraries/python/L2Util.py b/resources/libraries/python/L2Util.py
index 97cef611c5..52d138552b 100644
--- a/resources/libraries/python/L2Util.py
+++ b/resources/libraries/python/L2Util.py
@@ -283,7 +283,7 @@ class L2Util(object):
:param br_name: Bridge name.
:param set_down: Change bridge interface state to down before delbr
command. Optional. Default: True.
- :type node: str
+ :type node: dict
:type br_name: str
:type set_down: bool
"""
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py
index ff3a00f730..037d0de58c 100644
--- a/resources/libraries/python/QemuUtils.py
+++ b/resources/libraries/python/QemuUtils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -213,7 +213,10 @@ class QemuUtils(object):
self._ssh = SSH()
self._ssh.connect(node)
self._vm_info['host'] = node['host']
-
+ if node['port'] != 22:
+ self._vm_info['host_port'] = node['port']
+ self._vm_info['host_username'] = node['username']
+ self._vm_info['host_password'] = node['password']
arch = Topology.get_node_arch(node)
self._qemu_opt['qemu_bin'] = 'qemu-system-{arch}'.format(arch=arch)
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index 108c1e4e1e..4beec5aa83 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -13,15 +13,15 @@
"""Library for SSH connection management."""
+import paramiko
+import socket
import StringIO
-from time import time, sleep
-import socket
-import paramiko
from paramiko import RSAKey
-from paramiko.ssh_exception import SSHException
-from scp import SCPClient
+from paramiko.ssh_exception import SSHException, NoValidConnectionsError
from robot.api import logger
+from scp import SCPClient
+from time import time, sleep
__all__ = ["exec_cmd", "exec_cmd_no_error"]
@@ -104,6 +104,10 @@ class SSH(object):
except SSHException:
raise IOError('Cannot connect to {host}'.
format(host=node['host']))
+ except NoValidConnectionsError as err:
+ logger.error(repr(err))
+ raise IOError('Unable to connect to port {port} on {host}'.
+ format(port=node['port'], host=node['host']))
def disconnect(self, node):
"""Close SSH connection to the node.
@@ -320,7 +324,7 @@ class SSH(object):
def interactive_terminal_close(chan):
"""Close interactive terminal SSH channel.
- :param: chan: SSH channel to be closed.
+ :param chan: SSH channel to be closed.
"""
chan.close()
@@ -371,6 +375,17 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
"""Convenience function to ssh/exec/return rc, out & err.
Returns (rc, stdout, stderr).
+
+ :param node: The node to execute command on.
+ :param cmd: Command to execute.
+ :param timeout: Timeout value in seconds. Default: 600.
+ :param sudo: Sudo privilege execution flag. Default: False.
+ :type node: dict
+ :type cmd: str
+ :type timeout: int
+ :type sudo: bool
+ :returns: RC, Stdout, Stderr.
+ :rtype: tuple(int, str, str)
"""
if node is None:
raise TypeError('Node parameter is None')
@@ -380,10 +395,35 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
raise ValueError('Empty command parameter')
ssh = SSH()
+
+ if node.get('host_port') is not None:
+ ssh_node = dict()
+ ssh_node['host'] = '127.0.0.1'
+ ssh_node['port'] = node['port']
+ ssh_node['username'] = node['username']
+ ssh_node['password'] = node['password']
+ import pexpect
+ options = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
+ tnl = '-L {port}:127.0.0.1:{port}'.format(port=node['port'])
+ ssh_cmd = 'ssh {tnl} {op} {user}@{host} -p {host_port}'.\
+ format(tnl=tnl, op=options, user=node['host_username'],
+ host=node['host'], host_port=node['host_port'])
+ logger.trace('Initializing local port forwarding:\n{ssh_cmd}'.
+ format(ssh_cmd=ssh_cmd))
+ child = pexpect.spawn(ssh_cmd)
+ child.expect('.* password: ')
+ logger.trace(child.after)
+ child.sendline(node['host_password'])
+ child.expect('Welcome .*')
+ logger.trace(child.after)
+ logger.trace('Local port forwarding finished.')
+ else:
+ ssh_node = node
+
try:
- ssh.connect(node)
+ ssh.connect(ssh_node)
except SSHException as err:
- logger.error("Failed to connect to node" + str(err))
+ logger.error("Failed to connect to node" + repr(err))
return None, None, None
try:
@@ -393,7 +433,7 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
(ret_code, stdout, stderr) = ssh.exec_command_sudo(cmd,
timeout=timeout)
except SSHException as err:
- logger.error(err)
+ logger.error(repr(err))
return None, None, None
return ret_code, stdout, stderr
@@ -416,7 +456,7 @@ def exec_cmd_no_error(node, cmd, timeout=600, sudo=False, message=None):
:type message: str
:returns: Stdout, Stderr.
:rtype: tuple(str, str)
- :raise RuntimeError: If bash return code is not 0.
+ :raises RuntimeError: If bash return code is not 0.
"""
ret_code, stdout, stderr = exec_cmd(node, cmd, timeout=timeout, sudo=sudo)
msg = ('Command execution failed: "{cmd}"\n{stderr}'.
diff --git a/tests/vpp/device/__init__.robot b/tests/vpp/device/__init__.robot
index 916a903f83..8b0788c362 100644
--- a/tests/vpp/device/__init__.robot
+++ b/tests/vpp/device/__init__.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -17,6 +17,7 @@
| Library | resources.libraries.python.SetupFramework
| Library | resources.libraries.python.SetupFramework.CleanupFramework
| Library | resources.libraries.python.CpuUtils
+| ...
| Suite Setup | Run Keywords | Setup Global Variables
| ... | AND | Setup Framework | ${nodes}
| ... | AND | Install Vpp On All Duts | ${nodes} | ${packages_dir}
@@ -25,6 +26,7 @@
| ... | AND | Get CPU Layout from all nodes | ${nodes}
| ... | AND | Update All Interface Data On All Nodes | ${nodes}
| ... | skip_tg_udev=${True}
+| ...
| Suite Teardown | Cleanup Framework | ${nodes}
*** Keywords ***
diff --git a/tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot b/tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot
index 3456079b8e..22bb4c3b4f 100644
--- a/tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot
+++ b/tests/vpp/device/ip4/eth2p-ethip4-ip4base-dev.robot
@@ -26,14 +26,14 @@
| ...
| Documentation | *IPv4 routing test cases*
| ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
| ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on both\
-| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and two\
-| ... | static IPv4 /24 route entries.
-| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in\
-| ... | one direction by TG on links to DUT1; on receive TG verifies packets\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
+| ... | two static IPv4 /24 route entries.
+| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
| ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
| ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
@@ -49,7 +49,7 @@
*** Test Cases ***
| tc01-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-ingress-interface
| | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req to DUT1 ingress interface. Make TG\
+| | ... | Make TG send ICMPv4 Echo Req to DUT1 ingress interface. Make TG \
| | ... | verify ICMP Echo Reply is correct.
| | ...
| | ${hops}= | Set Variable | ${0}
@@ -66,7 +66,7 @@
| tc02-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-egress-interface
| | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface. Make TG\
+| | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface. Make TG \
| | ... | verify ICMP Echo Reply is correct.
| | ...
| | ${hops}= | Set Variable | ${0}
@@ -83,8 +83,8 @@
| tc03-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-local-ipv4-address
| | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for\
-| | ... | locally connected IPv4 addresses. Make TG verify ICMPv4 Echo Replies\
+| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
+| | ... | locally connected IPv4 addresses. Make TG verify ICMPv4 Echo Replies \
| | ... | are correct.
| | ...
| | ${hops}= | Set Variable | ${1}
@@ -101,8 +101,8 @@
| tc04-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
| | [Documentation]
-| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for\
-| | ... | remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies are\
+| | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
+| | ... | remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies are \
| | ... | correct.
| | ...
| | ${hops}= | Set Variable | ${1}
diff --git a/tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot b/tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot
index e1ba73bf68..9993c922f5 100644
--- a/tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot
+++ b/tests/vpp/device/ip6/eth2p-ethip6-ip6base-dev.robot
@@ -26,14 +26,14 @@
| ...
| Documentation | *IPv6 routing test cases*
| ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
| ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on both\
-| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and two\
-| ... | static IPv6 /64 route entries.
-| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in\
-| ... | one direction by TG on links to DUT1; on receive TG verifies packets\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
+| ... | two static IPv6 /64 route entries.
+| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
| ... | for correctness and their IPv6 src-addr, dst-addr and MAC addresses.
| ... | *[Ref] Applicable standard specifications:* RFC2460, RFC4443, RFC4861
@@ -49,7 +49,7 @@
*** Test Cases ***
| tc01-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-ingress-interface
| | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req to DUT1 ingress interface. Make TG\
+| | ... | Make TG send ICMPv6 Echo Req to DUT1 ingress interface. Make TG \
| | ... | verify ICMPv6 Echo Reply is correct.
| | ...
| | ${hops}= | Set Variable | ${0}
@@ -67,7 +67,7 @@
| tc02-eth2p-ethicmpv6-ip6base-device_echo-req-to-dut-egress-interface
| | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface. Make TG\
+| | ... | Make TG send ICMPv6 Echo Req towards DUT1 egress interface. Make TG \
| | ... | verify ICMPv6 Echo Reply is correct.
| | ...
| | ${hops}= | Set Variable | ${0}
@@ -85,8 +85,8 @@
| tc03-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-local-ipv4-address
| | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for\
-| | ... | locally connected IPv6 addresses. Make TG verify ICMPv6 Echo Replies\
+| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
+| | ... | locally connected IPv6 addresses. Make TG verify ICMPv6 Echo Replies \
| | ... | are correct.
| | ...
| | ${hops}= | Set Variable | ${1}
@@ -104,8 +104,8 @@
| tc04-eth2p-ethicmpv6-ip6base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
| | [Documentation]
-| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for\
-| | ... | remote host IPv6 addresses. Make TG verify ICMPv6 Echo Replies are\
+| | ... | Make TG send ICMPv6 Echo Req between its interfaces across DUT1 for \
+| | ... | remote host IPv6 addresses. Make TG verify ICMPv6 Echo Replies are \
| | ... | correct.
| | ...
| | ${hops}= | Set Variable | ${1}
diff --git a/tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot b/tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot
index 2eca31931e..25653207e2 100644
--- a/tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot
+++ b/tests/vpp/device/l2bd/eth2p-eth-l2bdbasemaclrn-dev.robot
@@ -27,16 +27,16 @@
| ...
| Documentation | *L2 bridge-domain test cases*
| ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
| ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of\
-| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all \
| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain\
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain \
| ... | switching.
-| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets\
-| ... | are sent in both directions by TG on links to DUT1; on receive TG\
-| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,\
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1; on receive TG \
+| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, \
| ... | dst-addr and MAC addresses.
| ... | *[Ref] Applicable standard specifications:* RFC792
@@ -47,10 +47,10 @@
| tc01-eth2p-ethicmpv4-l2bdbase-device
| | [Documentation]
| | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv4-ICMPv4.
-| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
+| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on \
| | ... | DUT1. Add both interfaces towards TG to this L2BD.
-| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
| | ... | received.
| | ...
| | Given Configure path in 2-node circular topology
@@ -68,10 +68,10 @@
| tc02-eth2p-ethicmpv6-l2bdbase-device
| | [Documentation]
| | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv6-ICMPv6.
-| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on\
+| | ... | [Cfg] Configure L2 bridge-domain (L2BD) with MAC learning enabled on \
| | ... | DUT1. Add both interfaces towards TG to this L2BD.
-| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
| | ... | received.
| | ...
| | Given Configure path in 2-node circular topology
diff --git a/tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot b/tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot
index 541744847c..47e3d9695a 100644
--- a/tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot
+++ b/tests/vpp/device/l2xc/eth2p-ethicmp-l2xcbase-dev.robot
@@ -26,16 +26,16 @@
| ...
| Documentation | *L2 cross-connect test cases*
| ...
-| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
| ... | with single links between nodes.
-| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of\
-| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all\
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all \
| ... | links.
-| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect\
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
| ... | switching.
-| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets\
-| ... | are sent in both directions by TG on links to DUT1; on receive TG\
-| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr,\
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1; on receive TG \
+| ... | verifies packets for correctness and their IPv4 (IPv6) src-addr, \
| ... | dst-addr and MAC addresses.
| ... | *[Ref] Applicable standard specifications:* RFC792
@@ -43,10 +43,10 @@
| tc01-eth2p-ethicmpv4-l2xcbase-device
| | [Documentation]
| | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv4-ICMPv4.
-| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces\
+| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces \
| | ... | towards TG on DUT1.
-| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv4 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
| | ... | received.
| | ...
| | Given Configure path in 2-node circular topology
@@ -60,10 +60,10 @@
| tc02-eth2p-ethicmpv6-l2xcbase-device
| | [Documentation]
| | ... | [Top] TG-DUT1-TG. [Enc] Eth-IPv6-ICMPv6.
-| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces\
+| | ... | [Cfg] Configure L2 cross-connects (L2XC) between both interfaces \
| | ... | towards TG on DUT1.
-| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of\
-| | ... | its interfaces to be switched by DUT1; verify all packets are\
+| | ... | [Ver] Make TG send ICMPv6 Echo Req in both directions between two of \
+| | ... | its interfaces to be switched by DUT1; verify all packets are \
| | ... | received.
| | ...
| | Given Configure path in 2-node circular topology
diff --git a/tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot
new file mode 100644
index 0000000000..f421f59b26
--- /dev/null
+++ b/tests/vpp/device/vm_vhost/ip4/eth2p-ethip4-ip4base-eth-2vhost-1vm-dev.robot
@@ -0,0 +1,108 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.VhostUser
+| Library | resources.libraries.python.VPPUtil
+| Resource | resources/libraries/robot/ip/ip4.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/traffic.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | IP4FWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *IPv4 routing test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
+| ... | two static IPv4 /24 route entries. Qemu Guest is connected to VPP via \
+| ... | vhost-user interfaces. Guest is configured with linux bridge \
+| ... | interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
+| ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
+
+*** Variables ***
+| ${net1}= | 10.0.1.0
+| ${net3}= | 10.0.3.0
+| ${net1_ip1}= | 10.0.1.1
+| ${net1_ip2}= | 10.0.1.2
+| ${net2_ip1}= | 10.0.2.1
+| ${net2_ip2}= | 10.0.2.2
+| ${net3_ip1}= | 10.0.3.1
+| ${net3_ip2}= | 10.0.3.2
+| ${prefix_length}= | 24
+| ${fib_table_2}= | 20
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-ip4base-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | Test uses two VRFs to route IPv4 traffic through two vhost-user \
+| | ... | interfaces. Both interfaces are configured with IP addresses from \
+| | ... | the same network. There is created linux bridge on VM to pass packet \
+| | ... | from one vhost-user interface to another one.
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock1}
+| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock2}
+| | And Set Interface State | ${dut_node} | ${vhost1} | up
+| | And Set Interface State | ${dut_node} | ${vhost2} | up
+| | And Add Fib Table | ${dut_node} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${vhost2} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${dut_to_tg_if2} | ${fib_table_2}
+| | And Configure IP addresses on interfaces
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_ip1} | ${prefix_length}
+| | ... | ${dut_node} | ${vhost1} | ${net2_ip1} | ${prefix_length}
+| | ... | ${dut_node} | ${vhost2} | ${net2_ip2} | ${prefix_length}
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip1} | ${prefix_length}
+| | ${vhost2_mac}= | And Get Vhost User Mac By SW Index
+| | ... | ${dut_node} | ${vhost2}
+| | And Vpp Route Add | ${dut_node} | ${net3} | ${prefix_length} | ${net2_ip2}
+| | ... | ${vhost1} | resolve_attempts=${NONE} | count=${NONE}
+| | And Vpp Route Add | ${dut_node} | ${net1} | ${prefix_length} | ${net2_ip1}
+| | ... | ${vhost2} | resolve_attempts=${NONE} | count=${NONE}
+| | ... | vrf=${fib_table_2}
+| | Add IP Neighbor | ${dut_node} | ${vhost1} | ${net2_ip2} | ${vhost2_mac}
+| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if2_mac}
+| | When Configure VM for vhost L2BD forwarding
+| | ... | ${dut_node} | ${sock1} | ${sock2}
+| | Then Send packet and verify headers
+| | ... | ${tg_node} | ${net1_ip2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
diff --git a/tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot
new file mode 100644
index 0000000000..b1dd99858b
--- /dev/null
+++ b/tests/vpp/device/vm_vhost/ip6/eth2p-ethip6-ip6base-eth-2vhost-1vm-dev.robot
@@ -0,0 +1,112 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPUtil
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.VhostUser
+| Library | resources.libraries.python.VPPUtil
+| Resource | resources/libraries/robot/ip/ip6.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/traffic.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | IP6FWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *IPv4 routing test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv6-ICMPv6 for IPv6 routing on \
+| ... | both links.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
+| ... | two static IPv6 /64 route entries. Qemu Guest is connected to VPP via \
+| ... | vhost-user interfaces. Guest is configured with linux bridge \
+| ... | interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv6 Echo Request packets are sent in \
+| ... | one direction by TG on links to DUT1; on receive TG verifies packets \
+| ... | for correctness and their IPv6 src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC2460, RFC4443, RFC4861
+
+*** Variables ***
+| ${net1}= | 2001:1::0
+| ${net3}= | 2001:3::0
+| ${net1_ip1}= | 2001:1::1
+| ${net1_ip2}= | 2001:1::2
+| ${net2_ip1}= | 2001:2::1
+| ${net2_ip2}= | 2001:2::2
+| ${net3_ip1}= | 2001:3::1
+| ${net3_ip2}= | 2001:3::2
+| ${prefix_length}= | 64
+| ${fib_table_2}= | 20
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip6-ip6base-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | Test uses two VRFs to route IPv6 traffic through two vhost-user \
+| | ... | interfaces. Both interfaces are configured with IP addresses from \
+| | ... | the same network. There is created linux bridge on VM to pass packet \
+| | ... | from one vhost-user interface to another one.
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | ${vhost1}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock1}
+| | ${vhost2}= | And Vpp Create Vhost User Interface | ${dut_node} | ${sock2}
+| | And Set Interface State | ${dut_node} | ${vhost1} | up
+| | And Set Interface State | ${dut_node} | ${vhost2} | up
+| | And Add Fib Table | ${dut_node} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${vhost2} | ${fib_table_2}
+| | And Assign Interface To Fib Table | ${dut_node}
+| | ... | ${dut_to_tg_if2} | ${fib_table_2}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${dut_to_tg_if1} | ${net1_ip1} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${vhost1} | ${net2_ip1} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${vhost2} | ${net2_ip2} | ${prefix_length}
+| | And Vpp Set If IPv6 Addr
+| | ... | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip1} | ${prefix_length}
+| | And Suppress ICMPv6 router advertisement message | ${nodes}
+| | ${vhost2_mac}= | And Get Vhost User Mac By SW Index
+| | ... | ${dut_node} | ${vhost2}
+| | And Vpp Route Add | ${dut_node} | ${net3} | ${prefix_length} | ${net2_ip2}
+| | ... | ${vhost1} | resolve_attempts=${NONE} | count=${NONE}
+| | And Vpp Route Add | ${dut_node} | ${net1} | ${prefix_length} | ${net2_ip1}
+| | ... | ${vhost2} | resolve_attempts=${NONE} | count=${NONE}
+| | ... | vrf=${fib_table_2}
+| | Add IP Neighbor | ${dut_node} | ${vhost1} | ${net2_ip2} | ${vhost2_mac}
+| | Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if2_mac}
+| | When Configure VM for vhost L2BD forwarding
+| | ... | ${dut_node} | ${sock1} | ${sock2}
+| | Then Send packet and verify headers
+| | ... | ${tg_node} | ${net1_ip2} | ${net3_ip2}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac}
diff --git a/tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot
new file mode 100644
index 0000000000..7b7d3fbb78
--- /dev/null
+++ b/tests/vpp/device/vm_vhost/l2bd/eth2p-eth-l2bdbasemaclrn-eth-2vhost-1vm-dev.robot
@@ -0,0 +1,112 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.Trace
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | L2BDMACLRN | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *L2 bridge-domain test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 \
+| ... | bridge-domains (L2BD) switching combined with MAC learning enabled. \
+| ... | Qemu Guest is connected to VPP via vhost-user interfaces. Guest is \
+| ... | configured with linux bridge interconnecting vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1 via VM; on \
+| ... | receive TG verifies packets for correctness and their IPv4 (IPv6) \
+| ... | src-addr, dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC792
+
+*** Variables ***
+| ${bd_id1}= | 1
+| ${bd_id2}= | 2
+
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-l2bdbasemaclrn-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 configure \
+| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local \
+| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two \
+| | ... | virtio i/fs. [Ver] Make TG verify ICMPv4 Echo Req pkts are \
+| | ... | switched thru DUT1 and VM in both directions and are correct on \
+| | ... | receive. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1}
+| | ... | ${sock2}
+| | And Create bridge domain | ${dut_node} | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ... | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1}
+| | ... | ${bd_id1}
+| | And Create bridge domain | ${dut_node} | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ... | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2}
+| | ... | ${bd_id2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
+
+| tc02-eth2p-ethip6-l2bdbasemaclrn-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT1 configure \
+| | ... | two L2BDs with MAC learning, each with vhost-user i/f to local \
+| | ... | VM and i/f to TG; configure VM to loop pkts back betwen its two \
+| | ... | virtio i/fs. [Ver] Make TG verify ICMPv6 Echo Req pkts are \
+| | ... | switched thru DUT1 and VM in both directions and are correct on \
+| | ... | receive. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1}
+| | ... | ${sock2}
+| | And Create bridge domain | ${dut_node} | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
+| | ... | ${bd_id1}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if1}
+| | ... | ${bd_id1}
+| | And Create bridge domain | ${dut_node} | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
+| | ... | ${bd_id2}
+| | And Add interface to bridge domain | ${dut_node} | ${vhost_if2}
+| | ... | ${bd_id2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
diff --git a/tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot b/tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot
new file mode 100644
index 0000000000..3c7113601e
--- /dev/null
+++ b/tests/vpp/device/vm_vhost/l2xc/eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot
@@ -0,0 +1,95 @@
+# Copyright (c) 2019 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.Trace
+| Library | resources.libraries.python.NodePath
+| Resource | resources/libraries/robot/shared/default.robot
+| Resource | resources/libraries/robot/l2/l2_xconnect.robot
+| Resource | resources/libraries/robot/l2/l2_traffic.robot
+| Resource | resources/libraries/robot/shared/testing_path.robot
+| Resource | resources/libraries/robot/shared/interfaces.robot
+| Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
+| Resource | resources/libraries/robot/vm/qemu.robot
+| ...
+| Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
+| ... | FUNCTEST | L2XCFWD | BASE | ETH | VHOST | 1VM
+| ...
+| Test Setup | Set up VPP device test
+| ...
+| Test Teardown | Run Keywords
+| ... | Stop and clear QEMU | ${dut_node} | ${vm_node}
+| ... | AND | Tear down VPP device test
+| ...
+| Documentation | *L2 cross-connect test cases with vhost user interface*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
+| ... | VM and single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
+| ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
+| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
+| ... | (L2XC) switching. Qemu Guest is connected to VPP via vhost-user \
+| ... | interfaces. Guest is configured with linux bridge interconnecting \
+| ... | vhost-user interfaces.
+| ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
+| ... | are sent in both directions by TG on links to DUT1 via VM; on receive \
+| ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr, \
+| ... | dst-addr and MAC addresses.
+| ... | *[Ref] Applicable standard specifications:* RFC792
+
+*** Variables ***
+| ${sock1}= | /tmp/sock1
+| ${sock2}= | /tmp/sock2
+
+*** Test Cases ***
+| tc01-eth2p-ethip4-l2xcbase-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
+| | ... | two L2 cross-connects (L2XC), each with one untagged interface \
+| | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make \
+| | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
+| | ... | i/fs to be switched by DUT to and from VM; verify all packets \
+| | ... | are received. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1} | ${sock2}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
+
+| tc02-eth2p-ethip6-l2xcbase-eth-2vhost-1vm-device
+| | [Documentation]
+| | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \
+| | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG \
+| | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send \
+| | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to \
+| | ... | be switched by DUT to and from VM; verify all packets are \
+| | ... | received. [Ref]
+| | ...
+| | Given Configure path in 2-node circular topology
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
+| | And Configure interfaces in path up
+| | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
+| | ... | ${sock1} | ${sock2}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
+| | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
+| | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
+| | ... | ${sock2}
+| | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}