aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/hoststack/hoststack.robot
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2020-01-08 20:51:43 +0000
committerPeter Mikus <pmikus@cisco.com>2020-01-17 13:51:48 +0000
commit6518c73a0e5cdaf12ae01d247a65aec287d01625 (patch)
tree279dcdce117917e835cde9971c5386f23c2d22e2 /resources/libraries/robot/hoststack/hoststack.robot
parentac33ed374cb82c9258e4cf57e150f77750362bbc (diff)
perf: add TCP Iperf3+LDPRELOAD test suite
Change-Id: Icff49fb31cce342a2a4ae799e844ec91f9e5e366 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'resources/libraries/robot/hoststack/hoststack.robot')
-rw-r--r--resources/libraries/robot/hoststack/hoststack.robot175
1 files changed, 143 insertions, 32 deletions
diff --git a/resources/libraries/robot/hoststack/hoststack.robot b/resources/libraries/robot/hoststack/hoststack.robot
index d0fd9a2a95..cdf35f2015 100644
--- a/resources/libraries/robot/hoststack/hoststack.robot
+++ b/resources/libraries/robot/hoststack/hoststack.robot
@@ -34,12 +34,12 @@
| ... | sess_evt_q_seg_size=4G
| ... | sess_evt_q_length=4000000
| ... | sess_prealloc_sess=4000000
-| ... | sess_v4_sess_tbl_buckets=2000000
-| ... | sess_v4_sess_tbl_mem=2G
-| ... | sess_v4_sess_halfopen_buckets=5000000
-| ... | sess_v4_sess_halfopen_mem=3G
-| ... | sess_lcl_endpt_tbl_buckets=5000000
-| ... | sess_lcl_endpt_tbl_mem=3G
+| ... | sess_v4_tbl_buckets=2000000
+| ... | sess_v4_tbl_mem=2G
+| ... | sess_v4_hopen_buckets=5000000
+| ... | sess_v4_hopen_mem=3G
+| ... | sess_lendpt_buckets=5000000
+| ... | sess_lendpt_mem=3G
| &{vpp_echo_server_attr}=
| ... | role=server
| ... | cfg_vpp_feature=${None}
@@ -74,6 +74,27 @@
| ... | tx_bytes=0
| ... | rx_results_diff=${False}
| ... | tx_results_diff=${False}
+| &{iperf3_server_attr}=
+| ... | role=server
+| ... | cfg_vpp_feature=${Empty}
+| ... | namespace=default
+| ... | vcl_config=vcl_iperf3.conf
+| ... | ld_preload=${True}
+| ... | transparent_tls=${False}
+| ... | json=${False}
+| ... | ip_version=${4}
+| &{iperf3_client_attr}=
+| ... | role=client
+| ... | cfg_vpp_feature=${Empty}
+| ... | namespace=default
+| ... | vcl_config=vcl_iperf3.conf
+| ... | ld_preload=${True}
+| ... | transparent_tls=${False}
+| ... | json=${False}
+| ... | ip_version=${4}
+| ... | ip_address=${EMPTY}
+| ... | parallel=${1}
+| ... | bytes=1G
*** Keywords ***
| Set VPP Hoststack Attributes
@@ -91,17 +112,17 @@
| | ... | - ${sess_evt_q_length} - Session event queue length Type: string
| | ... | - ${sess_prealloc_sess} - Number of sessions to preallocate
| | ... | Type: string
-| | ... | - ${sess_v4_sess_tbl_buckets} - Number of IPv4 session table buckets
+| | ... | - ${sess_v4_tbl_buckets} - Number of IPv4 session table buckets
| | ... | Type: string
-| | ... | - ${sess_v4_sess_tbl_mem} - IPv4 session table memory size
+| | ... | - ${sess_v4_tbl_mem} - IPv4 session table memory size
| | ... | Type: string
-| | ... | - ${sess_v4_sess_halfopen_buckets} - Number of IPv4 session
+| | ... | - ${sess_v4_hopen_buckets} - Number of IPv4 session
| | ... | half open table buckets Type: string
-| | ... | - ${sess_v4_sess_halfopen_mem} - IPv4 session half open
+| | ... | - ${sess_v4_hopen_mem} - IPv4 session half open
| | ... | table memory size Type: string
-| | ... | - ${sess_lcl_endpt_tbl_buckets} - Number of session local endpoint
+| | ... | - ${sess_lendpt_buckets} - Number of session local endpoint
| | ... | table buckets Type: string
-| | ... | - ${sess_lcl_endpt_tbl_mem} - Session local endpoint
+| | ... | - ${sess_lendpt_mem} - Session local endpoint
| | ... | table memory size Type: string
| |
| | ... | *Example:*
@@ -117,12 +138,12 @@
| | ... | ${sess_evt_q_seg_size}=${vpp_hoststack_attr}[sess_evt_q_seg_size]
| | ... | ${sess_evt_q_length}=${vpp_hoststack_attr}[sess_evt_q_length]
| | ... | ${sess_prealloc_sess}=${vpp_hoststack_attr}[sess_prealloc_sess]
-| | ... | ${sess_v4_sess_tbl_buckets}=${vpp_hoststack_attr}[sess_v4_sess_tbl_buckets]
-| | ... | ${sess_v4_sess_tbl_mem}=${vpp_hoststack_attr}[sess_v4_sess_tbl_mem]
-| | ... | ${sess_v4_sess_halfopen_buckets}=${vpp_hoststack_attr}[sess_v4_sess_halfopen_buckets]
-| | ... | ${sess_v4_sess_halfopen_mem}=${vpp_hoststack_attr}[sess_v4_sess_halfopen_mem]
-| | ... | ${sess_lcl_endpt_tbl_buckets}=${vpp_hoststack_attr}[sess_lcl_endpt_tbl_buckets]
-| | ... | ${sess_lcl_endpt_tbl_mem}=${vpp_hoststack_attr}[sess_lcl_endpt_tbl_mem]
+| | ... | ${sess_v4_tbl_buckets}=${vpp_hoststack_attr}[sess_v4_tbl_buckets]
+| | ... | ${sess_v4_tbl_mem}=${vpp_hoststack_attr}[sess_v4_tbl_mem]
+| | ... | ${sess_v4_hopen_buckets}=${vpp_hoststack_attr}[sess_v4_hopen_buckets]
+| | ... | ${sess_v4_hopen_mem}=${vpp_hoststack_attr}[sess_v4_hopen_mem]
+| | ... | ${sess_lendpt_buckets}=${vpp_hoststack_attr}[sess_lendpt_buckets]
+| | ... | ${sess_lendpt_mem}=${vpp_hoststack_attr}[sess_lendpt_mem]
| |
| | Set To Dictionary | ${vpp_hoststack_attr} | rxq | ${rxq}
| | Set To Dictionary | ${vpp_hoststack_attr} | phy_cores | ${phy_cores}
@@ -139,17 +160,17 @@
| | Set To Dictionary | ${vpp_hoststack_attr}
| | ... | sess_prealloc_sess | ${sess_prealloc_sess}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_v4_sess_tbl_buckets | ${sess_v4_sess_tbl_buckets}
+| | ... | sess_v4_tbl_buckets | ${sess_v4_tbl_buckets}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_v4_sess_tbl_mem | ${sess_v4_sess_tbl_mem}
+| | ... | sess_v4_tbl_mem | ${sess_v4_tbl_mem}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_v4_sess_halfopen_buckets | ${sess_v4_sess_halfopen_buckets}
+| | ... | sess_v4_hopen_buckets | ${sess_v4_hopen_buckets}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_v4_sess_halfopen_mem | ${sess_v4_sess_halfopen_mem}
+| | ... | sess_v4_hopen_mem | ${sess_v4_hopen_mem}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_lcl_endpt_tbl_buckets | ${sess_lcl_endpt_tbl_buckets}
+| | ... | sess_lendpt_buckets | ${sess_lendpt_buckets}
| | Set To Dictionary | ${vpp_hoststack_attr}
-| | ... | sess_lcl_endpt_tbl_mem | ${sess_lcl_endpt_tbl_mem}
+| | ... | sess_lendpt_mem | ${sess_lendpt_mem}
| Set VPP Echo Server Attributes
| | [Documentation]
@@ -246,6 +267,68 @@
| | Set To Dictionary
| | ... | ${vpp_echo_client_attr} | tx_results_diff | ${tx_results_diff}
+| Set Iperf3 Server Attributes
+| | [Documentation]
+| | ... | Set the HostStack iperf3 test program attributes
+| | ... | in the iperf3_server_attr dictionary.
+| |
+| | ... | *Arguments:*
+| | ... | - ${vcl_config} - VCL configuration file name Type: string
+| | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: bool
+| | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: bool
+| | ... | - ${ip_version} - IP version (4 or 6) Type: int
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Set Iperf3 Server Attributes \| vcl_config=${vcl_config} \|
+| | ... | \| ip_version=${ip_version} \|
+| |
+| | [Arguments]
+| | ... | ${vcl_config}=${iperf3_server_attr}[vcl_config]
+| | ... | ${ld_preload}=${iperf3_server_attr}[ld_preload]
+| | ... | ${transparent_tls}=${iperf3_server_attr}[transparent_tls]
+| | ... | ${ip_version}=${iperf3_server_attr}[ip_version]
+| |
+| | Set To Dictionary | ${iperf3_server_attr} | vcl_config | ${vcl_config}
+| | Set To Dictionary | ${iperf3_server_attr} | ld_preload | ${ld_preload}
+| | Set To Dictionary | ${iperf3_server_attr} | transparent_tls
+| | ... | ${transparent_tls}
+| | Set To Dictionary | ${iperf3_server_attr} | ip_version | ${ip_version}
+
+| Set Iperf3 Client Attributes
+| | [Documentation]
+| | ... | Set the HostStack iperf3 test program attributes
+| | ... | in the iperf3_client_attr dictionary.
+| |
+| | ... | *Arguments:*
+| | ... | - ${vcl_config} - VCL configuration file name Type: string
+| | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: bool
+| | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: bool
+| | ... | - ${ip_version} - IP version (4 or 6) Type: int
+| | ... | - ${parallel} - Number of parallel streams Type: int
+| | ... | - ${bytes} - Number of bytes to send Type: string
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Set Iperf3 Client Attributes \| vcl_config=${vcl_config} \|
+| | ... | \| ip_version=${ip_version} \| parallel=${streams} \|
+| |
+| | [Arguments]
+| | ... | ${vcl_config}=${iperf3_client_attr}[vcl_config]
+| | ... | ${ld_preload}=${iperf3_client_attr}[ld_preload]
+| | ... | ${transparent_tls}=${iperf3_client_attr}[transparent_tls]
+| | ... | ${ip_version}=${iperf3_client_attr}[ip_version]
+| | ... | ${parallel}=${iperf3_client_attr}[parallel]
+| | ... | ${bytes}=${iperf3_client_attr}[bytes]
+| |
+| | Set To Dictionary | ${iperf3_client_attr} | vcl_config | ${vcl_config}
+| | Set To Dictionary | ${iperf3_client_attr} | ld_preload | ${ld_preload}
+| | Set To Dictionary | ${iperf3_client_attr} | transparent_tls
+| | ... | ${transparent_tls}
+| | Set To Dictionary | ${iperf3_client_attr} | ip_version | ${ip_version}
+| | Set To Dictionary | ${iperf3_client_attr} | parallel | ${parallel}
+| | Set To Dictionary | ${iperf3_client_attr} | bytes | ${bytes}
+
| Run hoststack test program on DUT
| | [Documentation]
| | ... | Configure IP address on the port, set it up and start the specified
@@ -299,10 +382,10 @@
| | [Documentation]
| | ... | Configure VPP HostStack attributes on all DUTs.
| |
+| | Set Max Rate And Jumbo
| | Add worker threads to all DUTs
| | ... | ${vpp_hoststack_attr}[phy_cores] | ${vpp_hoststack_attr}[rxq]
-| | Add DPDK PCI devices to all DUTs
-| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | Pre-initialize layer driver | ${nic_driver}
| | FOR | ${dut} | IN | @{duts}
| | | Import Library | resources.libraries.python.VppConfigGenerator
| | | ... | WITH NAME | ${dut}
@@ -321,17 +404,17 @@
| | | Run keyword | ${dut}.Add session preallocated sessions
| | | ... | ${vpp_hoststack_attr}[sess_prealloc_sess]
| | | Run keyword | ${dut}.Add session v4 session table buckets
-| | | ... | ${vpp_hoststack_attr}[sess_v4_sess_tbl_buckets]
+| | | ... | ${vpp_hoststack_attr}[sess_v4_tbl_buckets]
| | | Run keyword | ${dut}.Add session v4 session table memory
-| | | ... | ${vpp_hoststack_attr}[sess_v4_sess_tbl_mem]
+| | | ... | ${vpp_hoststack_attr}[sess_v4_tbl_mem]
| | | Run keyword | ${dut}.Add session v4 halfopen table buckets
-| | | ... | ${vpp_hoststack_attr}[sess_v4_sess_halfopen_buckets]
+| | | ... | ${vpp_hoststack_attr}[sess_v4_hopen_buckets]
| | | Run keyword | ${dut}.Add session v4 halfopen table memory
-| | | ... | ${vpp_hoststack_attr}[sess_v4_sess_halfopen_mem]
+| | | ... | ${vpp_hoststack_attr}[sess_v4_hopen_mem]
| | | Run keyword | ${dut}.Add session local endpoints table buckets
-| | | ... | ${vpp_hoststack_attr}[sess_lcl_endpt_tbl_buckets]
+| | | ... | ${vpp_hoststack_attr}[sess_lendpt_buckets]
| | | Run keyword | ${dut}.Add session local endpoints table memory
-| | | ... | ${vpp_hoststack_attr}[sess_lcl_endpt_tbl_mem]
+| | | ... | ${vpp_hoststack_attr}[sess_lendpt_mem]
| | END
| | Apply startup configuration on all VPP DUTs
@@ -370,3 +453,31 @@
| | Set test message | ${server_output} | append=True
| | Run Keyword And Return | No Hoststack Test Program Results
| | ... | ${server_no_results} | ${client_no_results}
+
+| Get Test Results From Hoststack Iperf3 Test
+| | [Documentation]
+| | ... | Configure IP address on the port, set it up and start the specified
+| | ... | HostStack test programs on the DUTs. Gather test program
+| | ... | output and append test results in message.
+| | ... | Return boolean indicating when no results were available from
+| | ... | both the server and client test programs.
+| |
+| | Set To Dictionary | ${iperf3_client_attr} | ip_address
+| | ... | ${dut2_if1_ip4_addr}
+| | Configure VPP Hoststack Attributes on all DUTs
+| | ${iperf3_server}= | Get Iperf3 Command | ${iperf3_server_attr}
+| | ${server_pid}= | Run hoststack test program on DUT
+| | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip4_addr} | ${dut2_if1_ip4_prefix}
+| | ... | ${iperf3_server_attr}[namespace]
+| | ... | ${iperf3_server_attr}[cfg_vpp_feature] | ${iperf3_server}
+| | ${iperf3_client}= | Get Iperf3 Command | ${iperf3_client_attr}
+| | ${client_pid}= | Run hoststack test program on DUT
+| | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4_addr} | ${dut1_if1_ip4_prefix}
+| | ... | ${iperf3_client_attr}[namespace]
+| | ... | ${iperf3_client_attr}[cfg_vpp_feature] | ${iperf3_client}
+| | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
+| | ${client_no_results} | ${client_output}=
+| | ... | Analyze hoststack test program output | ${dut1} | Client
+| | ... | ${vpp_nsim_attr} | ${iperf3_client}
+| | Then Set test message | ${client_output}
+| | Return From Keyword | ${client_no_results}