Refactor perf test cases
[csit.git] / tests / vpp / perf / l2 / 10ge2p1x520-eth-l2bdscale1mmaclrn-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 | ...
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
18 | ... | NIC_Intel-X520-DA2 | ETH | L2BDMACLRN | SCALE | L2BDBASE | FIB_1M
19 | ...
20 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
21 | ... | L2 | Intel-X520-DA2
22 | Suite Teardown | Tear down 3-node performance topology
23 | ...
24 | Test Setup | Set up performance test
25 | ...
26 | Test Teardown | Tear down performance discovery test | ${min_rate}pps
27 | ... | ${framesize} | ${traffic_profile}
28 | ...
29 | Test Template | Local template
30 | ...
31 | Documentation | *RFC2544: Pkt throughput L2BD test cases*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
34 | ... | with single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 switching of IPv4.
36 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge-\
37 | ... | domain and MAC learning enabled. DUT1 and DUT2 tested with 2p10GE NI
38 | ... | X520 Niantic by Intel.
39 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\
40 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop\
41 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\
42 | ... | of packets transmitted. NDR and PDR are discovered for different\
43 | ... | Ethernet L2 frame sizes using either binary search or linear search\
44 | ... | algorithms with configured starting rate and final step that determines\
45 | ... | throughput measurement resolution. Test packets are generated by TG on\
46 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups\
47 | ... | (flow-group per direction, 500k flows per flow-group) with all packets\
48 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static\
49 | ... | payload. MAC addresses ranges are incremented as follows:
50 | ... | port01_src ca:fe:00:00:00:00 - port01_src ca:fe:00:07:a1:1f,\
51 | ... | port01_dst fa:ce:00:00:00:00 - port01_dst fa:ce:00:07:a1:1f,\
52 | ... | port02_src fa:ce:00:00:00:00 - port02_src fa:ce:00:07:a1:1f,\
53 | ... | port02_dst ca:fe:00:00:00:00 - port02_dst ca:fe:00:07:a1:1f,\
54 | ... | *[Ref] Applicable standard specifications:* RFC2544.
55
56 *** Variables ***
57 # X520-DA2 bandwidth limit
58 | ${s_limit} | ${10000000000}
59 # Traffic profile:
60 | ${traffic_profile} | trex-sl-3n-ethip4-macsrc500kdst500k
61
62 *** Keywords ***
63 | Local template
64 | | [Arguments] | ${framesize} | ${phy_cores} | ${search_type}
65 | | ... | ${min_rate}=${50000} | ${rxq}=${None}
66 | | ...
67 | | Set Test Variable | ${framesize}
68 | | Set Test Variable | ${min_rate}
69 | | ${get_framesize}= | Set Variable If
70 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize} | ${framesize}
71 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
72 | | ${binary_min}= | Set Variable | ${min_rate}
73 | | ${binary_max}= | Set Variable | ${max_rate}
74 | | ${threshold}= | Set Variable | ${min_rate}
75 | | Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
76 | | Add PCI devices to all DUTs
77 | | Run Keyword If | ${get_framesize} < ${1522} | Add No Multi Seg to all DUTs
78 | | Apply startup configuration on all VPP DUTs
79 | | Initialize L2 bridge domain in 3-node circular topology
80 | | Run Keyword If | '${search_type}' == 'NDR'
81 | | ... | Find NDR using binary search and pps
82 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
83 | | ... | ${min_rate} | ${max_rate} | ${threshold}
84 | | ... | ELSE IF | '${search_type}' == 'PDR'
85 | | ... | Find PDR using binary search and pps
86 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
87 | | ... | ${min_rate} | ${max_rate} | ${threshold}
88 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
89
90 *** Test Cases ***
91 | tc01-64B-1t1c-eth-l2bdscale1mmaclrn-ndrdisc
92 | | [Tags] | 64B | 1C | NDRDISC
93 | | framesize=${64}  | phy_cores=${1} | search_type=NDR
94
95 | tc02-64B-1t1c-eth-l2bdscale1mmaclrn-pdrdisc
96 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
97 | | framesize=${64}  | phy_cores=${1} | search_type=PDR
98
99 | tc03-1518B-1t1c-eth-l2bdscale1mmaclrn-ndrdisc
100 | | [Tags] | 1518B | 1C | NDRDISC
101 | | framesize=${1518}  | phy_cores=${1} | search_type=NDR
102
103 | tc04-1518B-1t1c-eth-l2bdscale1mmaclrn-pdrdisc
104 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
105 | | framesize=${1518}  | phy_cores=${1} | search_type=PDR
106
107 | tc05-9000B-1t1c-eth-l2bdscale1mmaclrn-ndrdisc
108 | | [Tags] | 9000B | 1C | NDRDISC
109 | | framesize=${9000} | phy_cores=${1} | search_type=NDR
110
111 | tc06-9000B-1t1c-eth-l2bdscale1mmaclrn-pdrdisc
112 | | [Tags] | 9000B | 1C | PDRDISC | SKIP_PATCH
113 | | framesize=${9000} | phy_cores=${1} | search_type=PDR
114
115 | tc07-64B-2t2c-eth-l2bdscale1mmaclrn-ndrdisc
116 | | [Tags] | 64B | 2C | NDRDISC
117 | | framesize=${64}  | phy_cores=${2} | search_type=NDR
118
119 | tc08-64B-2t2c-eth-l2bdscale1mmaclrn-pdrdisc
120 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
121 | | framesize=${64}  | phy_cores=${2} | search_type=PDR
122
123 | tc09-1518B-2t2c-eth-l2bdscale1mmaclrn-ndrdisc
124 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
125 | | framesize=${1518}  | phy_cores=${2} | search_type=NDR
126
127 | tc10-1518B-2t2c-eth-l2bdscale1mmaclrn-pdrdisc
128 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
129 | | framesize=${1518}  | phy_cores=${2} | search_type=PDR
130
131 | tc11-9000B-2t2c-eth-l2bdscale1mmaclrn-ndrdisc
132 | | [Tags] | 9000B | 2C | NDRDISC | SKIP_PATCH
133 | | framesize=${9000} | phy_cores=${2} | search_type=NDR
134
135 | tc12-9000B-2t2c-eth-l2bdscale1mmaclrn-pdrdisc
136 | | [Tags] | 9000B | 2C | PDRDISC | SKIP_PATCH
137 | | framesize=${9000} | phy_cores=${2} | search_type=PDR
138
139 | tc13-64B-4t4c-eth-l2bdscale1mmaclrn-ndrdisc
140 | | [Tags] | 64B | 4C | NDRDISC
141 | | framesize=${64}  | phy_cores=${4} | search_type=NDR
142
143 | tc14-64B-4t4c-eth-l2bdscale1mmaclrn-pdrdisc
144 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
145 | | framesize=${64}  | phy_cores=${4} | search_type=PDR
146
147 | tc15-1518B-4t4c-eth-l2bdscale1mmaclrn-ndrdisc
148 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
149 | | framesize=${1518}  | phy_cores=${4} | search_type=NDR
150
151 | tc16-1518B-4t4c-eth-l2bdscale1mmaclrn-pdrdisc
152 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
153 | | framesize=${1518}  | phy_cores=${4} | search_type=PDR
154
155 | tc17-9000B-4t4c-eth-l2bdscale1mmaclrn-ndrdisc
156 | | [Tags] | 9000B | 4C | NDRDISC | SKIP_PATCH
157 | | framesize=${9000} | phy_cores=${4} | search_type=NDR
158
159 | tc18-9000B-4t4c-eth-l2bdscale1mmaclrn-pdrdisc
160 | | [Tags] | 9000B | 4C | PDRDISC | SKIP_PATCH
161 | | framesize=${9000} | phy_cores=${4} | search_type=PDR
162