doc: fixing documentation structure
[csit.git] / tests / vpp / device / flow / 2n1l-10ge2p1x710-ethip6-flow-ip6-ntuple-udp-scapy.robot
1 # Copyright (c) 2021 Intel 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_Intel-X710 | ETH | IP6FWD | FLOW | NTUPLE | UDP | DRV_VFIO_PCI
19 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
20 | ... | ethip6-flow-ip6-ntuple-udp
21 |
22 | Suite Setup | Setup suite topology interfaces | scapy
23 | Test Setup | Setup test
24 | Test Teardown | Tear down test | packet_trace | telemetry
25 |
26 | Test Template | Local Template
27 |
28 | Documentation | **IP6_N_TUPLE flow test cases**
29 | ...
30 | ... |
31 | ... | - **[Top] Network Topologies:** TG-DUT1 2-node topology with one link \
32 | ... | between nodes.
33 | ... |
34 | ... | - **[Enc] Packet Encapsulations:** Eth-IP6-UDP.
35 | ... |
36 | ... | - **[Cfg] DUT configuration:** DUT is configured with IP6_N_TUPLE flow.
37 | ... |
38 | ... | - **[Ver] TG verification:** Verify if the flow action is correct.
39
40 *** Variables ***
41 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
42 | ${crypto_type}= | ${None}
43 | ${nic_name}= | Intel-X710
44 | ${nic_driver}= | vfio-pci
45 | ${nic_rxq_size}= | 0
46 | ${nic_txq_size}= | 0
47 | ${nic_pfs}= | 2
48 | ${nic_vfs}= | 0
49 | ${overhead}= | ${0}
50 | ${src_ip}= | 2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b
51 | ${dst_ip}= | 1011:2022:3033:4044:5055:6066:7077:8088
52 | ${src_port}= | ${100}
53 | ${dst_port}= | ${200}
54 | ${rxq}= | ${4}
55 # Telemetry
56 | ${telemetry_profile}= | vpp_test_teardown
57
58 *** Keywords ***
59 | Local Template
60 | | [Documentation]
61 | | ... | - **[Ver]** Make TG send IP6 packet routed over DUT1 interfaces. \
62 | | ... | Make VPP verify flow packet is correct.
63 | |
64 | | ... | *Arguments:*
65 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
66 | | ... | - phy_cores - Number of physical cores. Type: integer
67 | | ... | - rxq - Number of RX queues. Type: integer
68 | |
69 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${rxq}
70 | |
71 | | Set Test Variable | \${frame_size}
72 | |
73 | | Given Set Max Rate And Jumbo
74 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
75 | | And Pre-initialize layer driver | ${nic_driver}
76 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
77 | | When Initialize layer driver | ${nic_driver}
78 | | And Initialize layer interface
79 | |
80 | | Clear Packet Trace On Dut | ${dut1}
81 | | Vpp Enable Traces On Dut | ${dut1}
82 | | ${flow_index} = | And Vpp Create Ip6 N Tuple Flow | ${dut1}
83 | | ... | ${src_ip} | ${dst_ip} | ${src_port} | ${dst_port}
84 | | ... | proto=UDP | action=redirect-to-queue | value=${${rxq}-1}
85 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
86 | | Then Send flow packet and verify action
87 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
88 | | ... | flow_type=IP6 | proto=UDP
89 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
90 | | ... | src_port=${src_port} | dst_port=${dst_port}
91 | | ... | action=redirect-to-queue | action_value=${${rxq}-1}
92 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
93 | | And Vpp Flow Del | ${dut1} | ${flow_index}
94 | |
95 | | Clear Packet Trace On Dut | ${dut1}
96 | | Vpp Enable Traces On Dut | ${dut1}
97 | | ${flow_index} = | And Vpp Create Ip6 N Tuple Flow | ${dut1}
98 | | ... | ${src_ip} | ${dst_ip} | ${src_port} | ${dst_port}
99 | | ... | proto=UDP | action=drop
100 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
101 | | Then Send flow packet and verify action
102 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
103 | | ... | flow_type=IP6 | proto=UDP
104 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
105 | | ... | src_port=${src_port} | dst_port=${dst_port}
106 | | ... | action=drop
107 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
108 | | And Vpp Flow Del | ${dut1} | ${flow_index}
109 | |
110 | | Clear Packet Trace On Dut | ${dut1}
111 | | Vpp Enable Traces On Dut | ${dut1}
112 | | ${flow_index} = | And Vpp Create Ip6 N Tuple Flow | ${dut1}
113 | | ... | ${src_ip} | ${dst_ip} | ${src_port} | ${dst_port}
114 | | ... | proto=UDP | action=mark | value=${7}
115 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
116 | | Then Send flow packet and verify action
117 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
118 | | ... | flow_type=IP6 | proto=UDP
119 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
120 | | ... | src_port=${src_port} | dst_port=${dst_port}
121 | | ... | action=mark
122 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
123 | | And Vpp Flow Del | ${dut1} | ${flow_index}
124
125 *** Test Cases ***
126 | 64B-0c-ethip6-flow-ip6-ntuple-udp-scapy
127 | | [Tags] | 64B | 0C
128 | | frame_size=${64} | phy_cores=${0}