Align suite/test teardown/setup
[csit.git] / tests / vpp / device / container_memif / eth2p-eth-l2xcbase-eth-2memif-1dcr-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 | Resource | resources/libraries/robot/shared/default.robot
16 | Resource | resources/libraries/robot/l2/l2_xconnect.robot
17 | Resource | resources/libraries/robot/l2/l2_traffic.robot
18 | Resource | resources/libraries/robot/shared/testing_path.robot
19 | ...
20 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
21 | ... | FUNCTEST | L2XCFWD | BASE | ETH | MEMIF | DOCKER
22 | ...
23 | Suite Setup | Setup suite single link
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | container
26 | ...
27 | Documentation | *L2 cross-connect test cases with memif interface*
28 | ...
29 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
30 | ... | single links between nodes.
31 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
32 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6.
33 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 cross-connect \
34 | ... | (L2XC) switching. Container is connected to VPP via Memif interface. \
35 | ... | Container is running same VPP version as running on DUT.
36 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
37 | ... | are sent in both directions by TG on links to DUT1 and via container; \
38 | ... | on receive TG verifies packets for correctness and their IPv4 (IPv6) \
39 | ... | src-addr, dst-addr and MAC addresses.
40 | ... | *[Ref] Applicable standard specifications:* RFC792
41
42 *** Variables ***
43 | @{plugins_to_enable}= | dpdk_plugin.so | memif_plugin.so
44 | ${nic_name}= | virtual
45 # Memif
46 | ${sock_base}= | memif-DUT1_CNF
47 # Container
48 | ${container_engine}= | Docker
49 | ${container_chain_topology}= | chain_functional
50
51 *** Test Cases ***
52 | tc01-eth2p-ethip4-l2xcbase-eth-2memif-1dcr-device
53 | | [Documentation]
54 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT configure \
55 | | ... | two L2 cross-connects (L2XC), each with one untagged interface \
56 | | ... | to TG and untagged i/f to docker over memif. [Ver] Make \
57 | | ... | TG send ICMPv4 Echo Reqs in both directions between two of its \
58 | | ... | i/fs to be switched by DUT to and from docker; verify all packets \
59 | | ... | are received. [Ref]
60 | | ...
61 | | Given Add PCI devices to all DUTs
62 | | And Apply startup configuration on all VPP DUTs
63 | | And VPP Enable Traces On All Duts | ${nodes}
64 | | When Configure path in 2-node circular topology
65 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
66 | | And Start containers for device test
67 | | And Configure interfaces in path up
68 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
69 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
70 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
71 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${memif_if1}
72 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${memif_if2}
73 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
74 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
75
76 | tc02-eth2p-ethip6-l2xcbase-eth-2memif-1dcr-device
77 | | [Documentation]
78 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv6-ICMPv6. [Cfg] On DUT configure\
79 | | ... | two L2 cross-connects (L2XC), each with one untagged i/f to TG\
80 | | ... | and untagged i/f to docker over memif. [Ver] Make TG send\
81 | | ... | ICMPv6 Echo Reqs in both directions between two of its i/fs to\
82 | | ... | be switched by DUT to and from docker; verify all packets are\
83 | | ... | received. [Ref]
84 | | ...
85 | | Given Add PCI devices to all DUTs
86 | | And Apply startup configuration on all VPP DUTs
87 | | And VPP Enable Traces On All Duts | ${nodes}
88 | | When Configure path in 2-node circular topology
89 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
90 | | And Start containers for device test
91 | | And Configure interfaces in path up
92 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
93 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
94 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
95 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if1} | ${memif_if1}
96 | | And Configure L2XC | ${dut_node} | ${dut_to_tg_if2} | ${memif_if2}
97 | | Then Send ICMPv6 bidirectionally and verify received packets | ${tg_node}
98 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}