b504507a25b5ee2e56606ba1eb20c72a41ba5802
[csit.git] / tests / vpp / device / container_memif / eth2p-eth-l2bdbasemaclrn-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/l2/l2_bridge_domain.robot
16 | Resource | resources/libraries/robot/l2/l2_traffic.robot
17 | Resource | resources/libraries/robot/shared/default.robot
18 | Resource | resources/libraries/robot/shared/memif.robot
19 | Resource | resources/libraries/robot/shared/testing_path.robot
20 | ...
21 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
22 | ... | FUNCTEST | L2BDMACLRN | BASE | ETH | MEMIF | DOCKER
23 | ...
24 | Test Setup | Set up VPP device test
25 | ...
26 | Test Teardown | Tear down test | packet_trace | container
27 | ...
28 | Documentation | *L2 bridge-domain test cases with memif interface*
29 | ...
30 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
31 | ... | with single links between nodes.
32 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of \
33 | ... | IPv4; Eth-IPv6-ICMPv6 for L2 switching of IPv6 use. Both apply to all \
34 | ... | links.
35 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain \
36 | ... | switching. Container is connected to VPP via Memif interface. \
37 | ... | Container is running same VPP version as running on DUT.
38 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
39 | ... | are sent in both directions by TG on links to DUT1 and via container; \
40 | ... | on receive TG verifies packets for correctness and their IPv4 (IPv6) \
41 | ... | src-addr, dst-addr and MAC addresses.pecifications:* RFC792
42
43 *** Variables ***
44 # L2BD
45 | ${bd_id1}= | 1
46 | ${bd_id2}= | 2
47 # Memif
48 | ${sock_base}= | memif-DUT1_CNF
49 # Container
50 | ${container_engine}= | Docker
51 | ${container_chain_topology}= | chain_functional
52
53 # TODO: Add update of VPP PIDs after container creation
54 *** Test Cases ***
55 | tc01-eth2p-ethip4-l2bdbase-eth-2memif-1dcr-device
56 | | [Documentation]
57 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv4-ICMPv4. [Cfg] Configure two \
58 | | ... | L2 bridge-domains (L2BD) with MAC learning enabled on DUT1, each \
59 | | ... | with one untagged interface to TG and untagged i/f to docker over \
60 | | ... | memif. [Ver] Make TG send ICMPv4 Echo Req in both directions between \
61 | | ... | two of its interfaces to be switched by DUT1; verify all packets are \
62 | | ... | received.
63 | | ...
64 | | Given Configure path in 2-node circular topology
65 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
66 | | And Set up functional test with containers
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 Create bridge domain | ${dut_node} | ${bd_id1}
72 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
73 | | ... | ${bd_id1}
74 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
75 | | ... | ${bd_id1}
76 | | And Create bridge domain | ${dut_node} | ${bd_id2}
77 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
78 | | ... | ${bd_id2}
79 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
80 | | ... | ${bd_id2}
81 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
82 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
83
84 | tc02-eth2p-ethip6-l2bdbase-eth-2memif-1dcr-device
85 | | [Documentation]
86 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv6-ICMPv6. [Cfg] Configure two \
87 | | ... | L2 bridge-domains (L2BD) with MAC learning enabled on DUT1, each \
88 | | ... | with one untagged interface to TG and untagged i/f to docker over \
89 | | ... | memif. [Ver] Make TG send ICMPv4 Echo Req in both directions between \
90 | | ... | two of its interfaces to be switched by DUT1; verify all packets are \
91 | | ... | received.
92 | | ...
93 | | Given Configure path in 2-node circular topology
94 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
95 | | And Set up functional test with containers
96 | | And Configure interfaces in path up
97 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
98 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
99 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
100 | | And Create bridge domain | ${dut_node} | ${bd_id1}
101 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
102 | | ... | ${bd_id1}
103 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
104 | | ... | ${bd_id1}
105 | | And Create bridge domain | ${dut_node} | ${bd_id2}
106 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
107 | | ... | ${bd_id2}
108 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
109 | | ... | ${bd_id2}
110 | | Then Send ICMPv6 bidirectionally and verify received packets
111 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}