aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-04-19 06:40:44 +0000
committerPeter Mikus <pmikus@cisco.com>2019-04-26 11:03:30 +0000
commit780b65d82863effd53ccb0e0150c29d22522c61d (patch)
tree0c5a5a48d067e337a754e34a6182470ef5aff9da /resources/libraries/robot
parentf6e9d58ecd95789e0b3292983fafff223ec75a2c (diff)
NF density tests with dtc=0.5 and dtcr=2
Change-Id: Icff556142280ad0b6261e0a2bfb71672ee6b3807 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/performance/performance_configuration.robot25
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot53
-rw-r--r--resources/libraries/robot/shared/container.robot14
-rw-r--r--resources/libraries/robot/shared/default.robot8
4 files changed, 31 insertions, 69 deletions
diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot
index d9f5e3ab59..8a305e4409 100644
--- a/resources/libraries/robot/performance/performance_configuration.robot
+++ b/resources/libraries/robot/performance/performance_configuration.robot
@@ -64,7 +64,7 @@
| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up
| | | Run Keyword Unless | '${if2_status}' == 'PASS'
| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up
-| | All VPP Interfaces Ready Wait | ${nodes}
+| | All VPP Interfaces Ready Wait | ${nodes} | timeout=${600}
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
@@ -83,7 +83,7 @@
| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1}
| | | Run Keyword Unless | '${if2_status}' == 'PASS'
| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2}
-| | All VPP Interfaces Ready Wait | ${nodes}
+| | All VPP Interfaces Ready Wait | ${nodes} | timeout=${600}
| Set single interfaces in path up
| | [Documentation]
@@ -104,7 +104,7 @@
| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
| | | Run Keyword Unless | '${if1_status}' == 'PASS'
| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
-| | All VPP Interfaces Ready Wait | ${nodes}
+| | All VPP Interfaces Ready Wait | ${nodes} | timeout=${600}
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
@@ -2301,10 +2301,11 @@
| | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs}
| | ... | auto_scale=${auto_scale} | vnf=${vnf}
| | ... | tg_if1_mac=${tg_if1_mac} | tg_if2_mac=${tg_if2_mac}
-| | ... | cpu_count_int=${cpu_count_int} | rxq_count_int=${rxq_count_int}
+| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
+| | ... | rxq_count_int=${rxq_count_int}
| | Run Keyword | vnf_manager.Start All VMs | pinning=${True}
| | Run Keyword If | ${use_tuned_cfs} | vnf_manager.Set Scheduler All VMs
-| | All VPP Interfaces Ready Wait | ${nodes}
+| | All VPP Interfaces Ready Wait | ${nodes} | timeout=${600}
| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual
| Configure guest VM with dpdk-testpmd connected via vhost-user
@@ -2392,9 +2393,10 @@
| | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False}
| | ...
| | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
-| | | ${nf_cpus}= | Create network function CPU list | ${dut}
-| | | ... | chains=${1} | nodeness=${vm_count} | chain_id=${1}
-| | | ... | node_id=${number} | auto_scale=${True}
+| | | ${nf_cpus}= | Get Affinity NF | ${nodes} | ${dut}
+| | | ... | nf_chains=${1} | nf_nodes=${vm_count}
+| | | ... | nf_chain=${1} | nf_node=${number}
+| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${cpu_count_int}
| | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1
| | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2
| | | ${vm}=
@@ -2528,9 +2530,10 @@
| | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False}
| | ...
| | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1
-| | | ${nf_cpus}= | Create network function CPU list | ${dut}
-| | | ... | chains=${1} | nodeness=${vm_count} | chain_id=${1}
-| | | ... | node_id=${number} | auto_scale=${True}
+| | | ${nf_cpus}= | Get Affinity NF | ${nodes} | ${dut}
+| | | ... | nf_chains=${1} | nf_nodes=${vm_count}
+| | | ... | nf_chain=${1} | nf_node=${number}
+| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${cpu_count_int}
| | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1
| | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2
| | | ${vm}=
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index 45d8efe535..9661b522d8 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -406,56 +406,3 @@
| | Run Keyword If | ${dut_stats}==${True}
| | ... | Show runtime counters on all DUTs | ${nodes}
| | Stop traffic on tg
-
-| Create network function CPU list
-| | # TODO: Is there a better place for this keyword?
-| | # It is not exactly a performance utility.
-| | [Documentation]
-| | ... | Create list of CPUs allocated for network function base on SUT/DUT
-| | ... | placement and other network functions placement.
-| | ...
-| | ... | *Arguments:*
-| | ... | - dut - DUT node. Type: dictionary
-| | ... | - chains: Total number of chains. Type: integer
-| | ... | - nodeness: Total number of nodes per chain. Type: integer
-| | ... | - chain_id - Network function chain ID. Type: integer
-| | ... | - node_id - Network function node ID within chain. Type: integer
-| | ... | - mtcr - Main thread to core ratio. Type: integer
-| | ... | - dtcr - Dataplane thread to core ratio. Type: integer
-| | ... | - auto_scale - If True, use same amount of Dataplane threads for
-| | ... | network function as DUT, otherwise use single physical core for
-| | ... | every network function. Type: boolean
-| | ...
-| | ... | *Note:*
-| | ... | KW uses test variables \${cpu_count_int} set by
-| | ... | "Add worker threads and rxqueues to all DUTs"
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Create network function CPU list \| ${nodes['DUT1']} \
-| | ... | \| 1 \| 1 \| 1 \| 1 \|
-| | ...
-| | [Arguments] | ${dut} | ${chains}=${1} | ${nodeness}=${1} | ${chain_id}=${1}
-| | ... | ${node_id}=${1} | ${mtcr}=${2} | ${dtcr}=${1} | ${auto_scale}=${False}
-| | ...
-| | ${sut_sc}= | Set Variable | ${1}
-| | ${dut_mc}= | Set Variable | ${1}
-| | ${dut_dc}= | Set Variable | ${cpu_count_int}
-| | ${skip}= | Evaluate | ${sut_sc} + ${dut_mc} + ${dut_dc}
-| | ${dtc}= | Set Variable If | ${auto_scale} | ${cpu_count_int} | ${1}
-| | ${if1_status} | ${value}= | Run Keyword And Ignore Error
-| | ... | Variable Should Exist | ${${dut}_if1}
-| | @{if_list}= | Run Keyword If | '${if1_status}' == 'PASS'
-| | ... | Create List | ${${dut}_if1}
-| | ... | ELSE | Create List | ${${dut}_if1_1} | ${${dut}_if1_2}
-| | ${if2_status} | ${value}= | Run Keyword And Ignore Error
-| | ... | Variable Should Exist | ${${dut}_if2}
-| | Run Keyword If | '${if2_status}' == 'PASS'
-| | ... | Append To List | ${if_list} | ${${dut}_if2}
-| | ... | ELSE | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
-| | ${dut_numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
-| | ${nf_cpus}= | Cpu slice of list for NF | node=${nodes['${dut}']}
-| | ... | cpu_node=${dut_numa} | chains=${chains} | nodeness=${nodeness}
-| | ... | chain_id=${chain_id} | node_id=${node_id} | mtcr=${mtcr}
-| | ... | dtcr=${dtcr} | dtc=${dtc} | skip_cnt=${skip}
-| | Return From Keyword | ${nf_cpus}
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index d1ec6d2a03..c1ab1af18d 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -41,6 +41,13 @@
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${nf_chain}=${1}
| | ... | ${nf_node}=${1} | ${auto_scale}=${True} | ${nested}=${False}
| | ...
+| | ${nf_dtcr_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${nf_dtcr}
+| | ${nf_dtcr}= | Run Keyword If | '${nf_dtcr_status}' == 'PASS'
+| | ... | Set Variable | ${nf_dtcr} | ELSE | Set Variable | ${1}
+| | ${nf_dtc}= | Run Keyword Unless | ${nested}
+| | ... | Set Variable If | ${auto_scale} | ${cpu_count_int}
+| | ... | ${nf_dtc}
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
@@ -56,9 +63,10 @@
| | | ... | ${root}/usr/share/vpp/:/usr/share/vpp/
| | | ${nf_cpus}= | Set Variable | ${None}
| | | ${nf_cpus}= | Run Keyword Unless | ${nested}
-| | | ... | Create network function CPU list | ${dut}
-| | | ... | chains=${nf_chains} | nodeness=${nf_nodes} | chain_id=${nf_chain}
-| | | ... | node_id=${nf_node} | auto_scale=${auto_scale}
+| | | ... | Get Affinity NF | ${nodes} | ${dut}
+| | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes}
+| | | ... | nf_chain=${nf_chain} | nf_node=${nf_node}
+| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | | &{cont_args}= | Create Dictionary
| | | ... | name=${dut}_${container_group}${nf_id}${uuid}
| | | ... | node=${nodes['${dut}']} | mnt=${mnt} | env=${env}
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 569ff34812..6e26abc03b 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -14,6 +14,7 @@
*** Settings ***
| Variables | resources/libraries/python/topology.py
| Variables | resources/libraries/python/PapiHistory.py
+| Variables | resources/libraries/python/Constants.py
| ...
| Library | Collections
| Library | OperatingSystem
@@ -199,10 +200,13 @@
| | | ... | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
| | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
| | | ${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=${1} | cpu_cnt=${1}
+| | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${CPU_CNT_MAIN}
+| | | ${skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN}
| | | ${cpu_wt}= | Cpu list per node str | ${nodes['${dut}']} | ${numa}
-| | | ... | skip_cnt=${2} | cpu_cnt=${cpu_count_int} | smt_used=${smt_used}
+| | | ... | 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}