perf: add TCP Nginx+LDPRELOAD suites
[csit.git] / resources / libraries / robot / hoststack / hoststack.robot
index cdf35f2..30363f9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 | Library | resources.libraries.python.InterfaceUtil
 | Library | resources.libraries.python.IPUtil
 | Library | resources.libraries.python.HoststackUtil
+| Library | resources.libraries.python.NginxUtil
 | Library | resources.libraries.python.NsimUtil
+| Library | resources.tools.ab.ABTools
 | Variables | resources/libraries/python/Constants.py
 | Resource | resources/libraries/robot/ip/ip4.robot
 | Resource | resources/libraries/robot/nsim/nsim.robot
+| Resource | resources/libraries/robot/nginx/default.robot
 |
 | Documentation | L2 keywords to set up VPP to test hoststack.
 
 | ${quic_crypto_engine}= | nocrypto
 | ${quic_fifo_size}= | 4M
 | &{vpp_hoststack_attr}=
-| ... | rxq=${None}
+| ... | rxq=${1}
+| ... | rxd=${256}
+| ... | txd=${256}
 | ... | phy_cores=${1}
 | ... | vpp_api_socket=${SOCKSVR_PATH}
 | ... | api_seg_global_size=2G
 | ... | api_seg_api_size=1G
-| ... | sess_evt_q_seg_size=4G
-| ... | sess_evt_q_length=4000000
-| ... | sess_prealloc_sess=4000000
-| ... | 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
+| ... | tcp_cc_algo=cubic
+| ... | sess_evt_q_seg_size=64M
+| ... | sess_evt_q_length=16384
+| ... | sess_prealloc_sess=1024
+| ... | sess_v4_tbl_buckets=20000
+| ... | sess_v4_tbl_mem=64M
+| ... | sess_v4_hopen_buckets=20000
+| ... | sess_v4_hopen_mem=64M
+| ... | sess_lendpt_buckets=250000
+| ... | sess_lendpt_mem=512M
 | &{vpp_echo_server_attr}=
 | ... | role=server
+| ... | cpu_cnt=${1}
 | ... | cfg_vpp_feature=${None}
 | ... | namespace=default
 | ... | vpp_api_socket=${vpp_hoststack_attr}[vpp_api_socket]
@@ -49,6 +56,8 @@
 | ... | uri_protocol=quic
 | ... | uri_ip4_addr=${EMPTY}
 | ... | uri_port=1234
+| ... | nthreads=1
+| ... | mq_size=${vpp_hoststack_attr}[sess_evt_q_length]
 | ... | nclients=1
 | ... | quic_streams=1
 | ... | time=sconnect:lastbyte
@@ -59,6 +68,7 @@
 | ... | tx_results_diff=${False}
 | &{vpp_echo_client_attr}=
 | ... | role=client
+| ... | cpu_cnt=${1}
 | ... | cfg_vpp_feature=${None}
 | ... | namespace=default
 | ... | vpp_api_socket=${vpp_hoststack_attr}[vpp_api_socket]
@@ -66,6 +76,8 @@
 | ... | uri_protocol=quic
 | ... | uri_ip4_addr=${EMPTY}
 | ... | uri_port=1234
+| ... | nthreads=1
+| ... | mq_size=${vpp_hoststack_attr}[sess_evt_q_length]
 | ... | nclients=1
 | ... | quic_streams=1
 | ... | time=sconnect:lastbyte
 | ... | tx_results_diff=${False}
 | &{iperf3_server_attr}=
 | ... | role=server
+| ... | cpu_cnt=${1}
 | ... | cfg_vpp_feature=${Empty}
 | ... | namespace=default
 | ... | vcl_config=vcl_iperf3.conf
 | ... | ld_preload=${True}
 | ... | transparent_tls=${False}
-| ... | json=${False}
+| ... | json=${True}
 | ... | ip_version=${4}
 | &{iperf3_client_attr}=
 | ... | role=client
+| ... | cpu_cnt=${1}
 | ... | cfg_vpp_feature=${Empty}
 | ... | namespace=default
 | ... | vcl_config=vcl_iperf3.conf
 | ... | ld_preload=${True}
 | ... | transparent_tls=${False}
-| ... | json=${False}
+| ... | json=${True}
 | ... | ip_version=${4}
 | ... | ip_address=${EMPTY}
 | ... | parallel=${1}
-| ... | bytes=1G
+| ... | time=${20}
+| &{nginx_server_attr}=
+| ... | role=server
+| ... | cpu_cnt=${1}
+| ... | cfg_vpp_feature=${Empty}
+| ... | namespace=default
+| ... | vcl_config=vcl_iperf3.conf
+| ... | ld_preload=${True}
+| ... | transparent_tls=${False}
+| ... | json=${True}
+| ... | ip_version=${4}
 
 *** Keywords ***
 | Set VPP Hoststack Attributes
 | | ... | Set the VPP HostStack attributes in the vpp_hoststack_attr dictionary.
 | |
 | | ... | *Arguments:*
-| | ... | - ${rxq} - Type: int
+| | ... | - ${rxq} - Number of Rx Queues Type: int
+| | ... | - ${rxd} - Number of Rx Descriptors Type: int
+| | ... | - ${txd} - Number of Tx Descriptors Type: int
 | | ... | - ${phy_cores} - Number of cores for workers Type: int
 | | ... | - ${vpp_api_socket} - Path to VPP api socket file Type: string
 | | ... | - ${api_seg_global_size} - Global API segment size Type: string
 | | ... | - ${api_seg_api_size} - API segment API fifo size Type: string
+| | ... | - ${tcp_cc_algo} - TCP congestion control algorithm Type: string
 | | ... | - ${sess_evt_q_seg_size} - Session event queue segment size
 | | ... | Type: string
 | | ... | - ${sess_evt_q_length} - Session event queue length Type: string
 | |
 | | [Arguments]
 | | ... | ${rxq}=${vpp_hoststack_attr}[rxq]
+| | ... | ${rxd}=${vpp_hoststack_attr}[rxd]
+| | ... | ${txd}=${vpp_hoststack_attr}[txd]
 | | ... | ${phy_cores}=${vpp_hoststack_attr}[phy_cores]
 | | ... | ${vpp_api_socket}=${vpp_hoststack_attr}[vpp_api_socket]
 | | ... | ${api_seg_global_size}=${vpp_hoststack_attr}[api_seg_global_size]
 | | ... | ${api_seg_api_size}=${vpp_hoststack_attr}[api_seg_api_size]
+| | ... | ${tcp_cc_algo}=${vpp_hoststack_attr}[tcp_cc_algo]
 | | ... | ${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_lendpt_mem}=${vpp_hoststack_attr}[sess_lendpt_mem]
 | |
 | | Set To Dictionary | ${vpp_hoststack_attr} | rxq | ${rxq}
+| | Set To Dictionary | ${vpp_hoststack_attr} | rxd | ${rxd}
+| | Set To Dictionary | ${vpp_hoststack_attr} | txd | ${txd}
 | | Set To Dictionary | ${vpp_hoststack_attr} | phy_cores | ${phy_cores}
 | | Set To Dictionary | ${vpp_hoststack_attr}
 | | ... | vpp_api_socket | ${vpp_api_socket}
 | | Set To Dictionary | ${vpp_hoststack_attr}
 | | ... | api_seg_api_size | ${api_seg_api_size}
 | | Set To Dictionary | ${vpp_hoststack_attr}
+| | ... | tcp_cc_algo | ${tcp_cc_algo}
+| | Set To Dictionary | ${vpp_hoststack_attr}
 | | ... | sess_evt_q_seg_size | ${sess_evt_q_seg_size}
 | | Set To Dictionary | ${vpp_hoststack_attr}
 | | ... | sess_evt_q_length | ${sess_evt_q_length}
 | | ... | *Arguments:*
 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
 | | ... | - ${namespace} - Namespace Type: string
+| | ... | - ${nthreads} - Number of threads Type: string
+| | ... | - ${mq_size} - Number of threads Type: string
 | | ... | - ${nclients} - Number of clients Type: string
 | | ... | - ${quic_streams} - Number of quic streams Type: string
 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
 | | [Arguments]
 | | ... | ${cfg_vpp_feature}=${vpp_echo_server_attr}[cfg_vpp_feature]
 | | ... | ${namespace}=${vpp_echo_server_attr}[namespace]
+| | ... | ${nthreads}=${vpp_echo_server_attr}[nthreads]
+| | ... | ${mq_size}=${vpp_echo_server_attr}[mq_size]
 | | ... | ${nclients}=${vpp_echo_server_attr}[nclients]
 | | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
 | | ... | ${time}=${vpp_echo_server_attr}[time]
 | | Set To Dictionary | ${vpp_echo_server_attr} | cfg_vpp_feature
 | | ... | ${cfg_vpp_feature}
 | | Set To Dictionary | ${vpp_echo_server_attr} | namespace | ${namespace}
+| | Set To Dictionary | ${vpp_echo_server_attr} | nthreads | ${nthreads}
+| | Set To Dictionary | ${vpp_echo_server_attr} | mq_size | ${mq_size}
 | | Set To Dictionary | ${vpp_echo_server_attr} | nclients | ${nclients}
 | | Set To Dictionary | ${vpp_echo_server_attr} | quic_streams | ${quic_streams}
 | | Set To Dictionary | ${vpp_echo_server_attr} | time | ${time}
 | | ... | *Arguments:*
 | | ... | - ${cfg_vpp_feature} - VPP Feature requiring config Type: string
 | | ... | - ${namespace} - Namespace Type: string
+| | ... | - ${nthreads} - Number of threads Type: string
+| | ... | - ${mq_size} - Number of threads Type: string
 | | ... | - ${nclients} - Number of clients Type: string
+| | ... | - ${quic_streams} - Number of quic streams Type: string
 | | ... | - ${fifo_size} - Session Fifo Size Type: integer
 | | ... | - ${time} - Timing events (start:end) Type: string
 | | ... | - ${rx_bytes} - Number of Bytes to receive Type: string
 | | [Arguments]
 | | ... | ${cfg_vpp_feature}=${vpp_echo_client_attr}[cfg_vpp_feature]
 | | ... | ${namespace}=${vpp_echo_client_attr}[namespace]
+| | ... | ${nthreads}=${vpp_echo_client_attr}[nthreads]
+| | ... | ${mq_size}=${vpp_echo_client_attr}[mq_size]
 | | ... | ${nclients}=${vpp_echo_client_attr}[nclients]
-| | ... | ${quic_streams}=${vpp_echo_server_attr}[quic_streams]
+| | ... | ${quic_streams}=${vpp_echo_client_attr}[quic_streams]
 | | ... | ${time}=${vpp_echo_client_attr}[time]
 | | ... | ${fifo_size}=${vpp_echo_client_attr}[fifo_size]
 | | ... | ${rx_bytes}=${vpp_echo_client_attr}[rx_bytes]
 | | Set To Dictionary | ${vpp_echo_client_attr} | cfg_vpp_feature
 | | ... | ${cfg_vpp_feature}
 | | Set To Dictionary | ${vpp_echo_client_attr} | namespace | ${namespace}
+| | Set To Dictionary | ${vpp_echo_client_attr} | nthreads | ${nthreads}
+| | Set To Dictionary | ${vpp_echo_client_attr} | mq_size | ${mq_size}
 | | Set To Dictionary | ${vpp_echo_client_attr} | nclients | ${nclients}
 | | Set To Dictionary | ${vpp_echo_client_attr} | quic_streams | ${quic_streams}
 | | Set To Dictionary | ${vpp_echo_client_attr} | time | ${time}
 | |
 | | ... | *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
+| | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: boolean
+| | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: boolean
 | | ... | - ${ip_version} - IP version (4 or 6) Type: int
 | |
 | | ... | *Example:*
 | |
 | | ... | *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
+| | ... | - ${ld_preload} - Use the VCL LD_PRELOAD library Type: boolean
+| | ... | - ${transparent_tls} - Use VCL Transparent-TLS mode Type: boolean
 | | ... | - ${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:*
 | |
 | | ... | ${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}
 | | ... | ${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]
 | | ... | - ${namespace} - Network namespace to run test program in Type: string
 | | ... | - ${cfg_vpp_feature} - VPP hoststack feature requiring
 | | ... | additional VPP configuration Type: string
+| | ... | - ${core_list} - Cpu core affinity list Type: string
 | | ... | - ${test_program} - Host Stack test program Type: dict
 | |
 | | ... | *Example:*
 | | ... | \| quic \| ${vpp_echo_server} \|
 | |
 | | [Arguments] | ${node} | ${intf} | ${ip4_addr} | ${ip4_mask}
-| | | ... | ${namespace} | ${cfg_vpp_feature} | ${test_program}
+| | | ... | ${namespace} | ${core_list} | ${cfg_vpp_feature}
+| | | ... | ${test_program}
 | |
-| | Run Keyword If | ${vpp_nsim_attr}[output_feature_enable]
+| | ${is_dut1}= | Run Keyword And Return Status
+| | ... | Dictionaries should be equal | ${node} | ${dut1}
+| | Run Keyword If
+| | ... | ${is_dut1} and ${vpp_nsim_attr}[output_nsim_enable]
 | | ... | Configure VPP NSIM | ${node} | ${vpp_nsim_attr} | ${intf}
 | | Run Keyword If | '${cfg_vpp_feature}' != ''
 | | ... | Additional VPP Config for Feature ${cfg_vpp_feature} | ${node}
 | | ... | ${ip4_mask}
 | | Vpp Node Interfaces Ready Wait | ${node}
 | | ${hoststack_test_program_pid}= | Start Hoststack Test Program
-| | ... | ${node} | ${namespace} | ${test_program}
+| | ... | ${node} | ${namespace} | ${core_list} | ${test_program}
 | | Return From Keyword | ${hoststack_test_program_pid}
 
 | Additional VPP Config For Feature quic
 | | Set Max Rate And Jumbo
 | | Add worker threads to all DUTs
 | | ... | ${vpp_hoststack_attr}[phy_cores] | ${vpp_hoststack_attr}[rxq]
+| | ... | ${vpp_hoststack_attr}[rxd] | ${vpp_hoststack_attr}[txd]
 | | Pre-initialize layer driver | ${nic_driver}
 | | FOR | ${dut} | IN | @{duts}
 | | | Import Library | resources.libraries.python.VppConfigGenerator
 | | | ... | ${vpp_hoststack_attr}[api_seg_global_size]
 | | | Run keyword | ${dut}.Add api segment api size
 | | | ... | ${vpp_hoststack_attr}[api_seg_api_size]
+| | | Run Keyword If
+| | | ... | '${dut}' == 'DUT1' and ${vpp_nsim_attr}[output_nsim_enable]
+| | | ... | ${dut}.Add Nsim poll main thread
 | | | Run keyword | ${dut}.Add api segment gid | testuser
+| | | Run keyword | ${dut}.Add tcp congestion control algorithm
+| | | ... | ${vpp_hoststack_attr}[tcp_cc_algo]
 | | | Run keyword | ${dut}.Add session enable
 | | | Run keyword | ${dut}.Add session event queues memfd segment
 | | | Run keyword | ${dut}.Add session event queues segment size
 | | [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.
+| | ... | output and append JSON formatted test data in message.
+| | ... | Return boolean indicating there was a defered failure of either the
+| | ... | server and/or client test programs.
 | |
 | | Set To Dictionary | ${vpp_echo_server_attr} | uri_ip4_addr
 | | ... | ${dut2_if1_ip4_addr}
 | | ... | ${dut2_if1_ip4_addr}
 | | Configure VPP Hoststack Attributes on all DUTs
 | | ${vpp_echo_server}= | Get VPP Echo Command | ${vpp_echo_server_attr}
+| | ${skip_cnt}= | Evaluate
+| | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
+| | ${numa}= | Get interfaces numa node | ${dut2} | ${dut2_if1}
+| | ${core_list}= | Cpu list per node str | ${dut2} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${vpp_echo_server_attr}[cpu_cnt]
 | | ${server_pid}= | Run hoststack test program on DUT
 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip4_addr} | ${dut2_if1_ip4_prefix}
-| | ... | ${vpp_echo_server_attr}[namespace]
+| | ... | ${vpp_echo_server_attr}[namespace] | ${core_list}
 | | ... | ${vpp_echo_server_attr}[cfg_vpp_feature] | ${vpp_echo_server}
 | | ${vpp_echo_client}= | Get VPP Echo Command | ${vpp_echo_client_attr}
+| | ${numa}= | Get interfaces numa node | ${dut1} | ${dut1_if1}
+| | ${core_list}= | Cpu list per node str | ${dut1} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${vpp_echo_client_attr}[cpu_cnt]
 | | ${client_pid}= | Run hoststack test program on DUT
 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4_addr} | ${dut1_if1_ip4_prefix}
-| | ... | ${vpp_echo_client_attr}[namespace]
+| | ... | ${vpp_echo_client_attr}[namespace] | ${core_list}
 | | ... | ${vpp_echo_client_attr}[cfg_vpp_feature] | ${vpp_echo_client}
 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
-| | ${client_no_results} | ${client_output}=
+| | ${client_defer_fail} | ${client_output}=
 | | ... | Analyze hoststack test program output | ${dut1} | Client
 | | ... | ${vpp_nsim_attr} | ${vpp_echo_client}
 | | Then Set test message | ${client_output}
 | | And Hoststack Test Program Finished | ${dut2} | ${server_pid}
-| | ${server_no_results} | ${server_output}=
+| | ${server_defer_fail} | ${server_output}=
 | | ... | Analyze hoststack test program output | ${dut2} | Server
 | | ... | ${vpp_nsim_attr} | ${vpp_echo_server}
 | | Set test message | ${server_output} | append=True
-| | Run Keyword And Return | No Hoststack Test Program Results
-| | ... | ${server_no_results} | ${client_no_results}
+| | Run Keyword And Return | Hoststack Test Program Defer Fail
+| | ... | ${server_defer_fail} | ${client_defer_fail}
 
 | 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.
+| | ... | output and append JSON formatted test data in message.
+| | ... | Return boolean indicating there was a defered failure of either the
+| | ... | server and/or 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}
+| | ${skip_cnt}= | Evaluate
+| | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
+| | ${numa}= | Get interfaces numa node | ${dut2} | ${dut2_if1}
+| | ${core_list}= | Cpu list per node str | ${dut2} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${iperf3_server_attr}[cpu_cnt]
 | | ${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}[namespace] | ${core_list}
 | | ... | ${iperf3_server_attr}[cfg_vpp_feature] | ${iperf3_server}
 | | ${iperf3_client}= | Get Iperf3 Command | ${iperf3_client_attr}
+| | ${numa}= | Get interfaces numa node | ${dut1} | ${dut1_if1}
+| | ${core_list}= | Cpu list per node str | ${dut1} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${iperf3_client_attr}[cpu_cnt]
 | | ${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}[namespace] | ${core_list}
 | | ... | ${iperf3_client_attr}[cfg_vpp_feature] | ${iperf3_client}
 | | When Hoststack Test Program Finished | ${dut1} | ${client_pid}
-| | ${client_no_results} | ${client_output}=
+| | ${client_defer_fail} | ${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}
+| | Return From Keyword | ${client_defer_fail}
+
+| Set up LDP or VCL Nginx on DUT node
+| | [Documentation]
+| | ... | Setup for suites which uses VCL or LDP Nginx on DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node.
+| | ... | Type: string
+| | ... | - mode - VCL Nginx or LDP Nginx.
+| | ... | Type: string
+| | ... | - rps_cps - Test request or connect.
+| | ... | Type: string
+| | ... | - core_num - Nginx work processes number.
+| | ... | Type: int
+| | ... | - qat - Whether to use the qat engine.
+| | ... | Type: string
+| | ... | - tls_tcp - TLS or TCP.
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Set up LDP or VCL NGINX on DUT node \| ${dut} |${mode}\
+| | ... | \| ${rps_cps} \| ${phy_cores} \| ${qat} \| ${tls_tcp} \|
+| |
+| | [Arguments] | ${dut} | ${mode} | ${rps_cps} | ${phy_cores} | ${qat}
+| | ... | ${tls_tcp}
+| |
+| | Set Interface State | ${dut} | ${DUT1_${int}1}[0] | up
+| | VPP Interface Set IP Address | ${dut} | ${DUT1_${int}1}[0]
+| | ... | ${dut_ip_addrs}[0] | ${dut_ip_prefix}
+| | Vpp Node Interfaces Ready Wait | ${dut}
+| | ${skip_cnt}= | Evaluate
+| | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
+| | ${numa}= | Get interfaces numa node | ${dut} | ${DUT1_${int}1}[0]
+| | Apply Nginx configuration on DUT | ${dut} | ${phy_cores}
+| | Set To Dictionary | ${nginx_server_attr} | ip_address
+| | ... | ${dut_ip_addrs}[0]
+| | ${core_list}= | Cpu list per node str | ${dut} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${nginx_server_attr}[cpu_cnt]
+| | ${cpu_idle_list}= | Get cpu idle list | ${dut} | ${numa}
+| | ... | ${smt_used} | ${cpu_alloc_str}
+| | ${nginx_server}= | Get Nginx Command | ${nginx_server_attr}
+| | ... | ${nginx_version} | ${packages_dir}
+| | ${server_pid}= | Start Hoststack Test Program
+| | ... | ${dut} | ${nginx_server_attr}[namespace] | ${core_list}
+| | ... | ${nginx_server}
+| | Taskset Nginx PID to idle cores | ${dut} | ${cpu_idle_list}
+
+| Measure TLS requests or connections per second
+| | [Documentation]
+| | ... | Measure number of requests or connections per second using ab.
+| |
+| | ... | *Arguments:*
+| | ... | - ${ciphers} - Specify SSL/TLS cipher suite
+| | ... | - ${files} - Filename to be requested from the servers
+| | ... | - ${tls_tcp} - Test TLS or TCP.
+| | ... | - ${mode} - VCL Nginx or LDP Nginx.
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Measure TLS requests or connections per second
+| | ... | \| AES128-SHA \| 64 \| tls \| rps \|
+| |
+| | [Arguments] | ${ciphers} | ${files} | ${tls_tcp} | ${mode}
+| |
+| | ${output}= | Run ab | ${tg} | ${dut_ip_addrs}[0] | ${ab_ip_addrs}[0]
+| | ... | ${tls_tcp} | ${ciphers} | ${files} | ${mode} | ${r_total} | ${c_total}
+| | ... | ${listen_port}
+| | Set test message | ${output}
+| | Log VPP Hoststack data | ${dut1}