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