diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-07-25 10:47:12 +0000 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2023-07-27 08:25:02 +0000 |
commit | 9c926fdd75cc1d65faa1ee50ce9133e754fdd498 (patch) | |
tree | 2d14680dc9a7dc43b935559bb176de2f1503613f /resources/libraries/robot/shared | |
parent | f58649004a975b8e02dd3935669fd5e15c525817 (diff) |
feat(core): Core allocation
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I782b87190dbee6e0a12c97f616b80539cd6614bd
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r-- | resources/libraries/robot/shared/default.robot | 27 | ||||
-rw-r--r-- | resources/libraries/robot/shared/vm.robot | 7 |
2 files changed, 24 insertions, 10 deletions
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 |