+| | Return From Keyword | ${client_defer_fail}
+
+| Set up LDP or VCL Nginx on DUT1 node
+| | [Documentation]
+| | ... | Setup for suites which uses VCL or LDP Nginx on DUT1.
+| |
+| | ... | Currently hardcoded to work on DUT1, assuming its node dict
+| | ... | and similar values like \${DUT1_cpu_alloc_str} are already defined.
+| |
+| | ... | *Arguments:*
+| | ... | - mode - VCL Nginx or LDP Nginx. Type: string
+| | ... | - rps_cps - Test rps or cps. Type: string
+| | ... | - core_num - Nginx work processes number. Type: int
+| | ... | - qat - Whether to use the qat engine. Type: string
+| | ... | - tls_tcp - TLS or TCP. Type: string
+| | ... | - use_dma - Whether to use DMA, Default: False. Type: bool
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Set up LDP or VCL NGINX on DUT1 node \| ${mode}\
+| | ... | \| ${rps_cps} \| ${phy_cores} \| ${qat} \| ${tls_tcp} \|
+| |
+| | [Arguments] | ${mode} | ${rps_cps} | ${phy_cores} | ${qat} | ${tls_tcp}
+| | | ... | ${use_dma}=${False}
+| |
+| | Set Interface State | ${DUT1} | ${DUT1_${int}1}[0] | up
+| | VPP Interface Set IP Address | ${DUT1} | ${DUT1_${int}1}[0]
+| | ... | ${dut_ip_addrs}[0] | ${dut_ip_prefix}
+| | Vpp Node Interfaces Ready Wait | ${DUT1}
+| | ${skip_cnt}= | Evaluate
+| | ... | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${vpp_hoststack_attr}[phy_cores]
+| | ${numa}= | Get interfaces numa node | ${DUT1} | ${DUT1_${int}1}[0]
+| | Apply Nginx configuration on DUT | ${DUT1} | ${phy_cores}
+| | ${attr}= | Run Keyword If | ${use_dma} == ${True}
+| | ... | Set Variable | ${nginx_server_with_dma_attr}
+| | ... | ELSE | Set Variable | ${nginx_server_attr}
+| | Set To Dictionary | ${attr} | ip_address
+| | ... | ${dut_ip_addrs}[0]
+| | ${core_list}= | Cpu list per node str | ${DUT1} | ${numa}
+| | ... | skip_cnt=${skip_cnt} | cpu_cnt=${attr}[cpu_cnt]
+| | ... | smt_used=${smt_used}
+| | ${cpu_idle}= | Cpu List per node | ${DUT1} | ${numa}
+| | ${cpu_idle_list}= | Get Slice From List | ${cpu_idle}
+| | ... | ${${skip_cnt} + ${attr}[cpu_cnt]}
+| | ${nginx_server}= | Get Nginx Command | ${attr}
+| | ... | ${nginx_version} | ${packages_dir}
+| | Start Hoststack Test Program
+| | ... | ${DUT1} | ${attr}[namespace] | ${core_list}
+| | ... | ${nginx_server}
+| | Get Hoststack Test Program Logs | ${DUT1} | ${nginx_server}
+| | Taskset Nginx PID to idle cores | ${DUT1} | ${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}
+| |
+| | ${dut_ip_addrs_str} | Evaluate | ','.join(${dut_ip_addrs})
+| | ${ad_ip_addrs_str} | Evaluate | ','.join(${ab_ip_addrs})
+| | FOR | ${action} | IN | @{stat_pre_trial}
+| | | Run Keyword | Additional Statistics Action For ${action}
+| | END
+| | ${output}= | Run ab | ${tg} | ${dut_ip_addrs_str} | ${ad_ip_addrs_str}
+| | ... | ${tls_tcp} | ${ciphers} | ${files} | ${mode} | ${r_total} | ${c_total}
+| | ... | ${listen_port}
+| | FOR | ${action} | IN | @{stat_post_trial}
+| | | Run Keyword | Additional Statistics Action For ${action}
+| | END
+| | Set test message | ${output}
+
+| Configure VPP startup configuration for NGINX
+| | [Documentation]
+| | ... | COnfigure VPP startup configuration for NGINX related tests
+| |
+| | [Arguments] | ${sess_prealloc_sess} | ${sess_evt_q_length}
+| | ... | ${v4_sess_tbl_buckets} | ${v4_sess_tbl_mem} | ${local_endpts_tbl_buckets}
+| | ... | ${local_endpts_tbl_mem} | ${tcp_prealloc_conns} | ${tcp_prealloc_ho_conns}
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Import Library | resources.libraries.python.VppConfigGenerator
+| | | ... | WITH NAME | ${dut}
+| | | Run keyword | ${dut}.Add session enable
+| | | Run keyword | ${dut}.Add session app socket api
+| | | Run keyword | ${dut}.Add session preallocated sessions
+| | | ... | ${sess_prealloc_sess}
+| | | Run keyword | ${dut}.Add session event queue length
+| | | ... | ${sess_evt_q_length}
+| | | Run keyword | ${dut}.Add session v4 session table buckets
+| | | ... | ${v4_sess_tbl_buckets}
+| | | Run keyword | ${dut}.Add session v4 session table memory
+| | | ... | ${v4_sess_tbl_mem}
+| | | Run keyword | ${dut}.Add session local endpoints table buckets
+| | | ... | ${local_endpts_tbl_buckets}
+| | | Run keyword | ${dut}.Add session local endpoints table memory
+| | | ... | ${local_endpts_tbl_mem}
+| | | Run keyword | ${dut}.Add tcp preallocated connections
+| | | ... | ${tcp_prealloc_conns}
+| | | Run keyword | ${dut}.Add tcp preallocated half open connections
+| | | ... | ${tcp_prealloc_ho_conns}
+| | END
+
+| Add Additional Startup Configuration For DMA On All DUTs
+| | [Documentation]
+| | ... | Add additional startup configuration for DMA on all DUTs
+| |
+| | [Arguments] | ${use_dma}=${True}
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Import Library | resources.libraries.python.VppConfigGenerator
+| | | ... | WITH NAME | ${dut}
+| | | Run keyword | ${dut}.Add Session Event Queues Memfd Segment
+| | | Run keyword | ${dut}.Add TCP Congestion Control Algorithm
+| | | Run keyword | ${dut}.Add TCP Tso
+| | | Run keyword | ${dut}.Add Session Enable
+| | | Run keyword If | ${use_dma} == ${True}
+| | | ... | ${dut}.Add Session Use Dma
+| | | Run keyword If | ${use_dma} == ${True}
+| | | ... | Enable DMA WQs on all DUTs
+| | | Run keyword If | ${use_dma} == ${True}
+| | | ... | ${dut}.Add DMA Dev | ${${dut}_dma_wqs}
+| | | Run keyword If | '${nic_driver}' == 'vfio-pci'
+| | | ... | ${dut}.Add DPDK Dev Default Tso
+| | | Run keyword If | '${nic_driver}' == 'vfio-pci'
+| | | ... | ${dut}.Add DPDK Enable Tcp Udp Checksum
+| | END