perf: hoststack iperf3 test tuning
[csit.git] / resources / libraries / robot / hoststack / hoststack.robot
1 # Copyright (c) 2020 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 | Library | resources.libraries.python.InterfaceUtil
16 | Library | resources.libraries.python.IPUtil
17 | Library | resources.libraries.python.HoststackUtil
18 | Library | resources.libraries.python.NsimUtil
19 | Variables | resources/libraries/python/Constants.py
20 | Resource | resources/libraries/robot/ip/ip4.robot
21 | Resource | resources/libraries/robot/nsim/nsim.robot
22 |
23 | Documentation | L2 keywords to set up VPP to test hoststack.
24
25 *** Variables ***
26 | ${quic_crypto_engine}= | nocrypto
27 | ${quic_fifo_size}= | 4M
28 | &{vpp_hoststack_attr}=
29 | ... | rxq=${1}
30 | ... | rxd=${256}
31 | ... | txd=${256}
32 | ... | phy_cores=${1}
33 | ... | vpp_api_socket=${SOCKSVR_PATH}
34 | ... | api_seg_global_size=2G
35 | ... | api_seg_api_size=1G
36 | ... | tcp_cc_algo=cubic
37 | ... | sess_evt_q_seg_size=64M
38 | ... | sess_evt_q_length=2048
39 | ... | sess_prealloc_sess=128
40 | ... | sess_v4_tbl_buckets=20000
41 | ... | sess_v4_tbl_mem=64M
42 | ... | sess_v4_hopen_buckets=20000
43 | ... | sess_v4_hopen_mem=64M
44 | ... | sess_lendpt_buckets=250000
45 | ... | sess_lendpt_mem=512M
46 | &{vpp_echo_server_attr}=
47 | ... | role=server
48 | ... | cpu_cnt=${1}
49 | ... | cfg_vpp_feature=${None}
50 | ... | namespace=default
51 | ... | vpp_api_socket=${vpp_hoststack_attr}[vpp_api_socket]
52 | ... | json_output=json
53 | ... | uri_protocol=quic
54 | ... | uri_ip4_addr=${EMPTY}
55 | ... | uri_port=1234
56 | ... | nclients=1
57 | ... | quic_streams=1
58 | ... | time=sconnect:lastbyte
59 | ... | fifo_size=4M
60 | ... | rx_bytes=0
61 | ... | tx_bytes=0
62 | ... | rx_results_diff=${False}
63 | ... | tx_results_diff=${False}
64 | &{vpp_echo_client_attr}=
65 | ... | role=client
66 | ... | cpu_cnt=${1}
67 | ... | cfg_vpp_feature=${None}
68 | ... | namespace=default
69 | ... | vpp_api_socket=${vpp_hoststack_attr}[vpp_api_socket]
70 | ... | json_output=json
71 | ... | uri_protocol=quic
72 | ... | uri_ip4_addr=${EMPTY}
73 | ... | uri_port=1234
74 | ... | nclients=1
75 | ... | quic_streams=1
76 | ... | time=sconnect:lastbyte
77 | ... | fifo_size=4M
78 | ... | rx_bytes=0
79 | ... | tx_bytes=0
80 | ... | rx_results_diff=${False}
81 | ... | tx_results_diff=${False}
82 | &{iperf3_server_attr}=
83 | ... | role=server
84 | ... | cpu_cnt=${1}
85 | ... | cfg_vpp_feature=${Empty}
86 | ... | namespace=default
87 | ... | vcl_config=vcl_iperf3.conf
88 | ... | ld_preload=${True}
89 | ... | transparent_tls=${False}
90 | ... | json=${False}
91 | ... | ip_version=${4}
92 | &{iperf3_client_attr}=
93 | ... | role=client
94 | ... | cpu_cnt=${1}
95 | ... | cfg_vpp_feature=${Empty}
96 | ... | namespace=default
97 | ... | vcl_config=vcl_iperf3.conf
98 | ... | ld_preload=${True}
99 | ... | transparent_tls=${False}
100 | ... | json=${False}
101 | ... | ip_version=${4}
102 | ... | ip_address=${EMPTY}
103 | ... | parallel=${1}
104 | ... | time=${20}
105
106 *** Keywords ***
107 | Set VPP Hoststack Attributes
108 | | [Documentation]
109 | | ... | Set the VPP HostStack attributes in the vpp_hoststack_attr dictionary.
110 | |
111 | | ... | *Arguments:*
112 | | ... | - ${rxq} - Number of Rx Queues Type: int
113 | | ... | - ${rxd} - Number of Rx Descriptors Type: int
114 | | ... | - ${txd} - Number of Tx Descriptors Type: int
115 | | ... | - ${phy_cores} - Number of cores for workers Type: int
116 | | ... | - ${vpp_api_socket} - Path to VPP api socket file Type: string
117 | | ... | - ${api_seg_global_size} - Global API segment size Type: string
118 | | ... | - ${api_seg_api_size} - API segment API fifo size Type: string
119 | | ... | - ${tcp_cc_algo} - TCP congestion control algorithm Type: string
120 | | ... | - ${sess_evt_q_seg_size} - Session event queue segment size
121 | | ... | Type: string
122 | | ... | - ${sess_evt_q_length} - Session event queue length Type: string
123 | | ... | - ${sess_prealloc_sess} - Number of sessions to preallocate
124 | | ... | Type: string
125 | | ... | - ${sess_v4_tbl_buckets} - Number of IPv4 session table buckets
126 | | ... | Type: string
127 | | ... | - ${sess_v4_tbl_mem} - IPv4 session table memory size
128 | | ... | Type: string
129 | | ... | - ${sess_v4_hopen_buckets} - Number of IPv4 session
130 | | ... | half open table buckets Type: string
131 | | ... | - ${sess_v4_hopen_mem} - IPv4 session half open
132 | | ... | table memory size Type: string
133 | | ... | - ${sess_lendpt_buckets} - Number of session local endpoint
134 | | ... | table buckets Type: string
135 | | ... | - ${sess_lendpt_mem} - Session local endpoint
136 | | ... | table memory size Type: string
137 | |
138 | | ... | *Example:*
139 | |
140 | | ... | \| Set VPP Hoststack Attributes \| phy_cores=${phy_cores} \|
141 | |
142 | | [Arguments]
143 | | ... | ${rxq}=${vpp_hoststack_attr}[rxq]
144 | | ... | ${rxd}=${vpp_hoststack_attr}[rxd]
145 | | ... | ${txd}=${vpp_hoststack_attr}[txd]
146 | | ... | ${phy_cores}=${vpp_hoststack_attr}[phy_cores]
147 | | ... | ${vpp_api_socket}=${vpp_hoststack_attr}[vpp_api_socket]
148 | | ... | ${api_seg_global_size}=${vpp_hoststack_attr}[api_seg_global_size]
149 | | ... | ${api_seg_api_size}=${vpp_hoststack_attr}[api_seg_api_size]
150 | | ... | ${tcp_cc_algo}=${vpp_hoststack_attr}[tcp_cc_algo]
151 | | ... | ${sess_evt_q_seg_size}=${vpp_hoststack_attr}[sess_evt_q_seg_size]
152 | | ... | ${sess_evt_q_length}=${vpp_hoststack_attr}[sess_evt_q_length]
153 | | ... | ${sess_prealloc_sess}=${vpp_hoststack_attr}[sess_prealloc_sess]
154 | | ... | ${sess_v4_tbl_buckets}=${vpp_hoststack_attr}[sess_v4_tbl_buckets]
155 | | ... | ${sess_v4_tbl_mem}=${vpp_hoststack_attr}[sess_v4_tbl_mem]
156 | | ... | ${sess_v4_hopen_buckets}=${vpp_hoststack_attr}[sess_v4_hopen_buckets]
157 | | ... | ${sess_v4_hopen_mem}=${vpp_hoststack_attr}[sess_v4_hopen_mem]
158 | | ... | ${sess_lendpt_buckets}=${vpp_hoststack_attr}[sess_lendpt_buckets]
159 | | ... | ${sess_lendpt_mem}=${vpp_hoststack_attr}[sess_lendpt_mem]
160 | |
161 | | Set To Dictionary | ${vpp_hoststack_attr} | rxq | ${rxq}
162 | | Set To Dictionary | ${vpp_hoststack_attr} | rxd | ${rxd}
163 | | Set To Dictionary | ${vpp_hoststack_attr} | txd | ${txd}
164 | | Set To Dictionary | ${vpp_hoststack_attr} | phy_cores | ${phy_cores}
165 | | Set To Dictionary | ${vpp_hoststack_attr}
166 | | ... | vpp_api_socket | ${vpp_api_socket}
167 | | Set To Dictionary | ${vpp_hoststack_attr}
168 | | ... | api_seg_global_size | ${api_seg_global_size}
169 | | Set To Dictionary | ${vpp_hoststack_attr}
170 | | ... | api_seg_api_size | ${api_seg_api_size}
171 | | Set To Dictionary | ${vpp_hoststack_attr}
172 | | ... | tcp_cc_algo | ${tcp_cc_algo}
173 | | Set To Dictionary | ${vpp_hoststack_attr}
174 | | ... | sess_evt_q_seg_size | ${sess_evt_q_seg_size}
175 | | Set To Dictionary | ${vpp_hoststack_attr}
176 | | ... | sess_evt_q_length | ${sess_evt_q_length}
177 | | Set To Dictionary | ${vpp_hoststack_attr}
178 | | ... | sess_prealloc_sess | ${sess_prealloc_sess}
179 | | Set To Dictionary | ${vpp_hoststack_attr}
180 | | ... | sess_v4_tbl_buckets | ${sess_v4_tbl_buckets}
181 | | Set To Dictionary | ${vpp_hoststack_attr}
182 | | ... | sess_v4_tbl_mem | ${sess_v4_tbl_mem}
183 | | Set To Dictionary | ${vpp_hoststack_attr}
184 | | ... | sess_v4_hopen_buckets | ${sess_v4_hopen_buckets}
185 | | Set To Dictionary | ${vpp_hoststack_attr}
186 | | ... | sess_v4_hopen_mem | ${sess_v4_hopen_mem}
187 | | Set To Dictionary | ${vpp_hoststack_attr}
188 | | ... | sess_lendpt_buckets | ${sess_lendpt_buckets}
189 | | Set To Dictionary | ${vpp_hoststack_attr}
190 | | ... | sess_lendpt_mem | ${sess_lendpt_mem}
191
192 | Set VPP Echo Server Attributes
193 | | [Documentation]
194 | | ... | Set the HostStack vpp_echo test program attributes
195 | | ... | in the vpp_echo_server_attr dictionary.
196 | |
197 | | ... | *Arguments:*
198 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
199 | | ... | - ${namespace} - Namespace Type: string
200 | | ... | - ${nclients} - Number of clients Type: string
201 | | ... | - ${quic_streams} - Number of quic streams Type: string
202 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
203 | | ... | - ${time} - Timing events (start:end) Type: string
204 | | ... | - ${rx_bytes} - Number of Bytes to receive Type: string
205 | | ... | - ${tx_bytes} - Number of Bytes to send Type: string
206 | | ... | - ${rx_results_diff} - Rx Results are different to pass Type: boolean
207 | | ... | - ${tx_results_diff} - Tx Results are different to pass Type: boolean
208 | |
209 | | ... | *Example:*
210 | |
211 | | ... | \| Set VPP Echo Server Attributes \| nclients=${nclients} \|
212 | | ... | \| tx_bytes=${tx_bytes} \|
213 | |
214 | | [Arguments]
215 | | ... | ${cfg_vpp_feature}=${vpp_echo_server_attr}[cfg_vpp_feature]
216 | | ... | ${namespace}=${vpp_echo_server_attr}[namespace]
217 | | ... | ${nclients}=${vpp_echo_server_attr}[nclients]
218 | | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
219 | | ... | ${time}=${vpp_echo_server_attr}[time]
220 | | ... | ${fifo_size}=${vpp_echo_server_attr}[fifo_size]
221 | | ... | ${rx_bytes}=${vpp_echo_server_attr}[rx_bytes]
222 | | ... | ${tx_bytes}=${vpp_echo_server_attr}[tx_bytes]
223 | | ... | ${rx_results_diff}=${vpp_echo_server_attr}[rx_results_diff]
224 | | ... | ${tx_results_diff}=${vpp_echo_server_attr}[tx_results_diff]
225 | |
226 | | Set To Dictionary | ${vpp_echo_server_attr} | cfg_vpp_feature
227 | | ... | ${cfg_vpp_feature}
228 | | Set To Dictionary | ${vpp_echo_server_attr} | namespace | ${namespace}
229 | | Set To Dictionary | ${vpp_echo_server_attr} | nclients | ${nclients}
230 | | Set To Dictionary | ${vpp_echo_server_attr} | quic_streams | ${quic_streams}
231 | | Set To Dictionary | ${vpp_echo_server_attr} | time | ${time}
232 | | Set To Dictionary | ${vpp_echo_server_attr} | fifo_size | ${fifo_size}
233 | | Set To Dictionary | ${vpp_echo_server_attr} | rx_bytes | ${rx_bytes}
234 | | Set To Dictionary | ${vpp_echo_server_attr} | tx_bytes | ${tx_bytes}
235 | | Set To Dictionary
236 | | ... | ${vpp_echo_server_attr} | rx_results_diff | ${rx_results_diff}
237 | | Set To Dictionary
238 | | ... | ${vpp_echo_server_attr} | tx_results_diff | ${tx_results_diff}
239
240 | Set VPP Echo Client Attributes
241 | | [Documentation]
242 | | ... | Set the HostStack vpp_echo test program attributes
243 | | ... | in the vpp_echo_client_attr dictionary.
244 | |
245 | | ... | *Arguments:*
246 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
247 | | ... | - ${namespace} - Namespace Type: string
248 | | ... | - ${nclients} - Number of clients Type: string
249 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
250 | | ... | - ${time} - Timing events (start:end) Type: string
251 | | ... | - ${rx_bytes} - Number of Bytes to receive Type: string
252 | | ... | - ${tx_bytes} - Number of Bytes to send Type: string
253 | | ... | - ${rx_results_diff} - Rx Results are different to pass Type: boolean
254 | | ... | - ${tx_results_diff} - Tx Results are different to pass Type: boolean
255 | |
256 | | ... | *Example:*
257 | |
258 | | ... | \| Set VPP Echo Client Attributes \| nclients=${nclients} \|
259 | | ... | \| tx_bytes=${tx_bytes} \|
260 | |
261 | | [Arguments]
262 | | ... | ${cfg_vpp_feature}=${vpp_echo_client_attr}[cfg_vpp_feature]
263 | | ... | ${namespace}=${vpp_echo_client_attr}[namespace]
264 | | ... | ${nclients}=${vpp_echo_client_attr}[nclients]
265 | | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
266 | | ... | ${time}=${vpp_echo_client_attr}[time]
267 | | ... | ${fifo_size}=${vpp_echo_client_attr}[fifo_size]
268 | | ... | ${rx_bytes}=${vpp_echo_client_attr}[rx_bytes]
269 | | ... | ${tx_bytes}=${vpp_echo_client_attr}[tx_bytes]
270 | | ... | ${rx_results_diff}=${vpp_echo_client_attr}[rx_results_diff]
271 | | ... | ${tx_results_diff}=${vpp_echo_client_attr}[tx_results_diff]
272 | |
273 | | Set To Dictionary | ${vpp_echo_client_attr} | cfg_vpp_feature
274 | | ... | ${cfg_vpp_feature}
275 | | Set To Dictionary | ${vpp_echo_client_attr} | namespace | ${namespace}
276 | | Set To Dictionary | ${vpp_echo_client_attr} | nclients | ${nclients}
277 | | Set To Dictionary | ${vpp_echo_client_attr} | quic_streams | ${quic_streams}
278 | | Set To Dictionary | ${vpp_echo_client_attr} | time | ${time}
279 | | Set To Dictionary | ${vpp_echo_client_attr} | fifo_size | ${fifo_size}
280 | | Set To Dictionary | ${vpp_echo_client_attr} | rx_bytes | ${rx_bytes}
281 | | Set To Dictionary | ${vpp_echo_client_attr} | tx_bytes | ${tx_bytes}
282 | | Set To Dictionary
283 | | ... | ${vpp_echo_client_attr} | rx_results_diff | ${rx_results_diff}
284 | | Set To Dictionary
285 | | ... | ${vpp_echo_client_attr} | tx_results_diff | ${tx_results_diff}
286
287 | Set Iperf3 Server Attributes
288 | | [Documentation]
289 | | ... | Set the HostStack iperf3 test program attributes
290 | | ... | in the iperf3_server_attr dictionary.
291 | |
292 | | ... | *Arguments:*
293 | | ... | - ${vcl_config} - VCL configuration file name Type: string
294 | | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: boolean
295 | | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: boolean
296 | | ... | - ${ip_version} - IP version (4 or 6) Type: int
297 | |
298 | | ... | *Example:*
299 | |
300 | | ... | \| Set Iperf3 Server Attributes \| vcl_config=${vcl_config} \|
301 | | ... | \| ip_version=${ip_version} \|
302 | |
303 | | [Arguments]
304 | | ... | ${vcl_config}=${iperf3_server_attr}[vcl_config]
305 | | ... | ${ld_preload}=${iperf3_server_attr}[ld_preload]
306 | | ... | ${transparent_tls}=${iperf3_server_attr}[transparent_tls]
307 | | ... | ${ip_version}=${iperf3_server_attr}[ip_version]
308 | |
309 | | Set To Dictionary | ${iperf3_server_attr} | vcl_config | ${vcl_config}
310 | | Set To Dictionary | ${iperf3_server_attr} | ld_preload | ${ld_preload}
311 | | Set To Dictionary | ${iperf3_server_attr} | transparent_tls
312 | | ... | ${transparent_tls}
313 | | Set To Dictionary | ${iperf3_server_attr} | ip_version | ${ip_version}
314
315 | Set Iperf3 Client Attributes
316 | | [Documentation]
317 | | ... | Set the HostStack iperf3 test program attributes
318 | | ... | in the iperf3_client_attr dictionary.
319 | |
320 | | ... | *Arguments:*
321 | | ... | - ${vcl_config} - VCL configuration file name Type: string
322 | | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: boolean
323 | | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: boolean
324 | | ... | - ${ip_version} - IP version (4 or 6) Type: int
325 | | ... | - ${parallel} - Number of parallel streams Type: int
326 | |
327 | | ... | *Example:*
328 | |
329 | | ... | \| Set Iperf3 Client Attributes \| vcl_config=${vcl_config} \|
330 | | ... | \| ip_version=${ip_version} \| parallel=${streams} \|
331 | |
332 | | [Arguments]
333 | | ... | ${vcl_config}=${iperf3_client_attr}[vcl_config]
334 | | ... | ${ld_preload}=${iperf3_client_attr}[ld_preload]
335 | | ... | ${transparent_tls}=${iperf3_client_attr}[transparent_tls]
336 | | ... | ${ip_version}=${iperf3_client_attr}[ip_version]
337 | | ... | ${parallel}=${iperf3_client_attr}[parallel]
338 | |
339 | | Set To Dictionary | ${iperf3_client_attr} | vcl_config | ${vcl_config}
340 | | Set To Dictionary | ${iperf3_client_attr} | ld_preload | ${ld_preload}
341 | | Set To Dictionary | ${iperf3_client_attr} | transparent_tls
342 | | ... | ${transparent_tls}
343 | | Set To Dictionary | ${iperf3_client_attr} | ip_version | ${ip_version}
344 | | Set To Dictionary | ${iperf3_client_attr} | parallel | ${parallel}
345
346 | Run hoststack test program on DUT
347 | | [Documentation]
348 | | ... | Configure IP address on the port, set it up and start the specified
349 | | ... | HostStack test program on the specified DUT.
350 | |
351 | | ... | *Arguments:*
352 | | ... | - ${node} - VPP DUT node Type: Node
353 | | ... | - ${intf} - VPP DUT node interface key Type: string
354 | | ... | - ${ip4_addr} - VPP DUT node interface ip4 address Type: string
355 | | ... | - ${ip4_mask} - VPP DUT node interface ip4 network mask Type: string
356 | | ... | - ${namespace} - Network namespace to run test program in Type: string
357 | | ... | - ${cfg_vpp_feature} - VPP hoststack feature requiring
358 | | ... | additional VPP configuration Type: string
359 | | ... | - ${core_list} - Cpu core affinity list Type: string
360 | | ... | - ${test_program} - Host Stack test program Type: dict
361 | |
362 | | ... | *Example:*
363 | |
364 | | ... | \| Run hoststack test program on DUT \| ${dut1} \| ${dut1_if1} \|
365 | | ... | \| ${dut1_if1_ip4_addr} \| ${dut1_if1_ip4_mask} \| default \|
366 | | ... | \| quic \| ${vpp_echo_server} \|
367 | |
368 | | [Arguments] | ${node} | ${intf} | ${ip4_addr} | ${ip4_mask}
369 | | | ... | ${namespace} | ${core_list} | ${cfg_vpp_feature}
370 | | | ... | ${test_program}
371 | |
372 | | Run Keyword If | ${vpp_nsim_attr}[output_feature_enable]
373 | | ... | Configure VPP NSIM | ${node} | ${vpp_nsim_attr} | ${intf}
374 | | Run Keyword If | '${cfg_vpp_feature}' != ''
375 | | ... | Additional VPP Config for Feature ${cfg_vpp_feature} | ${node}
376 | | VPP Get Interface Data | ${node}
377 | | Set Interface State | ${node} | ${intf} | up
378 | | VPP Interface Set IP Address | ${node} | ${intf} | ${ip4_addr}
379 | | ... | ${ip4_mask}
380 | | Vpp Node Interfaces Ready Wait | ${node}
381 | | ${hoststack_test_program_pid}= | Start Hoststack Test Program
382 | | ... | ${node} | ${namespace} | ${core_list} | ${test_program}
383 | | Return From Keyword | ${hoststack_test_program_pid}
384
385 | Additional VPP Config For Feature quic
386 | | [Documentation]
387 | | ... | Configure VPP quic attributes on the specified DUT.
388 | |
389 | | ... | *Arguments:*
390 | | ... | - ${node} - VPP DUT node Type: Node
391 | |
392 | | [Arguments] | ${node}
393 | |
394 | | Set hoststack quic fifo size | ${node} | ${quic_fifo_size}
395 | | Set hoststack quic crypto engine | ${node} | ${quic_crypto_engine}
396
397 | Configure VPP hoststack attributes on all DUTs
398 | | [Documentation]
399 | | ... | Configure VPP HostStack attributes on all DUTs.
400 | |
401 | | Set Max Rate And Jumbo
402 | | Add worker threads to all DUTs
403 | | ... | ${vpp_hoststack_attr}[phy_cores] | ${vpp_hoststack_attr}[rxq]
404 | | ... | ${vpp_hoststack_attr}[rxd] | ${vpp_hoststack_attr}[txd]
405 | | Pre-initialize layer driver | ${nic_driver}
406 | | FOR | ${dut} | IN | @{duts}
407 | | | Import Library | resources.libraries.python.VppConfigGenerator
408 | | | ... | WITH NAME | ${dut}
409 | | | Run keyword | ${dut}.Add socksvr | ${vpp_hoststack_attr}[vpp_api_socket]
410 | | | Run keyword | ${dut}.Add api segment global size
411 | | | ... | ${vpp_hoststack_attr}[api_seg_global_size]
412 | | | Run keyword | ${dut}.Add api segment api size
413 | | | ... | ${vpp_hoststack_attr}[api_seg_api_size]
414 | | | Run keyword | ${dut}.Add api segment gid | testuser
415 | | | Run keyword | ${dut}.Add tcp congestion control algorithm
416 | | | ... | ${vpp_hoststack_attr}[tcp_cc_algo]
417 | | | Run keyword | ${dut}.Add session enable
418 | | | Run keyword | ${dut}.Add session event queues memfd segment
419 | | | Run keyword | ${dut}.Add session event queues segment size
420 | | | ... | ${vpp_hoststack_attr}[sess_evt_q_seg_size]
421 | | | Run keyword | ${dut}.Add session event queue length
422 | | | ... | ${vpp_hoststack_attr}[sess_evt_q_length]
423 | | | Run keyword | ${dut}.Add session preallocated sessions
424 | | | ... | ${vpp_hoststack_attr}[sess_prealloc_sess]
425 | | | Run keyword | ${dut}.Add session v4 session table buckets
426 | | | ... | ${vpp_hoststack_attr}[sess_v4_tbl_buckets]
427 | | | Run keyword | ${dut}.Add session v4 session table memory
428 | | | ... | ${vpp_hoststack_attr}[sess_v4_tbl_mem]
429 | | | Run keyword | ${dut}.Add session v4 halfopen table buckets
430 | | | ... | ${vpp_hoststack_attr}[sess_v4_hopen_buckets]
431 | | | Run keyword | ${dut}.Add session v4 halfopen table memory
432 | | | ... | ${vpp_hoststack_attr}[sess_v4_hopen_mem]
433 | | | Run keyword | ${dut}.Add session local endpoints table buckets
434 | | | ... | ${vpp_hoststack_attr}[sess_lendpt_buckets]
435 | | | Run keyword | ${dut}.Add session local endpoints table memory
436 | | | ... | ${vpp_hoststack_attr}[sess_lendpt_mem]
437 | | END
438 | | Apply startup configuration on all VPP DUTs
439
440 | Get Test Results From Hoststack VPP Echo Test
441 | | [Documentation]
442 | | ... | Configure IP address on the port, set it up and start the specified
443 | | ... | HostStack test programs on the DUTs. Gather test program
444 | | ... | output and append test results in message.
445 | | ... | Return boolean indicating when no results were available from
446 | | ... | both the server and client test programs.
447 | |
448 | | Set To Dictionary | ${vpp_echo_server_attr} | uri_ip4_addr
449 | | ... | ${dut2_if1_ip4_addr}
450 | | Set To Dictionary | ${vpp_echo_client_attr} | uri_ip4_addr
451 | | ... | ${dut2_if1_ip4_addr}
452 | | Configure VPP Hoststack Attributes on all DUTs
453 | | ${vpp_echo_server}= | Get VPP Echo Command | ${vpp_echo_server_attr}
454 | | ${skip_cnt}= | Evaluate
455 | | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
456 | | ${numa}= | Get interfaces numa node | ${dut2} | ${dut2_if1}
457 | | ${core_list}= | Cpu list per node str | ${dut2} | ${numa}
458 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${vpp_echo_server_attr}[cpu_cnt]
459 | | ${server_pid}= | Run hoststack test program on DUT
460 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip4_addr} | ${dut2_if1_ip4_prefix}
461 | | ... | ${vpp_echo_server_attr}[namespace] | ${core_list}
462 | | ... | ${vpp_echo_server_attr}[cfg_vpp_feature] | ${vpp_echo_server}
463 | | ${vpp_echo_client}= | Get VPP Echo Command | ${vpp_echo_client_attr}
464 | | ${numa}= | Get interfaces numa node | ${dut1} | ${dut1_if1}
465 | | ${core_list}= | Cpu list per node str | ${dut1} | ${numa}
466 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${vpp_echo_client_attr}[cpu_cnt]
467 | | ${client_pid}= | Run hoststack test program on DUT
468 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4_addr} | ${dut1_if1_ip4_prefix}
469 | | ... | ${vpp_echo_client_attr}[namespace] | ${core_list}
470 | | ... | ${vpp_echo_client_attr}[cfg_vpp_feature] | ${vpp_echo_client}
471 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
472 | | ${client_no_results} | ${client_output}=
473 | | ... | Analyze hoststack test program output | ${dut1} | Client
474 | | ... | ${vpp_nsim_attr} | ${vpp_echo_client}
475 | | Then Set test message | ${client_output}
476 | | And Hoststack Test Program Finished | ${dut2} | ${server_pid}
477 | | ${server_no_results} | ${server_output}=
478 | | ... | Analyze hoststack test program output | ${dut2} | Server
479 | | ... | ${vpp_nsim_attr} | ${vpp_echo_server}
480 | | Set test message | ${server_output} | append=True
481 | | Run Keyword And Return | No Hoststack Test Program Results
482 | | ... | ${server_no_results} | ${client_no_results}
483
484 | Get Test Results From Hoststack Iperf3 Test
485 | | [Documentation]
486 | | ... | Configure IP address on the port, set it up and start the specified
487 | | ... | HostStack test programs on the DUTs. Gather test program
488 | | ... | output and append test results in message.
489 | | ... | Return boolean indicating when no results were available from
490 | | ... | both the server and client test programs.
491 | |
492 | | Set To Dictionary | ${iperf3_client_attr} | ip_address
493 | | ... | ${dut2_if1_ip4_addr}
494 | | Configure VPP Hoststack Attributes on all DUTs
495 | | ${iperf3_server}= | Get Iperf3 Command | ${iperf3_server_attr}
496 | | ${skip_cnt}= | Evaluate
497 | | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
498 | | ${numa}= | Get interfaces numa node | ${dut2} | ${dut2_if1}
499 | | ${core_list}= | Cpu list per node str | ${dut2} | ${numa}
500 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${iperf3_server_attr}[cpu_cnt]
501 | | ${server_pid}= | Run hoststack test program on DUT
502 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip4_addr} | ${dut2_if1_ip4_prefix}
503 | | ... | ${iperf3_server_attr}[namespace] | ${core_list}
504 | | ... | ${iperf3_server_attr}[cfg_vpp_feature] | ${iperf3_server}
505 | | ${iperf3_client}= | Get Iperf3 Command | ${iperf3_client_attr}
506 | | ${numa}= | Get interfaces numa node | ${dut1} | ${dut1_if1}
507 | | ${core_list}= | Cpu list per node str | ${dut1} | ${numa}
508 | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${iperf3_client_attr}[cpu_cnt]
509 | | ${client_pid}= | Run hoststack test program on DUT
510 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4_addr} | ${dut1_if1_ip4_prefix}
511 | | ... | ${iperf3_client_attr}[namespace] | ${core_list}
512 | | ... | ${iperf3_client_attr}[cfg_vpp_feature] | ${iperf3_client}
513 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
514 | | ${client_no_results} | ${client_output}=
515 | | ... | Analyze hoststack test program output | ${dut1} | Client
516 | | ... | ${vpp_nsim_attr} | ${iperf3_client}
517 | | Then Set test message | ${client_output}
518 | | Return From Keyword | ${client_no_results}