f9b6ebf314355cfd9e32ad0bc86cb5ac25764180
[csit.git] / tests / vpp / device / ip4 / eth2p-ethip4-ip4base-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
19 | ...
20 | Suite Setup | Setup suite single link | scapy
21 | Test Setup | Setup test
22 | Test Teardown | Tear down test | packet_trace
23 | ...
24 | Documentation | *IPv4 routing test cases*
25 | ...
26 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology \
27 | ... | with single links between nodes.
28 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 for IPv4 routing on \
29 | ... | both links.
30 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
31 | ... | two static IPv4 /24 route entries.
32 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
33 | ... | one direction by TG on links to DUT1; on receive TG verifies packets \
34 | ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
35 | ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
36
37 *** Variables ***
38 | @{plugins_to_enable}= | dpdk_plugin.so
39 | ${nic_name}= | virtual
40 | ${overhead}= | ${0}
41
42 *** Test Cases ***
43 | tc01-eth2p-ethicmpv4-ip4base-dev_echo-req-to-dut-ingress-interface
44 | | [Documentation]
45 | | ... | [Ver] Make TG send ICMPv4 Echo Req to DUT1 ingress interface.\
46 | | ... | Make TG verify ICMP Echo Reply is correct.
47 | | ...
48 | | Set Test Variable | ${frame_size} | ${42}
49 | | Set Test Variable | ${rxq_count_int} | ${1}
50 | | ...
51 | | Given Add PCI devices to all DUTs
52 | | And Set Max Rate And Jumbo And Handle Multi Seg
53 | | And Apply startup configuration on all VPP DUTs
54 | | And VPP Enable Traces On All Duts | ${nodes}
55 | | When Initialize IPv4 forwarding in circular topology
56 | | Then Send IPv4 ping packet and verify headers
57 | | ... | ${tg} | ${tg_if1} | ${dut1} | ${dut1_if1}
58 | | ... | 10.10.10.2 | 10.10.10.1 | ${dut1_if1_mac} | ${0}
59
60 | tc02-eth2p-ethicmpv4-ip4base-dev_echo-req-to-dut-egress-interface
61 | | [Documentation]
62 | | ... | [Ver] Make TG send ICMPv4 Echo Req towards DUT1 egress interface.\
63 | | ... | Make TG verify ICMP Echo Reply is correct.
64 | | ...
65 | | Set Test Variable | ${frame_size} | ${42}
66 | | Set Test Variable | ${rxq_count_int} | ${1}
67 | | ...
68 | | Given Add PCI devices to all DUTs
69 | | And Set Max Rate And Jumbo And Handle Multi Seg
70 | | And Apply startup configuration on all VPP DUTs
71 | | And VPP Enable Traces On All Duts | ${nodes}
72 | | When Initialize IPv4 forwarding in circular topology
73 | | Then Send IPv4 ping packet and verify headers
74 | | ... | ${tg} | ${tg_if1} | ${dut1} | ${dut1_if2}
75 | | ... | 10.10.10.2 | 20.20.20.1 | ${dut1_if1_mac} | ${0}
76
77 | tc03-eth2p-ethicmpv4-ip4base-dev_echo-req-to-tg-interface-for-local-ipv4-address
78 | | [Documentation]
79 | | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across DUT1\
80 | | ... | for locally connected IPv4 addresses. Make TG verify ICMPv4 Echo\
81 | | ... | Replies are correct.
82 | | ...
83 | | Set Test Variable | ${frame_size} | ${42}
84 | | Set Test Variable | ${rxq_count_int} | ${1}
85 | | ...
86 | | Given Add PCI devices to all DUTs
87 | | And Set Max Rate And Jumbo And Handle Multi Seg
88 | | And Apply startup configuration on all VPP DUTs
89 | | And VPP Enable Traces On All Duts | ${nodes}
90 | | When Initialize IPv4 forwarding in circular topology
91 | | Then Send IPv4 ping packet and verify headers
92 | | ... | ${tg} | ${tg_if1} | ${tg} | ${tg_if2}
93 | | ... | 10.10.10.2 | 20.20.20.2 | ${dut1_if1_mac} | ${1}
94
95 | tc04-eth2p-ethicmpv4-ip4base-dev_echo-req-to-tg-interface-for-remote-host-ipv4-address
96 | | [Documentation]
97 | | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces across DUT1\
98 | | ... | for remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies\
99 | | ... | are correct.
100 | | ...
101 | | Set Test Variable | ${frame_size} | ${42}
102 | | Set Test Variable | ${rxq_count_int} | ${1}
103 | | ...
104 | | Given Add PCI devices to all DUTs
105 | | And Set Max Rate And Jumbo And Handle Multi Seg
106 | | And Apply startup configuration on all VPP DUTs
107 | | And VPP Enable Traces On All Duts | ${nodes}
108 | | When Initialize IPv4 forwarding in circular topology
109 | | ... | remote_host1_ip=192.168.0.1 | remote_host2_ip=192.168.0.2
110 | | Then Send IPv4 ping packet and verify headers
111 | | ... | ${tg} | ${tg_if1} | ${tg} | ${tg_if2}
112 | | ... | 192.168.0.1 | 192.168.0.2 | ${dut1_if1_mac} | ${1}