Refactor perf test cases
[csit.git] / tests / vpp / perf / ip4 / 10ge2p1x520-ethip4-ip4base-copwhtlistbase-ndrpdrdisc.robot
1 # Copyright (c) 2017 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/performance/performance_setup.robot
16 | Library | resources.libraries.python.Cop
17 | ...
18 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
19 | ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | FEATURE | COPWHLIST
20 | ...
21 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
22 | ... | L3 | Intel-X520-DA2
23 | Suite Teardown | Tear down 3-node performance topology
24 | ...
25 | Test Setup | Set up performance test
26 | ...
27 | Test Teardown | Tear down performance discovery test | ${min_rate}pps
28 | ... | ${framesize} | ${traffic_profile}
29 | ...
30 | Test Template | Local template
31 | ...
32 | Documentation | *RFC2544: Pkt throughput IPv4 whitelist test cases*
33 | ...
34 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
35 | ... | with single links between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
38 | ... | routing, two static IPv4 /24 routes and IPv4 COP security whitelist
39 | ... | ingress /24 filter entries applied on links TG - DUT1 and DUT2 - TG.
40 | ... | DUT1 and DUT2 tested with 2p10GE NIC X520 Niantic by Intel.
41 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
42 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
43 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
44 | ... | of packets transmitted. NDR and PDR are discovered for different
45 | ... | Ethernet L2 frame sizes using either binary search or linear search
46 | ... | algorithms with configured starting rate and final step that determines
47 | ... | throughput measurement resolution. Test packets are generated by TG on
48 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
49 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
50 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
51 | ... | payload. MAC addresses are matching MAC addresses of the TG node
52 | ... | interfaces.
53 | ... | *[Ref] Applicable standard specifications:* RFC2544.
54
55 *** Variables ***
56 # X520-DA2 bandwidth limit
57 | ${s_limit} | ${10000000000}
58 # Traffic profile:
59 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src253
60
61 *** Keywords ***
62 | Local template
63 | | [Documentation]
64 | | ... | [Cfg] DUT runs IPv4 routing config with ${wt} thread(s), ${wt}\
65 | | ... | phy core(s), ${rxq} receive queue(s) per NIC port.
66 | | ... | [Ver] Find NDR or PDR for ${framesize} frames using binary search\
67 | | ... | start at 10GE linerate.
68 | | ...
69 | | [Arguments] | ${phy_cores} | ${framesize} | ${search_type}
70 | | ... | ${rxq}=${None} | ${min_rate}=${50000}
71 | | ...
72 | | Set Test Variable | ${framesize}
73 | | Set Test Variable | ${min_rate}
74 | | ${get_framesize}= | Get Frame Size | ${framesize}
75 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
76 | | ${binary_min}= | Set Variable | ${min_rate}
77 | | ${binary_max}= | Set Variable | ${max_rate}
78 | | ${threshold}= | Set Variable | ${min_rate}
79 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
80 | | And Add PCI devices to all DUTs
81 | | And Run Keyword If | ${get_framesize} < ${1522}
82 | | ... | Add no multi seg to all DUTs
83 | | And Apply startup configuration on all VPP DUTs
84 | | When Initialize IPv4 forwarding in 3-node circular topology
85 | | And Add Fib Table | ${dut1} | 1
86 | | And Vpp Route Add | ${dut1} | 10.10.10.0 | 24 | vrf=1 | local=${TRUE}
87 | | And Add Fib Table | ${dut2} | 1
88 | | And Vpp Route Add | ${dut2} | 20.20.20.0 | 24 | vrf=1 | local=${TRUE}
89 | | And COP Add whitelist Entry | ${dut1} | ${dut1_if1} | ip4 | 1
90 | | And COP Add whitelist Entry | ${dut2} | ${dut2_if2} | ip4 | 1
91 | | And COP interface enable or disable | ${dut1} | ${dut1_if1} | enable
92 | | And COP interface enable or disable | ${dut2} | ${dut2_if2} | enable
93 | | Then Run Keyword If | '${search_type}' == 'NDR'
94 | | ... | Find NDR using binary search and pps
95 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
96 | | ... | ${min_rate} | ${max_rate} | ${threshold}
97 | | ... | ELSE IF | '${search_type}' == 'PDR'
98 | | ... | Find PDR using binary search and pps
99 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
100 | | ... | ${min_rate} | ${max_rate} | ${threshold}
101 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
102
103 *** Test Cases ***
104 | tc01-64B-1t1c-ethip4-ip4base-copwhtlistbase-ndrdisc
105 | | [Tags] | 64B | 1C | NDRDISC
106 | | phy_cores=${1} | framesize=${64}  | search_type=NDR
107
108 | tc02-64B-1t1c-ethip4-ip4base-copwhtlistbase-pdrdisc
109 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
110 | | phy_cores=${1} | framesize=${64}  | search_type=PDR
111
112 | tc03-1518B-1t1c-ethip4-ip4base-copwhtlistbase-ndrdisc
113 | | [Tags] | 1518B | 1C | NDRDISC
114 | | phy_cores=${1} | framesize=${1518}  | search_type=NDR
115
116 | tc04-1518B-1t1c-ethip4-ip4base-copwhtlistbase-pdrdisc
117 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
118 | | phy_cores=${1} | framesize=${1518}  | search_type=PDR
119
120 | tc05-9000B-1t1c-ethip4-ip4base-copwhtlistbase-ndrdisc
121 | | [Tags] | 9000B | 1C | NDRDISC
122 | | phy_cores=${1} | framesize=${9000} | search_type=NDR
123
124 | tc06-9000B-1t1c-ethip4-ip4base-copwhtlistbase-pdrdisc
125 | | [Tags] | 9000B | 1C | PDRDISC | SKIP_PATCH
126 | | phy_cores=${1} | framesize=${9000} | search_type=PDR
127
128 | tc07-64B-2t2c-ethip4-ip4base-copwhtlistbase-ndrdisc
129 | | [Tags] | 64B | 2C | NDRDISC
130 | | phy_cores=${2} | framesize=${64}  | search_type=NDR
131
132 | tc08-64B-2t2c-ethip4-ip4base-copwhtlistbase-pdrdisc
133 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
134 | | phy_cores=${2} | framesize=${64}  | search_type=PDR
135
136 | tc09-1518B-2t2c-ethip4-ip4base-copwhtlistbase-ndrdisc
137 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
138 | | phy_cores=${2} | framesize=${1518}  | search_type=NDR
139
140 | tc10-1518B-2t2c-ethip4-ip4base-copwhtlistbase-pdrdisc
141 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
142 | | phy_cores=${2} | framesize=${1518}  | search_type=PDR
143
144 | tc11-9000B-2t2c-ethip4-ip4base-copwhtlistbase-ndrdisc
145 | | [Tags] | 9000B | 2C | NDRDISC | SKIP_PATCH
146 | | phy_cores=${2} | framesize=${9000} | search_type=NDR
147
148 | tc12-9000B-2t2c-ethip4-ip4base-copwhtlistbase-pdrdisc
149 | | [Tags] | 9000B | 2C | PDRDISC | SKIP_PATCH
150 | | phy_cores=${2} | framesize=${9000} | search_type=PDR
151
152 | tc13-64B-4t4c-ethip4-ip4base-copwhtlistbase-ndrdisc
153 | | [Tags] | 64B | 4C | NDRDISC
154 | | phy_cores=${4} | framesize=${64}  | search_type=NDR
155
156 | tc14-64B-4t4c-ethip4-ip4base-copwhtlistbase-pdrdisc
157 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
158 | | phy_cores=${4} | framesize=${64}  | search_type=PDR
159
160 | tc15-1518B-4t4c-ethip4-ip4base-copwhtlistbase-ndrdisc
161 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
162 | | phy_cores=${4} | framesize=${1518}  | search_type=NDR
163
164 | tc16-1518B-4t4c-ethip4-ip4base-copwhtlistbase-pdrdisc
165 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
166 | | phy_cores=${4} | framesize=${1518}  | search_type=PDR
167
168 | tc17-9000B-4t4c-ethip4-ip4base-copwhtlistbase-ndrdisc
169 | | [Tags] | 9000B | 4C | NDRDISC | SKIP_PATCH
170 | | phy_cores=${4} | framesize=${9000} | search_type=NDR
171
172 | tc18-9000B-4t4c-ethip4-ip4base-copwhtlistbase-pdrdisc
173 | | [Tags] | 9000B | 4C | PDRDISC | SKIP_PATCH
174 | | phy_cores=${4} | framesize=${9000} | search_type=PDR