aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-07-25 10:47:12 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-07-27 08:25:02 +0000
commit9c926fdd75cc1d65faa1ee50ce9133e754fdd498 (patch)
tree2d14680dc9a7dc43b935559bb176de2f1503613f /resources/libraries/robot
parentf58649004a975b8e02dd3935669fd5e15c525817 (diff)
feat(core): Core allocation
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I782b87190dbee6e0a12c97f616b80539cd6614bd
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/crypto/ipsec.robot4
-rw-r--r--resources/libraries/robot/hoststack/hoststack.robot2
-rw-r--r--resources/libraries/robot/shared/default.robot27
-rw-r--r--resources/libraries/robot/shared/vm.robot7
4 files changed, 27 insertions, 13 deletions
diff --git a/resources/libraries/robot/crypto/ipsec.robot b/resources/libraries/robot/crypto/ipsec.robot
index 2e58a9c3a9..64563de427 100644
--- a/resources/libraries/robot/crypto/ipsec.robot
+++ b/resources/libraries/robot/crypto/ipsec.robot
@@ -240,9 +240,9 @@
| | ... | on all DUT nodes (leaving feature plane workers disabled).
| |
| | VPP Round Robin Rx Placement on all DUTs
-| | ... | ${nodes} | prefix=${EMPTY} | workers=${cpu_dp}
+| | ... | ${nodes} | prefix=${EMPTY} | use_dp_cores=${True}
| | VPP IPSec Crypto SW Scheduler Set Worker on all DUTs
-| | ... | ${nodes} | workers=${cpu_dp} | crypto_enable=${False}
+| | ... | ${nodes} | crypto_enable=${False}
| Enable SPD flow cache IPv4 Inbound
| | [Documentation]
diff --git a/resources/libraries/robot/hoststack/hoststack.robot b/resources/libraries/robot/hoststack/hoststack.robot
index 9dd3987048..2661ea1eef 100644
--- a/resources/libraries/robot/hoststack/hoststack.robot
+++ b/resources/libraries/robot/hoststack/hoststack.robot
@@ -595,7 +595,7 @@
| | ${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}
+| | ... | ${smt_used} | ${${dut}_cpu_alloc_str}
| | ${nginx_server}= | Get Nginx Command | ${nginx_server_attr}
| | ... | ${nginx_version} | ${packages_dir}
| | ${server_pid}= | Start Hoststack Test Program
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index fabb44067b..44ade6dc33 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -207,15 +207,12 @@
| | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${rxd}=${None}
| | ... | ${txd}=${None}
| |
+| | Create compute resources variables
+| | ... | ${phy_cores} | rx_queues=${rx_queues} | rxd=${rxd} | txd=${txd}
| | FOR | ${dut} | IN | @{duts}
-| | | &{compute_resource_info}= | Get Affinity 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 | ${dut}.Add CPU Main Core | ${${dut}_cpu_main}
| | | Run Keyword If | ${cpu_count_int} > 0
-| | | ... | ${dut}.Add CPU Corelist Workers | ${cpu_wt}
+| | | ... | ${dut}.Add CPU Corelist Workers | ${${dut}_cpu_wt}
| | | Run Keyword | ${dut}.Add Buffers Per Numa | ${buffers_numa}
| | END
@@ -226,6 +223,22 @@
| | ... | _NOTE:_ This KW sets various suite variables based on computed
| | ... | resources.
| |
+| | ... | *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:*
+| |
+| | ... | \| Create compute resources variables \| ${1} \| ${1} \|
+| |
+| | [Arguments] | ${phy_cores} | ${rx_queues}=${None}
+| | ... | ${rxd}=${None} | ${txd}=${None}
+| |
+| | &{compute_resource_info}= | Get Affinity Vswitch
+| | ... | ${nodes} | ${phy_cores} | rx_queues=${rx_queues}
+| | ... | rxd=${rxd} | txd=${txd}
| | ${variables}= | Get Dictionary Keys | ${compute_resource_info}
| | FOR | ${variable} | IN | @{variables}
| | | ${value}= | Get From Dictionary | ${compute_resource_info} | ${variable}
diff --git a/resources/libraries/robot/shared/vm.robot b/resources/libraries/robot/shared/vm.robot
index 029956c6c0..e8618dc40b 100644
--- a/resources/libraries/robot/shared/vm.robot
+++ b/resources/libraries/robot/shared/vm.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2023 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:
@@ -116,8 +116,9 @@
| | ... | rxq_count_int=${rxq_count_int}
| | ... | virtio_feature_mask=${virtio_feature_mask} | page_size=${page_size}
| | ${cpu_wt}= | Run Keyword | vnf_manager.Start All VMs | pinning=${pinning}
-| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt}
-| | Set Test Variable | ${cpu_alloc_str}
+| | ${${node}_cpu_alloc_str}= | Catenate | SEPARATOR=,
+| | ... | ${${node}_cpu_alloc_str} | ${cpu_wt}
+| | Set Test Variable | ${${node}_cpu_alloc_str}
| | Run Keyword If | ${validate}
| | ... | All VPP Interfaces Ready Wait | ${nodes} | retries=${300}
| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual