FIX: use len parameter name in prefix structure in ip_route_add_del
[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 | Resource | resources/libraries/robot/ip/ip4.robot
17 | Resource | resources/libraries/robot/shared/interfaces.robot
18 | Resource | resources/libraries/robot/shared/traffic.robot
19 | ...
20 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV
21 | ... | FUNCTEST | IP4FWD | BASE | ETH | IP4BASE
22 | ...
23 | Suite Setup | Setup suite single link
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace
26 | ...
27 | Documentation | *IPv4 routing test cases*
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 IPv4 routing on \
32 | ... | both links.
33 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and \
34 | ... | two static IPv4 /24 route entries.
35 | ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in \
36 | ... | one direction by TG on links to DUT1; on receive TG verifies packets \
37 | ... | for correctness and their IPv4 src-addr, dst-addr and MAC addresses.
38 | ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
39
40 *** Variables ***
41 | @{plugins_to_enable}= | dpdk_plugin.so
42 | ${nic_name}= | virtual
43 | ${tg_to_dut_if1_ip4}= | 10.10.10.2
44 | ${tg_to_dut_if2_ip4}= | 20.20.20.2
45 | ${dut_to_tg_if1_ip4}= | 10.10.10.1
46 | ${dut_to_tg_if2_ip4}= | 20.20.20.1
47 | ${remote_host1_ip4}= | 192.168.0.1
48 | ${remote_host2_ip4}= | 192.168.0.2
49 | ${remote_host_ip4_prefix}= | 32
50
51 *** Test Cases ***
52 | tc01-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-ingress-interface
53 | | [Documentation]
54 | | ... | Make TG send ICMPv4 Echo Req to DUT1 ingress interface. Make TG \
55 | | ... | verify ICMP Echo Reply is correct.
56 | | ...
57 | | ${hops}= | Set Variable | ${0}
58 | | ...
59 | | Given Add PCI devices to all DUTs
60 | | And Apply startup configuration on all VPP DUTs
61 | | And VPP Enable Traces On All Duts | ${nodes}
62 | | When Configure path in 2-node circular topology
63 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
64 | | And Configure IPv4 forwarding in circular topology | ${tg_to_dut_if1_ip4}
65 | | ... | ${tg_to_dut_if2_ip4} | ${dut_to_tg_if1_ip4} | ${dut_to_tg_if2_ip4}
66 | | When All Vpp Interfaces Ready Wait | ${nodes}
67 | | Then Send IPv4 ping packet and verify headers | ${tg_node}
68 | | ... | ${tg_to_dut_if1} | ${dut_node} | ${dut_to_tg_if1}
69 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if1_ip4} | ${dut_to_tg_if1_mac}
70 | | ... | ${hops}
71 | | Get interface Ipv4 addresses | ${nodes['DUT1']} | ${dut_to_tg_if1}
72
73 | tc02-eth2p-ethicmpv4-ip4base-device_echo-req-to-dut-egress-interface
74 | | [Documentation]
75 | | ... | Make TG send ICMPv4 Echo Req towards DUT1 egress interface. Make TG \
76 | | ... | verify ICMP Echo Reply is correct.
77 | | ...
78 | | ${hops}= | Set Variable | ${0}
79 | | ...
80 | | Given Add PCI devices to all DUTs
81 | | And Apply startup configuration on all VPP DUTs
82 | | And VPP Enable Traces On All Duts | ${nodes}
83 | | When Configure path in 2-node circular topology
84 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
85 | | And Configure IPv4 forwarding in circular topology | ${tg_to_dut_if1_ip4}
86 | | ... | ${tg_to_dut_if2_ip4} | ${dut_to_tg_if1_ip4} | ${dut_to_tg_if2_ip4}
87 | | When All Vpp Interfaces Ready Wait | ${nodes}
88 | | Then Send IPv4 ping packet and verify headers | ${tg_node}
89 | | ... | ${tg_to_dut_if1} | ${dut_node} | ${dut_to_tg_if2}
90 | | ... | ${tg_to_dut_if1_ip4} | ${dut_to_tg_if2_ip4} | ${dut_to_tg_if1_mac}
91 | | ... | ${hops}
92
93 | tc03-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-local-ipv4-address
94 | | [Documentation]
95 | | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
96 | | ... | locally connected IPv4 addresses. Make TG verify ICMPv4 Echo Replies \
97 | | ... | are correct.
98 | | ...
99 | | ${hops}= | Set Variable | ${1}
100 | | ...
101 | | Given Add PCI devices to all DUTs
102 | | And Apply startup configuration on all VPP DUTs
103 | | And VPP Enable Traces On All Duts | ${nodes}
104 | | When Configure path in 2-node circular topology
105 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
106 | | And Configure IPv4 forwarding in circular topology | ${tg_to_dut_if1_ip4}
107 | | ... | ${tg_to_dut_if2_ip4} | ${dut_to_tg_if1_ip4} | ${dut_to_tg_if2_ip4}
108 | | When All Vpp Interfaces Ready Wait | ${nodes}
109 | | Then Send IPv4 ping packet and verify headers | ${tg_node}
110 | | ... | ${tg_to_dut_if1} | ${tg_node} | ${tg_to_dut_if2}
111 | | ... | ${tg_to_dut_if1_ip4} | ${tg_to_dut_if2_ip4} | ${dut_to_tg_if1_mac}
112 | | ... | ${hops}
113
114 | tc04-eth2p-ethicmpv4-ip4base-device_echo-req-to-tg-interface-for-remote-host-ipv4-address
115 | | [Documentation]
116 | | ... | Make TG send ICMPv4 Echo Req between its interfaces across DUT1 for \
117 | | ... | remote host IPv4 addresses. Make TG verify ICMPv4 Echo Replies are \
118 | | ... | correct.
119 | | ...
120 | | ${hops}= | Set Variable | ${1}
121 | | ...
122 | | Given Add PCI devices to all DUTs
123 | | And Apply startup configuration on all VPP DUTs
124 | | And VPP Enable Traces On All Duts | ${nodes}
125 | | When Configure path in 2-node circular topology
126 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
127 | | And Configure IPv4 forwarding in circular topology | ${tg_to_dut_if1_ip4}
128 | | ... | ${tg_to_dut_if2_ip4} | ${dut_to_tg_if1_ip4} | ${dut_to_tg_if2_ip4}
129 | | ... | remote_host1_ip4=${remote_host1_ip4}
130 | | ... | remote_host2_ip4=${remote_host2_ip4}
131 | | ... | remote_host_ip4_prefix=${remote_host_ip4_prefix}
132 | | And VPP Get IP tables | ${dut_node}
133 | | When All Vpp Interfaces Ready Wait | ${nodes}
134 | | Then Send IPv4 ping packet and verify headers | ${tg_node}
135 | | ... | ${tg_to_dut_if1} | ${tg_node} | ${tg_to_dut_if2}
136 | | ... | ${remote_host1_ip4} | ${remote_host2_ip4} | ${dut_to_tg_if1_mac}
137 | | ... | ${hops}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.