8a7e3a43429b7e86da6865214fd7775806d9a045
[csit.git] / tests / vpp / device / flow / 2n1l-10ge2p1x710-ethip6-flow-ip6-tcp-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 | TCP | DRV_VFIO_PCI
19 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
20 | ... | ethip6-flow-ip6-tcp
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 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-TCP.
35 | ... |
36 | ... | - **[Cfg] DUT configuration:** DUT is configured with IP6 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 | ${rxq}= | ${4}
53 # Telemetry
54 | ${telemetry_profile}= | vpp_test_teardown
55
56 *** Keywords ***
57 | Local Template
58 | | [Documentation]
59 | | ... | - **[Ver]** Make TG send IP6 packet routed over DUT1 interfaces. \
60 | | ... | Make VPP verify flow packet is correct.
61 | |
62 | | ... | *Arguments:*
63 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
64 | | ... | - phy_cores - Number of physical cores. Type: integer
65 | | ... | - rxq - Number of RX queues. Type: integer
66 | |
67 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${rxq}
68 | |
69 | | Set Test Variable | \${frame_size}
70 | |
71 | | Given Set Max Rate And Jumbo
72 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
73 | | And Pre-initialize layer driver | ${nic_driver}
74 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
75 | | When Initialize layer driver | ${nic_driver}
76 | | And Initialize layer interface
77 | |
78 | | Clear Packet Trace On Dut | ${dut1}
79 | | Vpp Enable Traces On Dut | ${dut1}
80 | | ${flow_index} = | And Vpp Create Ip6 Flow | ${dut1}
81 | | ... | ${src_ip} | ${dst_ip} | proto=TCP
82 | | ... | action=redirect-to-queue | value=${${rxq}-1}
83 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
84 | | Then Send flow packet and verify action
85 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
86 | | ... | flow_type=IP6 | proto=TCP
87 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
88 | | ... | action=redirect-to-queue | action_value=${${rxq}-1}
89 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
90 | | And Vpp Flow Del | ${dut1} | ${flow_index}
91 | |
92 | | Clear Packet Trace On Dut | ${dut1}
93 | | Vpp Enable Traces On Dut | ${dut1}
94 | | ${flow_index} = | And Vpp Create Ip6 Flow | ${dut1}
95 | | ... | ${src_ip} | ${dst_ip} | proto=TCP
96 | | ... | action=drop
97 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
98 | | Then Send flow packet and verify action
99 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
100 | | ... | flow_type=IP6 | proto=TCP
101 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
102 | | ... | action=drop
103 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
104 | | And Vpp Flow Del | ${dut1} | ${flow_index}
105 | |
106 | | Clear Packet Trace On Dut | ${dut1}
107 | | Vpp Enable Traces On Dut | ${dut1}
108 | | ${flow_index} = | And Vpp Create Ip6 Flow | ${dut1}
109 | | ... | ${src_ip} | ${dst_ip} | proto=TCP
110 | | ... | action=mark | value=${7}
111 | | And Vpp Flow Enable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
112 | | Then Send flow packet and verify action
113 | | ... | ${tg} | ${TG_pf1}[0] | ${DUT1_${int}1_mac}[0]
114 | | ... | flow_type=IP6 | proto=TCP
115 | | ... | src_ip=${src_ip} | dst_ip=${dst_ip}
116 | | ... | action=mark
117 | | And Vpp Flow Disable | ${dut1} | ${DUT1_${int}1}[0] | ${flow_index}
118 | | And Vpp Flow Del | ${dut1} | ${flow_index}
119
120 *** Test Cases ***
121 | 64B-0c-ethip6-flow-ip6-tcp-scapy
122 | | [Tags] | 64B | 0C
123 | | frame_size=${64} | phy_cores=${0}