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