aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-02-18 14:52:31 +0000
committerPeter Mikus <pmikus@cisco.com>2021-02-19 09:47:39 +0000
commit8fceab4dace23668c03adf1abacbdb9241bf9ac1 (patch)
treed0009f8b80b834c2c476128f965a468c2e09ee38
parentabf609695626d55336038b8ffc5ba164a1f16dd8 (diff)
Framework: GSO test
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I874568aebbe50c38e634438eb1201ca737bd18ad (cherry picked from commit ecfe59f83a49e0dda9cead06b81339e4ea545053)
-rw-r--r--resources/libraries/python/CpuUtils.py2
-rw-r--r--resources/libraries/robot/shared/default.robot69
-rw-r--r--tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-gso-iperf3.robot2
-rw-r--r--tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-iperf3.robot2
-rw-r--r--tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-gso-iperf3.robot2
-rw-r--r--tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-iperf3.robot2
6 files changed, 74 insertions, 5 deletions
diff --git a/resources/libraries/python/CpuUtils.py b/resources/libraries/python/CpuUtils.py
index f261f9421e..70177f5d9a 100644
--- a/resources/libraries/python/CpuUtils.py
+++ b/resources/libraries/python/CpuUtils.py
@@ -445,4 +445,4 @@ class CpuUtils:
return CpuUtils.cpu_slice_of_list_per_node(
node, cpu_node=cpu_node, skip_cnt=skip_cnt, cpu_cnt=cpu_cnt,
- smt_used=smt_used)
+ smt_used=False)
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 853f567cf6..1364c16f79 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -252,6 +252,75 @@
| | Set Test Variable | ${txd_count_int}
| | Set Test Variable | ${rxq_count_int}
+| Add worker threads for GSO tests to all DUTs
+| | [Documentation] | Setup worker threads in vpp startup configuration on all
+| | ... | DUTs. Based on the SMT configuration of DUT if enabled keyword will
+| | ... | automatically map also the sibling logical cores.
+| | ... | Keyword will automatically set the appropriate test TAGs in format
+| | ... | mTnC, where m=logical_core_count and n=physical_core_count.
+| | ... | RXQ are computed automatically by dividing thread count with number 2
+| | ... | (TODO: Add division by actual number of interfaces). User can manually
+| | ... | override RX, RXD, TXD parameters if needed.
+| |
+| | ... | *Arguments:*
+| | ... | - phy_cores - Number of physical cores to use. Type: integer
+| | ... | - rx_queues - Number of RX queues. Type: integer
+| | ... | - rxd - Number of RX descriptors. Type: integer
+| | ... | - txd - Number of TX descriptors. Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Add worker threads for GSO tests to all DUTs \| ${1} \| ${1} \|
+| |
+| | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${rxd}=${None}
+| | ... | ${txd}=${None}
+| |
+| | ${cpu_count_int} | Convert to Integer | ${phy_cores}
+| | ${thr_count_int} | Convert to Integer | ${phy_cores}
+| | ${rxd_count_int}= | Set variable | ${rxd}
+| | ${txd_count_int}= | Set variable | ${txd}
+| | FOR | ${dut} | IN | @{duts}
+| | | ${numa}= | Get interfaces numa node
+| | | ... | ${nodes['${dut}']} | @{${dut}_pf_keys}
+| | | ${smt_used}= | Set variable | ${False}
+| | | ${skip_cnt}= | Set variable | ${CPU_CNT_SYSTEM}
+| | | ${cpu_main}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
+| | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${CPU_CNT_MAIN}
+| | | ${skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN}
+| | | ${cpu_wt}= | Run Keyword If | ${cpu_count_int} > 0 |
+| | | ... | Cpu list per node str | ${nodes['${dut}']} | ${numa}
+| | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${cpu_count_int}
+| | | ... | smt_used=${smt_used}
+| | | ${thr_count_int}= | Run Keyword If | ${smt_used}
+| | | ... | Evaluate | int(${cpu_count_int}*2)
+| | | ... | ELSE | Set variable | ${thr_count_int}
+| | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${2}
+| | | ${rxq_count_int}= | Run Keyword If | ${rx_queues}
+| | | ... | Set variable | ${rx_queues}
+| | | ... | ELSE | Evaluate | int(${thr_count_int}/${rxq_ratio})
+| | | ${rxq_count_int}= | Run Keyword If | ${rxq_count_int} == 0
+| | | ... | Set variable | ${1}
+| | | ... | ELSE | Set variable | ${rxq_count_int}
+| | | Run Keyword | ${dut}.Add CPU Main Core | ${cpu_main}
+| | | Run Keyword If | ${cpu_count_int} > 0
+| | | ... | ${dut}.Add CPU Corelist Workers | ${cpu_wt}
+| | | Run Keyword If | ${smt_used}
+| | | ... | Run Keyword | ${dut}.Add Buffers Per Numa | ${215040} | ELSE
+| | | ... | Run Keyword | ${dut}.Add Buffers Per Numa | ${107520}
+| | | Run Keyword If | ${thr_count_int} > 1
+| | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD
+| | | Set Tags | ${thr_count_int}T${cpu_count_int}C
+| | END
+| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_main}
+| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt}
+| | Set Test Variable | ${smt_used}
+| | Set Test Variable | ${cpu_alloc_str}
+| | Set Test Variable | ${cpu_count_int}
+| | Set Test Variable | ${thr_count_int}
+| | Set Test Variable | ${rxd_count_int}
+| | Set Test Variable | ${txd_count_int}
+| | Set Test Variable | ${rxq_count_int}
+
| Add DPDK VLAN strip offload switch off between DUTs
| | [Documentation]
| | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
diff --git a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-gso-iperf3.robot b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-gso-iperf3.robot
index 91141ce1fa..1cbb7f8b3f 100644
--- a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-gso-iperf3.robot
+++ b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-gso-iperf3.robot
@@ -86,7 +86,7 @@
| | Set Test Variable | \${rxq_ratio} | ${1}
| |
| | Given Set Jumbo
-| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
+| | And Add worker threads for GSO tests to all DUTs | ${phy_cores} | ${rxq}
| | And Pre-initialize layer driver | ${nic_driver}
| | And Apply startup configuration on all VPP DUTs
| | When Initialize layer driver | ${nic_driver}
diff --git a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-iperf3.robot b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-iperf3.robot
index 31ece186ec..d5ba8389c3 100644
--- a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-iperf3.robot
+++ b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2tap-iperf3.robot
@@ -86,7 +86,7 @@
| | Set Test Variable | \${rxq_ratio} | ${1}
| |
| | Given Set Jumbo
-| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
+| | And Add worker threads for GSO tests to all DUTs | ${phy_cores} | ${rxq}
| | And Pre-initialize layer driver | ${nic_driver}
| | And Apply startup configuration on all VPP DUTs
| | When Initialize layer driver | ${nic_driver}
diff --git a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-gso-iperf3.robot b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-gso-iperf3.robot
index 849504050d..deb3fef0b9 100644
--- a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-gso-iperf3.robot
+++ b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-gso-iperf3.robot
@@ -90,7 +90,7 @@
| | Set Test Variable | \${rxq_ratio} | ${1}
| |
| | Given Set Jumbo
-| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
+| | And Add worker threads for GSO tests to all DUTs | ${phy_cores} | ${rxq}
| | And Pre-initialize layer driver | ${nic_driver}
| | And Apply startup configuration on all VPP DUTs
| | When Initialize layer driver | ${nic_driver} | validate=${False}
diff --git a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-iperf3.robot b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-iperf3.robot
index c31097eb7c..9bd28c559f 100644
--- a/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-iperf3.robot
+++ b/tests/vpp/perf/gso/2n1l-10ge2p1x710-ethip4-ip4base-2vhost-iperf3.robot
@@ -90,7 +90,7 @@
| | Set Test Variable | \${rxq_ratio} | ${1}
| |
| | Given Set Jumbo
-| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
+| | And Add worker threads for GSO tests to all DUTs | ${phy_cores} | ${rxq}
| | And Pre-initialize layer driver | ${nic_driver}
| | And Apply startup configuration on all VPP DUTs
| | When Initialize layer driver | ${nic_driver} | validate=${False}