CSIT-1202: Unify min_rate
[csit.git] / tests / vpp / perf / l2 / 10ge2p1x520-eth-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 | ETH | L2BDMACLRN | BASE | L2BDBASE
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, 253 flows per flow-group) with all packets\
48 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static\
49 | ... | payload. MAC addresses are matching MAC addresses of the TG node\
50 | ... | interfaces.
51 | ... | *[Ref] Applicable standard specifications:* RFC2544.
52
53 *** Variables ***
54 # X520-DA2 bandwidth limit
55 | ${s_limit} | ${10000000000}
56 # Traffic profile:
57 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
58
59 *** Keywords ***
60 | Local template
61 | | [Arguments] | ${phy_core} | ${framesize} | ${search_type}
62 | | ... | ${min_rate}=${50000} | ${rxq}=${None}
63 | | ...
64 | | Set Test Variable | ${framesize}
65 | | Set Test Variable | ${min_rate}
66 | | ${get_framesize}= | Set Variable If
67 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize} | ${framesize}
68 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
69 | | ${binary_min}= | Set Variable | ${min_rate}
70 | | ${binary_max}= | Set Variable | ${max_rate}
71 | | ${threshold}= | Set Variable | ${min_rate}
72 | | Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
73 | | Add PCI devices to all DUTs
74 | | Run Keyword If | ${get_framesize} < ${1522} | Add No Multi Seg to all DUTs
75 | | Apply startup configuration on all VPP DUTs
76 | | Initialize L2 bridge domain in 3-node circular topology
77 | | Run Keyword If | '${search_type}' == 'NDR'
78 | | ... | Find NDR using binary search and pps
79 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
80 | | ... | ${min_rate} | ${max_rate} | ${threshold}
81 | | ... | ELSE IF | '${search_type}' == 'PDR'
82 | | ... | Find PDR using binary search and pps
83 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
84 | | ... | ${min_rate} | ${max_rate} | ${threshold}
85 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
86
87 *** Test Cases ***
88 | tc01-64B-1t1c-eth-l2bdbasemaclrn-ndrdisc
89 | | [Tags] | 64B | 1C | NDRDISC
90 | | framesize=${64}  | phy_cores=${1} | search_type=NDR
91
92 | tc02-64B-1t1c-eth-l2bdbasemaclrn-pdrdisc
93 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
94 | | framesize=${64}  | phy_cores=${1} | search_type=PDR
95
96 | tc03-1518B-1t1c-eth-l2bdbasemaclrn-ndrdisc
97 | | [Tags] | 1518B | 1C | NDRDISC
98 | | framesize=${1518}  | phy_cores=${1} | search_type=NDR
99
100 | tc04-1518B-1t1c-eth-l2bdbasemaclrn-pdrdisc
101 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
102 | | framesize=${1518}  | phy_cores=${1} | search_type=PDR
103
104 | tc05-9000B-1t1c-eth-l2bdbasemaclrn-ndrdisc
105 | | [Tags] | 9000B | 1C | NDRDISC
106 | | framesize=${9000} | phy_cores=${1} | search_type=NDR
107
108 | tc06-9000B-1t1c-eth-l2bdbasemaclrn-pdrdisc
109 | | [Tags] | 9000B | 1C | PDRDISC | SKIP_PATCH
110 | | framesize=${9000} | phy_cores=${1} | search_type=PDR
111
112 | tc07-64B-2t2c-eth-l2bdbasemaclrn-ndrdisc
113 | | [Tags] | 64B | 2C | NDRDISC
114 | | framesize=${64}  | phy_cores=${2} | search_type=NDR
115
116 | tc08-64B-2t2c-eth-l2bdbasemaclrn-pdrdisc
117 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
118 | | framesize=${64}  | phy_cores=${2} | search_type=PDR
119
120 | tc09-1518B-2t2c-eth-l2bdbasemaclrn-ndrdisc
121 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
122 | | framesize=${1518}  | phy_cores=${2} | search_type=NDR
123
124 | tc10-1518B-2t2c-eth-l2bdbasemaclrn-pdrdisc
125 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
126 | | framesize=${1518}  | phy_cores=${2} | search_type=PDR
127
128 | tc11-9000B-2t2c-eth-l2bdbasemaclrn-ndrdisc
129 | | [Tags] | 9000B | 2C | NDRDISC | SKIP_PATCH
130 | | framesize=${9000} | phy_cores=${2} | search_type=NDR
131
132 | tc12-9000B-2t2c-eth-l2bdbasemaclrn-pdrdisc
133 | | [Tags] | 9000B | 2C | PDRDISC | SKIP_PATCH
134 | | framesize=${9000} | phy_cores=${2} | search_type=PDR
135
136 | tc13-64B-4t4c-eth-l2bdbasemaclrn-ndrdisc
137 | | [Tags] | 64B | 4C | NDRDISC
138 | | framesize=${64}  | phy_cores=${4} | search_type=NDR
139
140 | tc14-64B-4t4c-eth-l2bdbasemaclrn-pdrdisc
141 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
142 | | framesize=${64}  | phy_cores=${4} | search_type=PDR
143
144 | tc15-1518B-4t4c-eth-l2bdbasemaclrn-ndrdisc
145 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
146 | | framesize=${1518}  | phy_cores=${4} | search_type=NDR
147
148 | tc16-1518B-4t4c-eth-l2bdbasemaclrn-pdrdisc
149 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
150 | | framesize=${1518}  | phy_cores=${4} | search_type=PDR
151
152 | tc17-9000B-4t4c-eth-l2bdbasemaclrn-ndrdisc
153 | | [Tags] | 9000B | 4C | NDRDISC | SKIP_PATCH
154 | | framesize=${9000} | phy_cores=${4} | search_type=NDR
155
156 | tc18-9000B-4t4c-eth-l2bdbasemaclrn-pdrdisc
157 | | [Tags] | 9000B | 4C | PDRDISC | SKIP_PATCH
158 | | framesize=${9000} | phy_cores=${4} | search_type=PDR