6d4cffd8344d8ef7f4d590e42a3cf834b7ccf191
[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/shared/default.robot
16 | Resource | resources/libraries/robot/l2/l2_bridge_domain.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 | L2BDMACLRN | 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 bridge-domain test cases with memif interface*
28 | ...
29 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
30 | ... | with 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 use. Both apply to all \
33 | ... | links.
34 | ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-domain \
35 | ... | switching. Container is connected to VPP via Memif interface. \
36 | ... | Container is running same VPP version as running on DUT.
37 | ... | *[Ver] TG verification:* Test ICMPv4 (or ICMPv6) Echo Request packets \
38 | ... | are sent in both directions by TG on links to DUT1 and via container; \
39 | ... | on receive TG verifies packets for correctness and their IPv4 (IPv6) \
40 | ... | src-addr, dst-addr and MAC addresses.pecifications:* RFC792
41
42 *** Variables ***
43 | @{plugins_to_enable}= | dpdk_plugin.so | memif_plugin.so
44 | ${nic_name}= | virtual
45 # L2BD
46 | ${bd_id1}= | 1
47 | ${bd_id2}= | 2
48 # Memif
49 | ${sock_base}= | memif-DUT1_CNF
50 # Container
51 | ${container_engine}= | Docker
52 | ${container_chain_topology}= | chain_functional
53
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 Add PCI devices to all DUTs
65 | | And Apply startup configuration on all VPP DUTs
66 | | And VPP Enable Traces On All Duts | ${nodes}
67 | | When Configure path in 2-node circular topology
68 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
69 | | And Start containers for device test
70 | | And Configure interfaces in path up
71 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
72 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
73 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
74 | | And Create bridge domain | ${dut_node} | ${bd_id1}
75 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
76 | | ... | ${bd_id1}
77 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
78 | | ... | ${bd_id1}
79 | | And Create bridge domain | ${dut_node} | ${bd_id2}
80 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
81 | | ... | ${bd_id2}
82 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
83 | | ... | ${bd_id2}
84 | | Then Send ICMPv4 bidirectionally and verify received packets | ${tg_node}
85 | | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2}
86
87 | tc02-eth2p-ethip6-l2bdbase-eth-2memif-1dcr-device
88 | | [Documentation]
89 | | ... | [Top] TG=DUT=DCR. [Enc] Eth-IPv6-ICMPv6. [Cfg] Configure two \
90 | | ... | L2 bridge-domains (L2BD) with MAC learning enabled on DUT1, each \
91 | | ... | with one untagged interface to TG and untagged i/f to docker over \
92 | | ... | memif. [Ver] Make TG send ICMPv4 Echo Req in both directions between \
93 | | ... | two of its interfaces to be switched by DUT1; verify all packets are \
94 | | ... | received.
95 | | ...
96 | | Given Add PCI devices to all DUTs
97 | | And Apply startup configuration on all VPP DUTs
98 | | And VPP Enable Traces On All Duts | ${nodes}
99 | | When Configure path in 2-node circular topology
100 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
101 | | And Start containers for device test
102 | | And Configure interfaces in path up
103 | | When Set up memif interfaces on DUT node | ${dut_node} | ${sock_base}
104 | | ... | ${sock_base} | dcr_uuid=${dcr_uuid}
105 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2 | rxq=${0} | txq=${0}
106 | | And Create bridge domain | ${dut_node} | ${bd_id1}
107 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if1}
108 | | ... | ${bd_id1}
109 | | And Add interface to bridge domain | ${dut_node} | ${memif_if1}
110 | | ... | ${bd_id1}
111 | | And Create bridge domain | ${dut_node} | ${bd_id2}
112 | | And Add interface to bridge domain | ${dut_node} | ${dut_to_tg_if2}
113 | | ... | ${bd_id2}
114 | | And Add interface to bridge domain | ${dut_node} | ${memif_if2}
115 | | ... | ${bd_id2}
116 | | Then Send ICMPv6 bidirectionally and verify received packets
117 | | ... | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2}