b182b0198f98557caa041133b01bce238442c8a2
[csit.git] / tests / vpp / device / vm_vhost / l2xc / eth2p-eth-l2xcbase-eth-2vhost-1vm-dev.robot
1 # Copyright (c) 2019 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.Trace
16 | Library | resources.libraries.python.NodePath
17 | Resource | resources/libraries/robot/shared/default.robot
18 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
19 | Resource | resources/libraries/robot/l2/l2_traffic.robot
20 | Resource | resources/libraries/robot/shared/testing_path.robot
21 | Resource | resources/libraries/robot/shared/interfaces.robot
22 | Resource | resources/libraries/robot/l2/l2_bridge_domain.robot
23 | ...
24 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
25 | ... | FUNCTEST | L2XCFWD | BASE | ETH | VHOST | 1VM
26 | ...
27 | Test Setup | Set up VPP device test
28 | ...
29 | Test Teardown | Run Keywords
30 | ... | Tear down QEMU
31 | ... | AND | Tear down VPP device test
32 | ...
33 | Documentation | *L2 cross-connect test cases with vhost user interface*
34 | ...
35 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
36 | ... | VM and single links between nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
38 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
39 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
40 | ... | (L2XC) switching. Qemu Guest is connected to VPP via vhost-user \
41 | ... | interfaces. Guest is configured with linux bridge interconnecting \
42 | ... | vhost-user interfaces.
43 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
44 | ... | are sent in both directions by TG on links to DUT1 via VM; on receive \
45 | ... | TG verifies packets for correctness and their IPv4 (IPv6) src-addr, \
46 | ... | dst-addr and MAC addresses.
47 | ... | *[Ref] Applicable standard specifications:* RFC792
48
49 *** Variables ***
50 | ${sock1}= | /tmp/sock1
51 | ${sock2}= | /tmp/sock2
52
53 *** Test Cases ***
54 | tc01-eth2p-ethip4-l2xcbase-eth-2vhost-1vm-device
55 | | [Documentation]
56 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
57 | | ... | two L2 cross-connects (L2XC), each with one untagged interface \
58 | | ... | to TG and untagged i/f to local VM over vhost-user. [Ver] Make \
59 | | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
60 | | ... | i/fs to be switched by DUT to and from VM; verify all packets \
61 | | ... | are received. [Ref]
62 | | ...
63 | | Given Configure path in 2-node circular topology
64 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
65 | | And Configure interfaces in path up
66 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
67 | | ... | ${sock1} | ${sock2}
68 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
69 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
70 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
71 | | ... | ${sock2}
72 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
73 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
74
75 | tc02-eth2p-ethip6-l2xcbase-eth-2vhost-1vm-device
76 | | [Documentation]
77 | | ... | [Top] TG=DUT=VM. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure \
78 | | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG \
79 | | ... | and untagged i/f to local VM over vhost-user. [Ver] Make TG send \
80 | | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to \
81 | | ... | be switched by DUT to and from VM; verify all packets are \
82 | | ... | received. [Ref]
83 | | ...
84 | | Given Configure path in 2-node circular topology
85 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
86 | | And Configure interfaces in path up
87 | | When Configure vhost interfaces for L2BD forwarding | ${dut_node}
88 | | ... | ${sock1} | ${sock2}
89 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${vhost_if1}
90 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${vhost_if2}
91 | | And Configure VM for vhost L2BD forwarding | ${dut_node} | ${sock1}
92 | | ... | ${sock2}
93 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
94 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}