Support suite tags in autogen
[csit.git] / tests / vpp / device / interfaces / eth2p-ethicmpv4-ip4base-eth-1tap-namespace-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 |
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
18 | ... | NIC_Virtual | ETH | IP4FWD | BASE | IP4BASE | 1TAP | NAMESPACE
19 | ... | DRV_VFIO_PCI
20 | ... | ethicmpv4-ip4base-eth-1tap-namespace
21 |
22 | Suite Setup | Setup suite single link | scapy
23 | Test Setup | Setup test | namespace
24 | Test Teardown | Tear down test | packet_trace | namespace
25 |
26 | Test Template | Local Template
27 |
28 | Documentation | *Tap Interface Traffic Tests*
29 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
30 | ... | between nodes.
31 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for L2 switching of
32 | ... | IPv4.
33 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2
34 | ... | bridge-domain (L2BD) MAC learning enabled; Split Horizon Groups (SHG)
35 | ... | are set depending on test case; Namespaces (NM)
36 | ... | are set on DUT1 with attached linux-TAP.
37 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets
38 | ... | are sent by TG on link to DUT1; On receipt TG verifies packets
39 | ... | for correctness and their IPv4 src-addr, dst-addr, and MAC addresses.
40 | ... | *[Ref] Applicable standard specifications:*
41
42 *** Variables ***
43 | @{plugins_to_enable}= | dpdk_plugin.so
44 | ${crypto_type}= | ${None}
45 | ${nic_name}= | virtual
46 | ${nic_driver}= | vfio-pci
47 | ${overhead}= | ${0}
48 | ${tap1_VPP_ip}= | 16.0.10.1
49 | ${tap1_NM_ip}= | 16.0.10.2
50 | ${tap1_NM_mac}= | 02:00:00:00:00:02
51 | ${dut_ip_address}= | 192.168.0.1
52 | ${tg_ip_address}= | 192.168.0.2
53 | ${tg_ip_address_GW}= | 192.168.0.0
54 | ${prefix}= | 24
55
56 *** Keywords ***
57 | Local Template
58 | | [Documentation]
59 | | ... | [Cfg] On DUT1 configure two interface addresses with IPv4 of which\
60 | | ... | one is TAP interface (dut_to_tg_if and TAP) and one is linux-TAP in\
61 | | ... | namespace.
62 | | ... | [Ver] Packet sent from TG gets to the destination and ICMP-reply is\
63 | | ... | received on TG.
64 | |
65 | | ... | *Arguments:*
66 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
67 | | ... | - phy_cores - Number of physical cores. Type: integer
68 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
69 | |
70 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
71 | |
72 | | Set Test Variable | \${frame_size}
73 | |
74 | | Given Set Max Rate And Jumbo
75 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
76 | | And Pre-initialize layer driver | ${nic_driver}
77 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
78 | | When Initialize layer driver | ${nic_driver}
79 | | And Initialize layer interface
80 | | ${int1}= | And Add Tap Interface | ${dut1} | tap0
81 | | And VPP Interface Set IP Address
82 | | ... | ${dut1} | ${int1} | ${tap1_VPP_ip} | ${prefix}
83 | | And VPP Interface Set IP Address
84 | | ... | ${dut1} | ${dut1_if1} | ${dut_ip_address} | ${prefix}
85 | | And Set Interface State | ${dut1} | ${int1} | up
86 | | And Create Namespace | ${dut1} | nmspace1
87 | | And Attach Interface To Namespace | ${dut1} | nmspace1 | tap0
88 | | And Set Linux Interface MAC
89 | | ... | ${dut1} | tap0 | ${tap1_NM_mac} | nmspace1
90 | | And Set Linux Interface IP
91 | | ... | ${dut1} | tap0 | ${tap1_NM_ip} | ${prefix} | nmspace1
92 | | And VPP Add IP Neighbor
93 | | ... | ${dut1} | ${dut1_if1} | ${tg_ip_address} | ${tg_if1_mac}
94 | | And VPP Add IP Neighbor
95 | | ... | ${dut1} | ${int1} | ${tap1_NM_ip} | ${tap1_NM_mac}
96 | | And Add Linux Route
97 | | ... | ${dut1} | ${tg_ip_address_GW} | ${prefix} | ${tap1_VPP_ip} | nmspace1
98 | | Then Send ICMP echo request and verify answer
99 | | ... | ${tg} | ${tg_if1} | ${dut1_if1_mac} | ${tg_if1_mac}
100 | | ... | ${tap1_NM_ip} | ${tg_ip_address}
101
102 *** Test Cases ***
103 | tc01-64B-ethicmpv4-ip4base-eth-1tap-namespace-dev
104 | | [Tags] | 64B
105 | | frame_size=${64} | phy_cores=${0}