doc: fixing documentation structure
[csit.git] / tests / vpp / device / ip4 / 2n1l-10ge2p1x710-ethip4tcp-nat44ed-scapy.robot
1 # Copyright (c) 2021 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/nat.robot
17 | Resource | resources/libraries/robot/shared/traffic.robot
18 |
19 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
20 | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44
21 | ... | NAT44_ENDPOINT_DEPENDENT | BASE | TCP | DRV_VFIO_PCI
22 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
23 | ... | ethip4tcp-nat44ed
24 |
25 | Suite Setup | Setup suite topology interfaces | scapy
26 | Test Setup | Setup test
27 | Test Teardown | Tear down test | packet_trace | telemetry | nat-ed
28 |
29 | Test Template | Local Template
30 |
31 | Documentation | **Connections per second NAT44 endpoint-dependent mode
32 | ... | performance test cases**
33 | ... |
34 | ... | - **[Top] Network Topologies:** TG-DUT1-TG 2-node circular topology \
35 | ... | with single links between nodes.
36 | ... |
37 | ... | - **[Enc] Packet Encapsulations:** Eth-IPv4-TCP for IPv4 routing.
38 | ... |
39 | ... | - **[Cfg] DUT configuration:** DUT1 is configured with IPv4 routing \
40 | ... | and one static IPv4 /18 route entries. \
41 | ... | DUT1 is tested with ${nic_name}.
42 | ... |
43 | ... | - **[Ver] TG verification:** Eth-IPv4-TCP packet is sent from TG to \
44 | ... | DUT1 in one direction. Packet is received and verified for correctness \
45 | ... | on TG. Then Eth-IPv4-TCP packet is sent from TG in opposite direction. \
46 | ... | Packet is received and verified for correctness on TG.
47 | ... |
48 | ... | - **[Ref] Applicable standard specifications:** RFC791, RFC793, \
49 | ... | RFC3022 and RFC4787.
50
51 *** Variables ***
52 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so | nat_plugin.so
53 | ${crypto_type}= | ${None}
54 | ${nic_name}= | Intel-X710
55 | ${nic_driver}= | vfio-pci
56 | ${nic_rxq_size}= | 0
57 | ${nic_txq_size}= | 0
58 | ${nic_pfs}= | 2
59 | ${nic_vfs}= | 0
60 | ${overhead}= | ${0}
61 # IP settings
62 | ${tg_if1_ip4}= | 10.0.0.2
63 | ${tg_if1_mask}= | ${20}
64 | ${tg_if2_ip4}= | 12.0.0.2
65 | ${tg_if2_mask}= | ${20}
66 | ${dut1_if1_ip4}= | 10.0.0.1
67 | ${dut1_if1_mask}= | ${24}
68 | ${dut1_if2_ip4}= | 12.0.0.1
69 | ${dut1_if2_mask}= | ${24}
70 | ${dest_net}= | 20.0.0.0
71 | ${dest_mask}= | ${22}
72 # proto layer settings
73 | ${protocol}= | TCP
74 | ${src_port_in}= | 1024
75 | ${dst_port}= | 8080
76 # NAT settings
77 | ${nat_mode}= | endpoint-dependent
78 | ${n_sessions}= | ${64512}
79 | ${in_net}= | 192.168.0.0
80 | ${in_mask}= | ${22}
81 | ${out_net}= | 68.142.68.0
82 | ${out_net_end}= | 68.142.68.0
83 | ${out_mask}= | ${32}
84 # Telemetry
85 | ${telemetry_profile}= | vpp_test_teardown
86
87 *** Keywords ***
88 | Local Template
89 | |
90 | | [Documentation]
91 | | ... | - **[Cfg]** DUT runs NAT44 ${nat_mode} configuration.
92 | | ... | - **[Ver]** Make TG send IPv4 packet routed over DUT1 interfaces. \
93 | | ... | Make TG verify IPv4 packet is correct.
94 | |
95 | | ... | *Arguments:*
96 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
97 | | ... | - phy_cores - Number of physical cores. Type: integer
98 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
99 | |
100 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
101 | |
102 | | Set Test Variable | \${frame_size}
103 | |
104 | | Given Set Jumbo
105 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
106 | | And Pre-initialize layer driver | ${nic_driver}
107 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
108 | | When Initialize layer driver | ${nic_driver}
109 | | And Initialize layer interface
110 | | And Initialize IPv4 forwarding for NAT44 in circular topology
111 | | And Initialize NAT44 endpoint-dependent mode in circular topology
112 | | Then Send TCP or UDP packet and verify network address translations
113 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | ${DUT1_vf1_mac}[0]
114 | | ... | ${DUT1_vf2_mac}[0] | ${in_net} | ${out_net} | ${dest_net}
115 | | ... | ${protocol} | ${src_port_in} | ${dst_port}
116
117 *** Test Cases ***
118 | 64B-0c-ethip4tcp-nat44ed-scapy
119 | | [Tags] | 64B | 0C
120 | | frame_size=${64} | phy_cores=${0}