CSIT-1202: Unify min_rate
[csit.git] / tests / vpp / perf / l2 / 10ge2p1x520-dot1q-l2bdbasemaclrn-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 | BASE | DOT1Q | L2BDMACLRN
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 | Test Teardown | Tear down performance discovery test | ${min_rate}pps
26 | ... | ${framesize} | ${traffic_profile}
27 | ...
28 | Test Template | Local template
29 | ...
30 | Documentation | *RFC2544: Packet throughput L2BD test cases with 802.1q test
31 | ... | 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 | ... | 802.1q tagging is applied on link between DUT1 and DUT2.
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge\
38 | ... | domain and MAC learning enabled. DUT1 and DUT2 tested with 2p10GE NIC
39 | ... | X520 Niantic by Intel.
40 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\
41 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop\
42 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\
43 | ... | of packets transmitted. NDR and PDR are discovered for different\
44 | ... | Ethernet L2 frame sizes using either binary search or linear search\
45 | ... | algorithms with configured starting rate and final step that determines\
46 | ... | throughput measurement resolution. Test packets are generated by TG on\
47 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups\
48 | ... | (flow-group per direction, 254 flows per flow-group) with all packets\
49 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static\
50 | ... | payload. MAC addresses are matching MAC addresses of the TG node\
51 | ... | interfaces.
52 | ... | *[Ref] Applicable standard specifications:* RFC2544.
53
54 *** Variables ***
55 | ${subid}= | 10
56 | ${tag_rewrite}= | pop-1
57 | ${vlan_overhead}= | ${4}
58 | ${avg_imix_framesize}= | ${357.833}
59 # X520-DA2 bandwidth limit
60 | ${s_limit} | ${10000000000}
61 # Bridge domain IDs
62 | ${bd_id1}= | 1
63 | ${bd_id2}= | 2
64 # Traffic profile:
65 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
66
67 *** Keywords ***
68 | Local template
69 | | [Arguments] | ${phy_core} | ${framesize} | ${search_type}
70 | | ... | ${min_rate}=${50000} | ${rxq}=${None}
71 | | ...
72 | | Set Test Variable | ${framesize}
73 | | Set Test Variable | ${min_rate}
74 | | ${get_framesize}= | Set Variable If
75 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize}
76 | | ... |  ${framesize}
77 | | ${max_rate}= | Calculate pps | ${s_limit}
78 | | ... | ${get_framesize + ${vlan_overhead}}
79 | | ${binary_min}= | Set Variable | ${min_rate}
80 | | ${binary_max}= | Set Variable | ${max_rate}
81 | | ${threshold}= | Set Variable | ${min_rate}
82 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
83 | | And Add PCI devices to all DUTs
84 | | And Run Keyword If | ${get_framesize} < ${1522}
85 | | ... | Add no multi seg to all DUTs
86 | | And Apply startup configuration on all VPP DUTs
87 | | When Initialize L2 bridge domains with VLAN dot1q sub-interfaces in a 3-node circular topology
88 | | ... | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
89 | | Run Keyword If | '${search_type}' == 'NDR'
90 | | ... | Find NDR using binary search and pps
91 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
92 | | ... | ${min_rate} | ${max_rate} | ${threshold}
93 | | ... | ELSE IF | '${search_type}' == 'PDR'
94 | | ... | Find PDR using binary search and pps
95 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
96 | | ... | ${min_rate} | ${max_rate} | ${threshold}
97 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
98
99 *** Test Cases ***
100 | tc01-64B-1t1c-dot1q-l2bdbasemaclrn-ndrdisc
101 | | [Tags] | 64B | 1C | NDRDISC
102 | | phy_cores=${1} | framesize=${64}  | search_type=NDR
103
104 | tc02-64B-1t1c-dot1q-l2bdbasemaclrn-pdrdisc
105 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
106 | | phy_cores=${1} | framesize=${64}  | search_type=PDR
107
108 | tc03-1518B-1t1c-dot1q-l2bdbasemaclrn-ndrdisc
109 | | [Tags] | 1518B | 1C | NDRDISC
110 | | phy_cores=${1} | framesize=${1518}  | search_type=NDR
111
112 | tc04-1518B-1t1c-dot1q-l2bdbasemaclrn-pdrdisc
113 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
114 | | phy_cores=${1} | framesize=${1518}  | search_type=PDR
115
116 | tc05-IMIX-1t1c-dot1q-l2bdbasemaclrn-ndrdisc
117 | | [Tags] | IMIX | 1C | NDRDISC
118 | | phy_cores=${1} | framesize=IMIX_v4_1  | search_type=NDR
119
120 | tc06-IMIX-1t1c-dot1q-l2bdbasemaclrn-pdrdisc
121 | | [Tags] | IMIX | 1C | PDRDISC | SKIP_PATCH
122 | | phy_cores=${1} | framesize=IMIX_v4_1  | search_type=PDR
123
124 | tc07-64B-2t2c-dot1q-l2bdbasemaclrn-ndrdisc
125 | | [Tags] | 64B | 2C | NDRDISC
126 | | phy_cores=${2} | framesize=${64}  | search_type=NDR
127
128 | tc08-64B-2t2c-dot1q-l2bdbasemaclrn-pdrdisc
129 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
130 | | phy_cores=${2} | framesize=${64}  | search_type=PDR
131
132 | tc09-1518B-2t2c-dot1q-l2bdbasemaclrn-ndrdisc
133 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
134 | | phy_cores=${2} | framesize=${1518}  | search_type=NDR
135
136 | tc10-1518B-2t2c-dot1q-l2bdbasemaclrn-pdrdisc
137 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
138 | | phy_cores=${2} | framesize=${1518}  | search_type=PDR
139
140 | tc11-IMIX-2t2c-dot1q-l2bdbasemaclrn-ndrdisc
141 | | [Tags] | IMIX | 2C | NDRDISC | SKIP_PATCH
142 | | phy_cores=${2} | framesize=IMIX_v4_1  | search_type=NDR
143
144 | tc12-IMIX-2t2c-dot1q-l2bdbasemaclrn-pdrdisc
145 | | [Tags] | IMIX | 2C | PDRDISC | SKIP_PATCH
146 | | phy_cores=${2} | framesize=IMIX_v4_1  | search_type=PDR
147
148 | tc13-64B-4t4c-dot1q-l2bdbasemaclrn-ndrdisc
149 | | [Tags] | 64B | 4C | NDRDISC
150 | | phy_cores=${4} | framesize=${64}  | search_type=NDR
151
152 | tc14-64B-4t4c-dot1q-l2bdbasemaclrn-pdrdisc
153 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
154 | | phy_cores=${4} | framesize=${64}  | search_type=PDR
155
156 | tc15-1518B-4t4c-dot1q-l2bdbasemaclrn-ndrdisc
157 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
158 | | phy_cores=${4} | framesize=${1518}  | search_type=NDR
159
160 | tc16-1518B-4t4c-dot1q-l2bdbasemaclrn-pdrdisc
161 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
162 | | phy_cores=${4} | framesize=${1518}  | search_type=PDR
163
164 | tc17-IMIX-4t4c-dot1q-l2bdbasemaclrn-ndrdisc
165 | | [Tags] | IMIX | 4C | NDRDISC | SKIP_PATCH
166 | | phy_cores=${4} | framesize=IMIX_v4_1  | search_type=NDR
167
168 | tc18-IMIX-4t4c-dot1q-l2bdbasemaclrn-pdrdisc
169 | | [Tags] | IMIX | 4C | PDRDISC | SKIP_PATCH
170 | | phy_cores=${4} | framesize=IMIX_v4_1  | search_type=PDR