CSIT-687: Directory structure reorganization
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-ethip4-ip4base-eth-2vhost-1vm-pdrchk.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.QemuUtils
17 | ...
18 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | PDRCHK
19 | ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | BASE | VHOST | VM
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 | Test Teardown | Tear down performance pdrchk test with vhost and VM with dpdk-testpmd
27 | ... | ${rate}pps | ${framesize} | ${traffic_profile}
28 | ... | dut1_node=${dut1} | dut1_vm_refs=${dut1_vm_refs}
29 | ... | dut2_node=${dut2} | dut2_vm_refs=${dut2_vm_refs}
30 | ...
31 | Documentation | *RFC2544: Pkt throughput IPv4 test cases with vhost*
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 IPv4 routing.
36 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
37 | ... | routing and two static IPv4 /24 route entries. Qemu Guest is connected
38 | ... | to VPP via vhost-user interfaces. Guest is running DPDK testpmd
39 | ... | interconnecting vhost-user interfaces using 5 cores pinned to cpus 5-9
40 | ... | and 2048M memory. Testpmd is using socket-mem=1024M (512x2M hugepages),
41 | ... | 5 cores (1 main core and 4 cores dedicated for io), forwarding mode is
42 | ... | set to mac, rxd/txd=256, burst=64. DUT1, DUT2 are tested with 2p10GE
43 | ... | NIC X520 Niantic by Intel.
44 | ... | *[Ver] TG verification:* TG verifies throughput PDR (Partial Drop
45 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
46 | ... | of packets transmitted. Ref-PDR value is periodically updated acording to
47 | ... | formula: ref-PDR = 0.9x PDR, where PDR is found in RFC2544 long
48 | ... | performance tests for the same DUT configuration. Test packets are
49 | ... | generated by TG on links to DUTs. TG traffic profile contains two L3
50 | ... | flow-groups (flow-group per direction, 253 flows per flow-group) with
51 | ... | all packets containing Ethernet header, IPv4 header with IP protocol=61
52 | ... | and static payload. MAC addresses are matching MAC addresses of the
53 | ... | TG node interfaces.
54 | ... | *[Ref] Applicable standard specifications:* RFC2544.
55
56 *** Variables ***
57 | ${sock1}= | /tmp/sock-1
58 | ${sock2}= | /tmp/sock-2
59 | ${fib_table_1}= | 100
60 | ${fib_table_2}= | 101
61 # Traffic profile:
62 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src253
63
64 *** Keywords ***
65 | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
66 | | [Documentation]
67 | | ... | [Cfg] DUT runs IPv4 routing config with ${wt} thread, ${wt} phy\
68 | | ... | core, ${rxq} receive queue per NIC port.
69 | | ... | [Ver] Verify ref-PDR for ${framesize} Byte frames using single trial\
70 | | ... | throughput test at 2x ${rate}.
71 | | ...
72 | | [Arguments] | ${framesize} | ${rate} | ${wt} | ${rxq}
73 | | ...
74 | | # Test Variables required for test and test teardown
75 | | Set Test Variable | ${framesize}
76 | | Set Test Variable | ${rate}
77 | | ${get_framesize}= | Get Frame Size | ${framesize}
78 | | ${dut1_vm_refs}= | Create Dictionary
79 | | ${dut2_vm_refs}= | Create Dictionary
80 | | Set Test Variable | ${dut1_vm_refs}
81 | | Set Test Variable | ${dut2_vm_refs}
82 | | ...
83 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
84 | | And Add PCI devices to DUTs in 3-node single link topology
85 | | And Run Keyword If | ${get_framesize} < ${1522}
86 | | ... | Add no multi seg to all DUTs
87 | | And Apply startup configuration on all VPP DUTs
88 | | When Initialize IPv4 forwarding with vhost in 3-node circular topology
89 | | ... | ${sock1} | ${sock2}
90 | | ${vm1}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
91 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1 | ${dut1_vif1_mac}
92 | | ... | ${dut1_vif2_mac}
93 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
94 | | ${vm2}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
95 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1 | ${dut2_vif1_mac}
96 | | ... | ${dut2_vif2_mac}
97 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
98 | | Then Traffic should pass with partial loss | ${perf_trial_duration}
99 | | ... | ${rate} | ${framesize} | ${traffic_profile}
100 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
101
102 *** Test Cases ***
103 | tc01-64B-1t1c-eth-ip4base-eth-2vhost-1vm-pdrchk
104 | | [Documentation]
105 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy\
106 | | ... | core, 1 receive queue per NIC port.
107 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
108 | | ... | throughput test at 2x ${rate}.
109 | | ...
110 | | [Tags] | 64B | 1T1C | STHREAD
111 | | ...
112 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
113 | | framesize=${64} | rate=2.5mpps | wt=1 | rxq=1
114
115 | tc02-1518B-1t1c-eth-ip4base-eth-2vhost-1vm-pdrchk
116 | | [Documentation]
117 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy\
118 | | ... | core, 1 receive queue per NIC port.
119 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
120 | | ... | throughput test at 2x ${rate}.
121 | | ...
122 | | [Tags] | 1518B | 1T1C | STHREAD
123 | | ...
124 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
125 | | framesize=${1518} | rate=300000pps | wt=1 | rxq=1
126
127 | tc03-IMIX-1t1c-eth-ip4base-eth-2vhost-1vm-pdrchk
128 | | [Documentation]
129 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy\
130 | | ... | core, 1 receive queue per NIC port.
131 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
132 | | ... | throughput test at 2x ${rate}.
133 | | ...
134 | | [Tags] | IMIX | 1T1C | STHREAD
135 | | ...
136 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
137 | | framesize=IMIX_v4_1 | rate=0.9mpps | wt=1 | rxq=1
138
139 | tc04-64B-2t2c-eth-ip4base-eth-2vhost-1vm-pdrchk
140 | | [Documentation]
141 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy\
142 | | ... | cores, 1 receive queue per NIC port.
143 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
144 | | ... | throughput test at 2x ${rate}.
145 | | ...
146 | | [Tags] | 64B | 2T2C | MTHREAD
147 | | ...
148 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
149 | | framesize=${64} | rate=3.0mpps | wt=2 | rxq=1
150
151 | tc05-1518B-2t2c-eth-ip4base-eth-2vhost-1vm-pdrchk
152 | | [Documentation]
153 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy\
154 | | ... | cores, 1 receive queue per NIC port.
155 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
156 | | ... | throughput test at 2x ${rate}.
157 | | ...
158 | | [Tags] | 1518B | 2T2C | MTHREAD
159 | | ...
160 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
161 | | framesize=${1518} | rate=350000pps | wt=2 | rxq=1
162
163 | tc06-IMIX-2t2c-eth-ip4base-eth-2vhost-1vm-pdrchk
164 | | [Documentation]
165 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy\
166 | | ... | cores, 1 receive queue per NIC port.
167 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
168 | | ... | throughput test at 2x ${rate}.
169 | | ...
170 | | [Tags] | IMIX | 2T2C | MTHREAD
171 | | ...
172 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
173 | | framesize=IMIX_v4_1 | rate=2.0mpps | wt=2 | rxq=1
174
175 | tc07-64B-4t4c-eth-ip4base-eth-2vhost-1vm-pdrchk
176 | | [Documentation]
177 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy\
178 | | ... | cores, 2 receive queues per NIC port.
179 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
180 | | ... | throughput test at 2x ${rate}.
181 | | ...
182 | | [Tags] | 64B | 4T4C | MTHREAD
183 | | ...
184 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
185 | | framesize=${64} | rate=3.8mpps | wt=4 | rxq=2
186
187 | tc08-1518B-4t4c-eth-ip4base-eth-2vhost-1vm-pdrchk
188 | | [Documentation]
189 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy\
190 | | ... | cores, 2 receive queues per NIC port.
191 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
192 | | ... | throughput test at 2x ${rate}.
193 | | ...
194 | | [Tags] | 1518B | 4T4C | MTHREAD
195 | | ...
196 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
197 | | framesize=${1518} | rate=350000pps | wt=4 | rxq=2
198
199 | tc09-IMIX-4t4c-eth-ip4base-eth-2vhost-1vm-pdrchk
200 | | [Documentation]
201 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy\
202 | | ... | cores, 2 receive queues per NIC port.
203 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
204 | | ... | throughput test at 2x ${rate}.
205 | | ...
206 | | [Tags] | IMIX | 4T4C | MTHREAD
207 | | ...
208 | | [Template] | Check PDR for IPv4 routing with vhost and VM with dpdk-testpmd
209 | | framesize=IMIX_v4_1 | rate=3.0mpps | wt=4 | rxq=2