diff options
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r-- | resources/libraries/robot/crypto/ipsec.robot | 40 | ||||
-rw-r--r-- | resources/libraries/robot/dpdk/default.robot | 28 | ||||
-rw-r--r-- | resources/libraries/robot/ip/nat.robot | 2 | ||||
-rw-r--r-- | resources/libraries/robot/performance/performance_utils.robot | 2 | ||||
-rw-r--r-- | resources/libraries/robot/shared/container.robot | 8 | ||||
-rw-r--r-- | resources/libraries/robot/shared/default.robot | 152 | ||||
-rw-r--r-- | resources/libraries/robot/shared/interfaces.robot | 2 |
7 files changed, 47 insertions, 187 deletions
diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot index dc1265f434..b847667026 100644 --- a/resources/libraries/robot/crypto/ipsec.robot +++ b/resources/libraries/robot/crypto/ipsec.robot @@ -232,40 +232,14 @@ | | | VPP Ipsec Set Async Mode | ${nodes['${dut}']} | | END -| Disable Crypto Work of VPP Worker Threads on all VPP DUTs +| Set Data Plane And Feature Plane Workers for IPsec on all VPP DUTs | | [Documentation] | | ... | Disable crypto work for specified data plane CPU cores -| | ... | on all DUT nodes. -| | ... | Currently only "port" (physical) interfaces are supported. -| | ... | Will need a redesign if virtual interfaces (memif, vhost-user) -| | ... | are present. -| | -| | ... | *Arguments:* -| | ... | - dp_cores - Number of physical cores. Type: integer -| | -| | [Arguments] | ${dp_cores} +| | ... | on all DUT nodes (leaving feature plane workers enabled). +| | ... | Set Round Robin interface RX placement on data plane CPU cores +| | ... | on all DUT nodes (leaving feature plane workers disabled). | | | | VPP Round Robin Rx Placement on all DUTs -| | ... | ${nodes} | prefix=port | dp_core_limit=${dp_cores} -| | FOR | ${dut} | IN | @{duts} -| | | Disable Crypto Work of VPP Worker Threads on node -| | | ... | ${dut} | ${dp_cores} -| | END - -| Disable Crypto Work of VPP Worker Threads on node -| | [Documentation] -| | ... | Disable crypto work for specified data plane cores -| | ... | on DUT node. -| | -| | ... | *Arguments:* -| | ... | - dut - DUT node. Type: string -| | ... | - dp_cores - Number of physical cores. Type: integer -| | -| | [Arguments] | ${dut} | ${dp_cores} -| | -| | # Workers From Physical Cores keyword is currently defined in default.robot -| | ${dp_worker_count} = | Workers From Physical Cores | ${dp_cores} -| | FOR | ${worker_index} | IN RANGE | ${dp_worker_count} -| | | VPP IPSec Crypto SW Scheduler Set Worker -| | | ... | ${nodes['${dut}']} | ${worker_index} | crypto_enable=${False} -| | END +| | ... | ${nodes} | prefix=${EMPTY} | workers=${cpu_dp} +| | VPP IPSec Crypto SW Scheduler Set Worker on all DUTs +| | ... | ${nodes} | workers=${cpu_dp} | crypto_enable=${False}
\ No newline at end of file diff --git a/resources/libraries/robot/dpdk/default.robot b/resources/libraries/robot/dpdk/default.robot index 53e3f9f04e..8b7f4dcd7e 100644 --- a/resources/libraries/robot/dpdk/default.robot +++ b/resources/libraries/robot/dpdk/default.robot @@ -35,7 +35,7 @@ | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${jumbo_frames}=${False} | | | | ${cpu_count_int} | Convert to Integer | ${phy_cores} -| | ${thr_count_int} | Convert to Integer | ${phy_cores} +| | ${dp_count_int} | Convert to Integer | ${phy_cores} | | ${dp_cores}= | Evaluate | ${cpu_count_int}+1 | | FOR | ${dut} | IN | @{duts} | | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} @@ -43,23 +43,23 @@ | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']} | | | ${cpus}= | Cpu List Per Node Str | ${nodes['${dut}']} | ${numa} | | | ... | skip_cnt=${2} | cpu_cnt=${cpu_count_int} | smt_used=${smt_used} -| | | ${thr_count_int}= | Run keyword if | ${smt_used} | +| | | ${dp_count_int}= | Run keyword if | ${smt_used} | | | | ... | Evaluate | int(${cpu_count_int}*2) | ELSE | Set variable -| | | ... | ${thr_count_int} +| | | ... | ${dp_count_int} | | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${1} | | | ${rxq_count_int}= | Run Keyword If | ${rx_queues} | | | ... | Set variable | ${rx_queues} -| | | ... | ELSE | Evaluate | int(${thr_count_int}/${rxq_ratio}) +| | | ... | ELSE | Evaluate | int(${dp_count_int}/${rxq_ratio}) | | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0 | | | ... | Set variable | ${1} | | | ... | ELSE | Set variable | ${rxq_count_int} | | | Start testpmd | | | ... | ${nodes['${dut}']} | ${${dut}_pf1}[0] | ${${dut}_pf2}[0] -| | | ... | ${cpus} | ${thr_count_int} | ${rxq_count_int} | ${jumbo_frames} +| | | ... | ${cpus} | ${dp_count_int} | ${rxq_count_int} | ${jumbo_frames} | | | ... | ${nic_rxq_size} | ${nic_txq_size} -| | | Run keyword if | ${thr_count_int} > 1 +| | | Run keyword if | ${dp_count_int} > 1 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD -| | | Set Tags | ${thr_count_int}T${cpu_count_int}C +| | | Set Tags | ${dp_count_int}T${cpu_count_int}C | | END | Start l3fwd on all DUTs @@ -78,7 +78,7 @@ | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${jumbo_frames}=${False} | | | | ${cpu_count_int} | Convert to Integer | ${phy_cores} -| | ${thr_count_int} | Convert to Integer | ${phy_cores} +| | ${dp_count_int} | Convert to Integer | ${phy_cores} | | ${dp_cores}= | Evaluate | ${cpu_count_int}+1 | | FOR | ${dut} | IN | @{duts} | | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} @@ -86,19 +86,19 @@ | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']} | | | ${cpus}= | Cpu List Per Node Str | ${nodes['${dut}']} | ${numa} | | | ... | skip_cnt=${2} | cpu_cnt=${cpu_count_int} | smt_used=${smt_used} -| | | ${thr_count_int}= | Run keyword if | ${smt_used} | +| | | ${dp_count_int}= | Run keyword if | ${smt_used} | | | | ... | Evaluate | int(${cpu_count_int}*2) | ELSE | Set variable -| | | ... | ${thr_count_int} +| | | ... | ${dp_count_int} | | | ${rxq_count_int}= | Run keyword if | ${rx_queues} | | | ... | Set variable | ${rx_queues} -| | | ... | ELSE | Evaluate | int(${thr_count_int}/1) +| | | ... | ELSE | Evaluate | int(${dp_count_int}/1) | | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0 | | | ... | Set variable | ${1} | | | ... | ELSE | Set variable | ${rxq_count_int} | | | Start l3fwd | | | ... | ${nodes} | ${nodes['${dut}']} | ${${dut}_pf1}[0] | ${${dut}_pf2}[0] -| | | ... | ${cpus} | ${thr_count_int} | ${rxq_count_int} | ${jumbo_frames} -| | | Run keyword if | ${thr_count_int} > 1 +| | | ... | ${cpus} | ${dp_count_int} | ${rxq_count_int} | ${jumbo_frames} +| | | Run keyword if | ${dp_count_int} > 1 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD -| | | Set Tags | ${thr_count_int}T${cpu_count_int}C +| | | Set Tags | ${dp_count_int}T${cpu_count_int}C | | END diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot index 202ade34a5..c33c875389 100644 --- a/resources/libraries/robot/ip/nat.robot +++ b/resources/libraries/robot/ip/nat.robot @@ -51,7 +51,7 @@ | | ... | - n_sessions - Expected number of opened sessions. | | | | ${max_sessions}= | Compute Max Translations Per Thread -| | ... | ${n_sessions} | ${thr_count_int} +| | ... | ${n_sessions} | ${dp_count_int} | | Enable NAT44 Plugin | ${dut1} | mode=${nat_mode} | sessions=${max_sessions} | | Configure inside and outside interfaces | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0] diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index 96b0e0e430..c6c98fbf8a 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -486,7 +486,7 @@ | | ${smt_used}= | Is SMT enabled | ${nodes['${iperf_server_node}']['cpuinfo']} | | ${vm_status} | ${value}= | Run Keyword And Ignore Error | | ... | Get Library Instance | vnf_manager -| | ${vth}= | Evaluate | (${thr_count_int} + 1) +| | ${vth}= | Evaluate | (${dp_count_int} + 1) | | ${cpu_skip_cnt}= | Set Variable If | '${vm_status}' == 'PASS' | | ... | ${CPU_CNT_SYSTEM} | | ... | ${${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} + ${cpu_count_int} + ${vth}} diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index 1d4c9a17b0..4b2ad22527 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -325,15 +325,15 @@ | | Acquire all '${container_group}' containers | | Create all '${container_group}' containers | | ${cpu_count_int} | Convert to Integer | ${phy_cores} -| | ${thr_count_int} | Convert to Integer | ${phy_cores} +| | ${dp_count_int} | Convert to Integer | ${phy_cores} | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']} -| | ${thr_count_int}= | Run keyword if | ${smt_used} +| | ${dp_count_int}= | Run keyword if | ${smt_used} | | ... | Evaluate | int(${cpu_count_int}*2) -| | ... | ELSE | Set variable | ${thr_count_int} +| | ... | ELSE | Set variable | ${dp_count_int} | | ${rxq_ratio} = | Get Variable Value | \${rxq_ratio} | ${1} | | ${rxq_count_int}= | Run Keyword If | ${rx_queues} | | ... | Set variable | ${rx_queues} -| | ... | ELSE | Evaluate | int(${thr_count_int}/${rxq_ratio}) +| | ... | ELSE | Evaluate | int(${dp_count_int}/${rxq_ratio}) | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0 | | ... | Set variable | ${1} | | ... | ELSE | Set variable | ${rxq_count_int} diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 58c2189b9b..4905da5baa 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -75,8 +75,6 @@ | ${cpu_alloc_str}= | ${0} *** Keywords *** -# TODO: Sort keywords alphabetically. - | Call Resetter | | [Documentation] | | ... | Check for a presence of test variable \${resetter}. @@ -123,29 +121,6 @@ | | Should Not Contain Match | ${results} | FAIL | | ... | msg=At least one of statistic commands failed! -| Workers From Physical Cores -| | [Documentation] -| | ... | Convert from core count to worker count. -| | -| | ... | This just calls CpuUtils.worker_count_from_cores_and_smt keyword -| | ... | with the global \${smt_used} value. -| | ... | See documentation there. -| | -| | ... | *Arguments:* -| | ... | - phy_cores - Number of physical cores to convert from. Type: integer. -| | -| | ... | *Return value:* -| | ... | - Number of workers active on the given number of cores. -| | -| | ... | *Example:* -| | -| | ... | \| \${dp_workers} = \| Workers from Physical Cores \| \${1} \| -| | -| | [Arguments] | ${phy_cores} -| | -| | Run Keyword And Return | Worker Count From Cores And Smt -| | ... | phy_cores=${phy_cores} | smt_used=${smt_used} - | Configure crypto device on all DUTs | | [Documentation] | Verify if Crypto QAT device virtual functions are | | ... | initialized on all DUTs. If parameter force_init is set to True, then @@ -241,9 +216,7 @@ | | ... | 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. +| | ... | User can manually override RXQ, RXD, TXD parameters if needed. | | | | ... | *Arguments:* | | ... | - phy_cores - Number of physical cores to use. Type: integer @@ -258,120 +231,33 @@ | | [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}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']} -| | | ${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} | ${1} -| | | ${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} +| | | &{compute_resource_info}= | Get Affinity VPP Vswitch +| | | ... | ${nodes} | ${dut} | ${phy_cores} | rx_queues=${rx_queues} +| | | ... | rxd=${rxd} | txd=${txd} +| | | Set Test Variable | &{compute_resource_info} +| | | Create compute resources variables | | | 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 +| | | Run Keyword | ${dut}.Add Buffers Per Numa | ${buffers_numa} | | 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 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} \| +| Create compute resources variables +| | [Documentation] +| | ... | Create compute resources variables | | -| | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${rxd}=${None} -| | ... | ${txd}=${None} +| | ... | _NOTE:_ This KW sets various suite variables based on computed +| | ... | resources. | | -| | ${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} | ${1} -| | | ${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 +| | ${variables}= | Get Dictionary Keys | ${compute_resource_info} +| | FOR | ${variable} | IN | @{variables} +| | | ${value}= | Get From Dictionary | ${compute_resource_info} | ${variable} +| | | Set Test Variable | ${${variable}} | ${value} | | 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} +| | Run Keyword If | ${dp_count_int} > 1 +| | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD +| | Set Tags | ${dp_count_int}T${cpu_count_int}C | Add DPDK VLAN strip offload switch off between DUTs | | [Documentation] diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index 5bb7c855f3..1a7b32ea00 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -151,7 +151,7 @@ | | | Run Keyword If | ${nic_txq_size} > 0 | | | ... | ${dut}.Add DPDK Dev Default TXD | ${nic_txq_size} | | | Run Keyword If | '${crypto_type}' != '${None}' -| | | ... | ${dut}.Add DPDK Cryptodev | ${thr_count_int} +| | | ... | ${dut}.Add DPDK Cryptodev | ${dp_count_int} | | | Run Keyword | ${dut}.Add DPDK Max Simd Bitwidth | ${GRAPH_NODE_VARIANT} | | END | | ${_vlan_strip} | ${value}= | Run Keyword And Ignore Error |