aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/performance/performance_limits.robot117
-rw-r--r--resources/libraries/robot/performance/performance_setup.robot365
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot280
-rw-r--r--resources/libraries/robot/shared/default.robot8
4 files changed, 313 insertions, 457 deletions
diff --git a/resources/libraries/robot/performance/performance_limits.robot b/resources/libraries/robot/performance/performance_limits.robot
new file mode 100644
index 0000000000..759ee5c28f
--- /dev/null
+++ b/resources/libraries/robot/performance/performance_limits.robot
@@ -0,0 +1,117 @@
+# Copyright (c) 2019 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:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Documentation | Performance suite keywords - Handling NIC and TG limits.
+| Library | Collections
+| Variables | ${CURDIR}/../../python/Constants.py
+
+*** Keywords ***
+| Get Average Frame Size
+| | [Documentation]
+| | ... | Framesize can be either integer in case of a single packet
+| | ... | in stream, or set of packets in case of IMIX type or simmilar.
+| | ...
+| | ... | *Arguments:*
+| | ... | - frame_size - Framesize. Type: integer or string
+| | ...
+| | ... | *Returns:*
+| | ... | Average frame size. Type: float
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Get Average Frame Size \| IMIX_v4_1 \|
+| | ...
+| | [Arguments] | ${frame_size}
+| | ...
+| | Return From Keyword If | '${frame_size}' == 'IMIX_v4_1' | ${353.83333}
+| | ${frame_size} = | Convert To Number | ${frame_size}
+| | Return From Keyword | ${frame_size}
+
+| Set Max Rate And Jumbo
+| | [Documentation]
+| | ... | Input framesize can be either integer in case of a single packet
+| | ... | in stream, or IMIX string defining mix of packets.
+| | ... | For jumbo frames detection, the maximal packet size is relevant.
+| | ... | For maximal transmit rate, the average packet size is relevant.
+| | ... | In both cases, encapsulation overhead (if any) has effect.
+| | ... | The maximal rate is computed from NIC name.
+| | ... | The implementation works by mapping from exact
+| | ... | whitelisted NIC names.
+| | ... | The mapping is hardcoded in nic_limits.yaml
+| | ... | TODO: Make the mapping from NIC names case insensistive.
+| | ...
+| | ... | TODO: Make pps limit also definable per NIC.
+| | ...
+| | ... | This keyword computes maximal unidirectional transmit rate
+| | ... | and jumbo boolean (some suites need that for configuration decisions).
+| | ... | To streamline suite autogeneration, both input and output values
+| | ... | are communicated as test (or broader scope) variables,
+| | ... | instead of explicit arguments and return values.
+| | ...
+| | ... | *Test (or broader scope) variables read:*
+| | ... | - nic_name - Name of bottleneck NIC. Type: string
+| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
+| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
+| | ...
+| | ... | *Test variables set:*
+| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
+| | ... | Type: float
+| | ... | - jumbo - Jumbo boolean, true if jumbo packet support
+| | ... | has to be enabled. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set test Variable \| \${frame_size} \| IMIX_v4_1 \|
+| | ... | \| Set Max Rate And Jumbo \|
+| | ...
+| | ${pps_limit} = | Set Variable | ${18750000.0}
+| | ${bps_limit} = | Get From Dictionary | ${NIC_NAME_TO_LIMIT} | ${nic_name}
+| | ${avg_size} = | Get Average Frame Size | ${frame_size}
+| | ${max_size} = | Set Variable If | '${frame_size}' == 'IMIX_v4_1'
+| | ... | ${1518} | ${frame_size}
+| | # swo := size_with_overhead
+| | ${avg_swo} = | Evaluate | ${avg_size} + ${overhead}
+| | ${max_swo} = | Evaluate | ${max_size} + ${overhead}
+| | ${jumbo} = | Set Variable If | ${max_swo} < 1522
+| | ... | ${False} | ${True}
+| | ${rate} = | Evaluate | ${bps_limit} / ((${avg_swo} + 20.0) * 8)
+| | ${max_rate} = | Set Variable If | ${rate} > ${pps_limit}
+| | ... | ${pps_limit} | ${rate}
+| | Set Test Variable | \${jumbo}
+| | Set Test Variable | \${max_rate}
+
+| Set Max Rate And Jumbo And Handle Multi Seg
+| | [Documentation]
+| | ... | This keyword starts with Get Max Rate And Jumbo keyword,
+| | ... | then adds correct multi seg VPP configuration.
+| | ...
+| | ... | See Documentation of Set Max Rate And Jumbo for more details.
+| | ...
+| | ... | *Test (or broader scope) variables read:*
+| | ... | - nic_name - Name of bottleneck NIC. Type: string
+| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
+| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
+| | ...
+| | ... | *Test variables set:*
+| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
+| | ... | Type: float
+| | ... | - jumbo - Jumbo boolean, true if jumbo packet support
+| | ... | has to be enabled. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set Max Rate And Jumbo And Handle Multi Seg \|
+| | ...
+| | Set Max Rate And Jumbo
+| | Run Keyword If | not ${jumbo} | Add no multi seg to all DUTs
diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot
index f484eeb71f..11ce560fd6 100644
--- a/resources/libraries/robot/performance/performance_setup.robot
+++ b/resources/libraries/robot/performance/performance_setup.robot
@@ -15,6 +15,7 @@
| Library | resources.libraries.python.DUTSetup
| Library | resources.tools.wrk.wrk
| Resource | resources/libraries/robot/performance/performance_configuration.robot
+| Resource | resources/libraries/robot/performance/performance_limits.robot
| Resource | resources/libraries/robot/performance/performance_utils.robot
| Resource | resources/libraries/robot/tcp/tcp_setup.robot
| Documentation | Performance suite keywords - Suite and test setups and
@@ -239,19 +240,19 @@
| | ... | argument. Initializes traffic generator.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${traffic_profile} | ${nic_name}
| | ...
| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
| Set up 2-node-switched performance topology with DUT's NIC model
| | [Documentation]
@@ -261,8 +262,8 @@
| | ... | argument. Initializes traffic generator.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string
| | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string
| | ...
@@ -271,13 +272,13 @@
| | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \
| | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model} | ${tg_if1_dest_mac}
+| | [Arguments] | ${traffic_profile} | ${nic_name} | ${tg_if1_dest_mac}
| | ... | ${tg_if2_dest_mac}
| | ...
| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
| | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac}
| Set up 3-node performance topology with DUT's NIC model
@@ -288,20 +289,20 @@
| | ... | argument. Initializes traffic generator.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \
| | ... | \| Intel-X520-DA2 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${traffic_profile} | ${nic_name}
| | ...
| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
| Set up 3-node performance topology with DUT's NIC model with double link between DUTs
| | [Documentation]
@@ -311,20 +312,20 @@
| | ... | argument. Initializes traffic generator.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Set up 3-node performance topology with DUT's NIC model with \
| | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${traffic_profile} | ${nic_name}
| | ...
| | Set variables in 3-node circular topology with DUT interface model with double link between DUTs
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
| Set up DPDK 2-node performance topology with DUT's NIC model
| | [Documentation]
@@ -334,20 +335,20 @@
| | ... | environment.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \
| | ... | \| L2 \| Intel-X520-DA2 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${traffic_profile} | ${nic_name}
| | ...
| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile}
| | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
| Set up DPDK 3-node performance topology with DUT's NIC model
@@ -358,19 +359,19 @@
| | ... | environment.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model}
+| | [Arguments] | ${traffic_profile} | ${nic_name}
| | ...
| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
-| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${topology_type}
+| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile}
| | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
| | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
@@ -383,8 +384,8 @@
| | ... | It configures PCI device with VFs on all DUTs.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ... | - vf_driver - Virtual function driver. Type: string
| | ... | - numvfs - Number of VFs. Type: integer
| | ...
@@ -393,17 +394,17 @@
| | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \
| | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
+| | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver}
| | ... | ${numvfs}=${1}
| | ...
| | Set variables in 2-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Run Keyword If | '${vf_driver}' == 'AVF'
| | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
-| | ... | topology_type=${topology_type}
+| | ... | traffic_profile=${traffic_profile}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0}
-| | ... | ${topology_type}
+| | ... | ${traffic_profile}
| Set up SRIOV 3-node performance topology with DUT's NIC model
| | [Documentation]
@@ -414,8 +415,8 @@
| | ... | It configures PCI device with VFs on all DUTs.
| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ... | - vf_driver - Virtual function driver. Type: string
| | ... | - numvfs - Number of VFs. Type: integer
| | ...
@@ -424,17 +425,17 @@
| | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \
| | ... | \| L2 \| Intel-X520-DA2 \| AVF \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model} | ${vf_driver}
+| | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver}
| | ... | ${numvfs}=${1}
| | ...
| | Set variables in 3-node circular topology with DUT interface model
-| | ... | ${nic_model}
+| | ... | ${nic_name}
| | Run Keyword If | '${vf_driver}' == 'AVF'
| | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs}
-| | ... | topology_type=${topology_type}
+| | ... | traffic_profile=${traffic_profile}
| | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2}
| | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0}
-| | ... | ${topology_type}
+| | ... | ${traffic_profile}
| Set up IPSec performance test suite
| | [Documentation]
@@ -444,21 +445,23 @@
| | ... | argument. Initializes traffic generator.
| | ... | Then it configures crypto device and kernel module on all DUTs.
| | ...
+| | ... | TODO CSIT-1481: Crypto HW should be read from topology file instead.
+| | ...
| | ... | *Arguments:*
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - nic_model - Interface model. Type: string
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nic_name - Interface model. Type: string
| | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx or
-| | ... | SW_cryptodev. Type: string, default value: HW_DH895xcc
+| | ... | SW_cryptodev. Type: string, default value: HW_DH895xcc
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Set up IPSec performance test suite \| L2 \
| | ... | \| Intel-X520-DA2 \| HW_DH895xcc \|
| | ...
-| | [Arguments] | ${topology_type} | ${nic_model} | ${crypto_type}=HW_DH895xcc
+| | [Arguments] | ${traffic_profile} | ${nic_name} | ${crypto_type}=HW_DH895xcc
| | ...
| | Set up 3-node performance topology with DUT's NIC model
-| | ... | ${topology_type} | ${nic_model}
+| | ... | ${traffic_profile} | ${nic_name}
| | Return From Keyword If | '${crypto_type}' == 'SW_cryptodev'
| | ${numvfs}= | Set Variable If
| | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
@@ -650,52 +653,39 @@
| Tear down performance test
| | [Documentation] | Common test teardown for performance tests.
| | ...
-| | Remove All Added Ports On All DUTs From Topology | ${nodes}
-| | Show PAPI History On All DUTs | ${nodes}
-| | Get Core Files on All Nodes | ${nodes}
-| | Set Test Variable | ${pkt_trace} | ${True}
-
-| Tear down performance discovery test
-| | [Documentation] | Common test teardown for ndrpdr performance tests.
+| | ... | TODO: Rename to "Tear down VPP performance test"?
+| | ... | most steps do not apply to DPDK nor other vswitch solutions.
+| | ... | TODO: Document at least some steps this keyword takes.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - topology_type - Topology type. Type: string
+| | ... | To save space in suites, this keyword does not accept
+| | ... | any explicit arguments. Instead, it requires few variables
+| | ... | to be defined in at least test scope.
| | ...
-| | ... | *Example:*
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
+| | ... | - nodes - Parsed information object. Type: dict
| | ...
-| | ... | \| Tear down performance discovery test \| 4.0mpps \| 64 \
-| | ... | \| 3-node-IPv4 \|
+| | ... | *Example:*
| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${topology_type}
+| | ... | \| Set Test Variable \| \${frame_size} \| 64 \|
+| | ... | \| Tear down performance test \|
| | ...
-| | Tear down performance test
+| | Remove All Added Ports On All DUTs From Topology | ${nodes}
+| | Show PAPI History On All DUTs | ${nodes}
+| | Get Core Files on All Nodes | ${nodes}
+| | Set Test Variable | ${pkt_trace} | ${True}
| | Show statistics on all DUTs | ${nodes}
| | Run Keyword If Test Failed
-| | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
-
-| Tear down performance mrr test
-| | [Documentation] | Common test teardown for max-received-rate performance
-| | ... | tests.
-| | ...
-| | Tear down performance test
-
-| Tear down performance test with wrk
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
-| | ... | tests.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down performance test with wrk \|
-| | ...
-| | Tear down performance test
+| | ... | Traffic should pass with no loss | ${perf_trial_duration} | 10000pps
+| | ... | ${frame_size} | ${traffic_profile} | fail_on_loss=${False}
| Tear down performance test with container
| | [Documentation]
| | ... | Common test teardown for performance tests which uses containers.
| | ...
+| | ... | TODO: Call Tear down performance test?
+| | ...
| | :FOR | ${container_group} | IN | @{container_groups}
| | | Destroy all '${container_group}' containers
@@ -703,15 +693,7 @@
| | [Documentation] | Common test teardown for performance tests which use
| | ... | vhost(s) and VM(s).
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - topology_type - Topology type. Type: string
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${topology_type}
-| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${topology_type}
+| | Tear down performance test
| | Show VPP vhost on all DUTs | ${nodes}
| | Tear down guest VM
@@ -719,44 +701,9 @@
| | [Documentation] | Common test teardown for performance tests which use
| | ... | vhost(s) and VM(s) with dpdk-testpmd.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - dut1_node - Node where to clean qemu. Type: dictionary
-| | ... | - dut1_vm_refs - VM references on node. Type: dictionary
-| | ... | - dut2_node - Node where to clean qemu. Type: dictionary
-| | ... | - dut2_vm_refs - VM references on node. Type: dictionary
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down performance test with vhost and VM with dpdk-testpmd \
-| | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${node['DUT1']} \| ${dut_vm_refs} \
-| | ... | \| ${node['DUT2']} \| ${dut_vm_refs} \|
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${topology_type}
-| | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
-| | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
-| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${topology_type}
-| | Show VPP vhost on all DUTs | ${nodes}
-| | Run keyword unless | ${dut1_node}==${None}
-| | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
-| | Run keyword unless | ${dut2_node}==${None}
-| | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
-
-| Tear down performance mrr test with vhost
-| | [Documentation] | Common test teardown for mrr tests which use
-| | ... | vhost(s) and VM(s).
-| | ...
-| | Tear down performance mrr test
-| | Show VPP vhost on all DUTs | ${nodes}
-| | Tear down guest VM
-
-| Tear down performance mrr test with vhost and VM with dpdk-testpmd
-| | [Documentation] | Common test teardown for mrr tests which use
-| | ... | vhost(s) and VM(s) with dpdk-testpmd.
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Arguments:*
| | ... | - dut1_node - Node where to clean qemu. Type: dictionary
@@ -773,7 +720,7 @@
| | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
| | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
| | ...
-| | Tear down performance mrr test
+| | Tear down performance test
| | Show VPP vhost on all DUTs | ${nodes}
| | Run keyword unless | ${dut1_node}==${None}
| | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
@@ -784,30 +731,9 @@
| | [Documentation] | Common test teardown for performance tests which use
| | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - dut1_node - Node where to clean qemu. Type: dictionary
-| | ... | - dut1_vm_refs - VM references on node. Type: dictionary
-| | ... | - dut2_node - Node where to clean qemu. Type: dictionary
-| | ... | - dut2_vm_refs - VM references on node. Type: dictionary
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${topology_type}
-| | ... | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
-| | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
-| | ...
-| | Tear down performance test with vhost and VM with dpdk-testpmd
-| | ... | ${rate} | ${framesize} | ${topology_type}
-| | ... | ${dut1_node} | ${dut1_vm_refs}
-| | ... | ${dut2_node} | ${dut2_vm_refs}
-| | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
-| | Run Keyword If Test Failed | Run Keyword And Ignore Error
-| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
-
-| Tear down mrr test with vhost and VM with dpdk-testpmd and ACL
-| | [Documentation] | Common test teardown for mrr tests which use
-| | ... | vhost(s) and VM(s) with ACL and dpdk-testpmd.
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Arguments:*
| | ... | - dut1_node - Node where to clean qemu. Type: dictionary
@@ -818,7 +744,7 @@
| | [Arguments] | ${dut1_node}=${None} | ${dut1_vm_refs}=${None}
| | ... | ${dut2_node}=${None} | ${dut2_vm_refs}=${None}
| | ...
-| | Tear down performance mrr test with vhost and VM with dpdk-testpmd
+| | Tear down performance test with vhost and VM with dpdk-testpmd
| | ... | ${dut1_node} | ${dut1_vm_refs}
| | ... | ${dut2_node} | ${dut2_vm_refs}
| | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
@@ -830,6 +756,9 @@
| | ... | Suite teardown phase with traffic generator teardown.
| | ... | Cleanup DPDK test environment.
| | ...
+| | ... | TODO: Add "Traffic should pass with no loss" with min rate
+| | ... | on failure, as in the VPP test teardown?
+| | ...
| | Teardown traffic generator | ${tg}
| | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
@@ -838,117 +767,70 @@
| | ... | Suite teardown phase with traffic generator teardown.
| | ... | Cleanup DPDK test environment.
| | ...
+| | ... | TODO: Add "Traffic should pass with no loss" with min rate
+| | ... | on failure, as in the VPP test teardown?
+| | ...
| | Teardown traffic generator | ${tg}
| | Cleanup DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2}
| | Cleanup DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2}
-| Tear down performance discovery test with NAT
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| Tear down performance test with NAT
+| | [Documentation] | Common test teardown for performance \
| | ... | tests with NAT feature used.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - traffic_profile - Traffic profile. Type: string
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Tear down performance discovery test with NAT \| 100000pps \| 64 \
-| | ... | \| ${traffic_profile} \|
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
-| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${traffic_profile}
-| | Show NAT verbose | ${dut1}
-| | Show NAT verbose | ${dut2}
-
-| Tear down mrr test with NAT
-| | [Documentation] | Common test teardown for mrr performance \
-| | ... | tests with NAT feature used.
-| | ...
-| | ... | \| Tear down mrr test with NAT \|
+| | ... | \| Tear down performance test with NAT \|
| | ...
-| | Tear down performance mrr test
+| | Tear down performance test
| | Show NAT verbose | ${dut1}
| | Show NAT verbose | ${dut2}
| Tear down performance test with ACL
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | [Documentation] | Common test teardown for performance \
| | ... | tests with ACL feature used.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - traffic_profile - Traffic profile. Type: string
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \
-| | ... | \| ${traffic_profile} \|
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
+| | ... | \| Tear down performance test with ACL \|
| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${traffic_profile}
-| | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
-| | Run Keyword If Test Failed | Run Keyword And Ignore Error
-| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
-
-| Tear down mrr test with ACL
-| | [Documentation] | Common test teardown for mrr performance \
-| | ... | tests with ACL feature used.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down mrr test with ACL \|
-| | ...
-| | Tear down performance mrr test
+| | Tear down performance test
| | Run Keyword If Test Failed | Vpp Log Plugin Acl Settings | ${dut1}
| | Run Keyword If Test Failed | Run Keyword And Ignore Error
| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
| Tear down performance test with MACIP ACL
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | [Documentation] | Common test teardown for performance \
| | ... | tests with MACIP ACL feature used.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
-| | ... | - traffic_profile - Traffic profile. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \
-| | ... | \| ${traffic_profile} \|
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
-| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${traffic_profile}
-| | Run Keyword If Test Failed | Run Keyword And Ignore Error
-| | ... | Vpp Log Macip Acl Settings | ${dut1}
-| | Run Keyword And Ignore Error
-| | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
-
-| Tear down mrr test with MACIP ACL
-| | [Documentation] | Common test teardown for mrr performance \
-| | ... | tests with MACIP ACL feature used.
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Tear down mrr test with MACIP ACL \|
+| | ... | \| Tear down performance test with MACIP ACL \|
| | ...
-| | Tear down performance mrr test
+| | Tear down performance test
| | Run Keyword If Test Failed | Run Keyword And Ignore Error
| | ... | Vpp Log Macip Acl Settings | ${dut1}
| | Run Keyword And Ignore Error
| | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
| Tear down performance test with Ligato Kubernetes
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | [Documentation] | Common test teardown for performance \
| | ... | tests with Ligato Kubernetes.
| | ...
+| | ... | TODO: Call Tear down performance test?
+| | ...
| | Run Keyword If Test Failed
| | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit
| | Run Keyword If Test Failed
@@ -956,37 +838,18 @@
| | Delete Kubernetes resource on all DUTs | ${nodes} | csit
| Tear down performance test with SRv6 with encapsulation
-| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | [Documentation] | Common test teardown for performance \
| | ... | tests with SRv6 with encapsulation feature used.
| | ...
-| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer/string
-| | ... | - traffic_profile - Traffic profile. Type: string
+| | ... | *Test Variables needed:*
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
+| | ... | - traffic_profile - Profile name to initialize TG with. Type: string
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Tear down performance test with SRv6 with encapsulation \
-| | ... | \| 100000pps \| 64 \| ${traffic_profile} \|
-| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
+| | ... | \| Tear down performance test with SRv6 with encapsulation \|
| | ...
-| | Tear down performance discovery test | ${rate} | ${framesize}
-| | ... | ${traffic_profile}
-| | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
-| | Run Keyword If Test Failed
-| | ... | Show SR Steering Policies on all DUTs | ${nodes}
-| | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes}
-
-| Tear down mrr test with SRv6 with encapsulation
-| | [Documentation] | Common test teardown for mrr tests with SRv6 with \
-| | ... | encapsulation feature used.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down mrr test with SRv6 with encapsulation \|
-| | ...
-| | Tear down performance mrr test
+| | Tear down performance test
| | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes}
| | Run Keyword If Test Failed
| | ... | Show SR Steering Policies on all DUTs | ${nodes}
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index 6ce706a514..80fddc671a 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -37,128 +37,28 @@
| ... | and PDR.
*** Keywords ***
-| Get Average Frame Size
-| | [Documentation]
-| | ... | Framesize can be either integer in case of a single packet
-| | ... | in stream, or set of packets in case of IMIX type or simmilar.
-| | ... | This keyword returns average framesize, as float or argument type.
-| | ...
-| | ... | *Arguments:*
-| | ... | - framesize - Framesize. Type: integer or string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Get Average Frame Size \| IMIX_v4_1 \|
-| | ...
-| | [Arguments] | ${framesize}
-| | ...
-| | Return From Keyword If | '${framesize}' == 'IMIX_v4_1' | ${353.83333}
-| | Return From Keyword | ${framesize}
-
-| Get Max Rate And Jumbo
-| | [Documentation]
-| | ... | Argument framesize can be either integer in case of a single packet
-| | ... | in stream, or IMIX string defining mix of packets.
-| | ... | For jumbo frames detection, the maximal packet size is relevant.
-| | ... | For maximal transmit rate, the average packet size is relevant.
-| | ... | In both cases, encapsulation overhead (if any) has effect.
-| | ... | The maximal rate is computed from line limit bandwidth,
-| | ... | but NICs also have an independent limit in packet rate.
-| | ... | For some NICs, the limit is not reachable (bps limit is stricter),
-| | ... | in those cases None is used (meaning no limiting).
-| | ...
-| | ... | This keyword returns computed maximal unidirectional transmit rate
-| | ... | and jumbo boolean (some suites need that).
-| | ...
-| | ... | *Arguments:*
-| | ... | - bps_limit - Line rate limit in bps. Type: integer
-| | ... | - framesize - Framesize in bytes or IMIX. Type: integer or string
-| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
-| | ... | - pps_limit - NIC limit rate value in pps. Type: integer or None
-| | ...
-| | ... | *Returns:*
-| | ... | - 2-tuple, consisting of:
-| | ... | - Calculated unidirectional maximal transmit rate.
-| | ... | Type: integer or float
-| | ... | - Jumbo boolean, true if jumbo packet support has to be enabled.
-| | ... | Type: boolean
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Get Max Rate And Jumbo | \${10000000} \| IMIX_v4_1 \
-| | ... | \| overhead=\${40} \| pps_limit=\${18750000} \|
-| | ...
-| | [Arguments] | ${bps_limit} | ${framesize}
-| | ... | ${overhead}=${0} | ${pps_limit}=${None}
-| | ...
-| | ${avg_size} = | Get Average Frame Size | ${framesize}
-| | ${max_size} = | Set Variable If | '${framesize}' == 'IMIX_v4_1'
-| | ... | ${1518} | ${framesize}
-| | # swo := size_with_overhead
-| | ${avg_swo} = | Evaluate | ${avg_size} + ${overhead}
-| | ${max_swo} = | Evaluate | ${max_size} + ${overhead}
-| | ${jumbo} = | Set Variable If | ${max_swo} < 1522
-| | ... | ${False} | ${True}
-| | # For testing None see: https://groups.google.com/\
-| | # forum/#!topic/robotframework-users/XntFz0ocD9E
-| | ${limit_set} = | Set Variable | ${pps_limit != None}
-| | # TODO: Can our code handle float rate?
-| | ${rate} = | Evaluate | (${bps_limit}/((${avg_swo}+20)*8)).__trunc__()
-| | ${max_rate} = | Set Variable If | ${limit_set} and ${rate} > ${pps_limit}
-| | ... | ${pps_limit} | ${rate}
-| | Return From Keyword | ${max_rate} | ${jumbo}
-
-| Get Max Rate And Jumbo And Handle Multi Seg
-| | [Documentation]
-| | ... | This keyword adds correct multi seg configuration,
-| | ... | then returns the result of Get Max Rate And Jumbo keyword.
-| | ...
-| | ... | See Documentation of Get Max Rate And Jumbo for more details.
-| | ...
-| | ... | *Arguments:*
-| | ... | - bps_limit - Line rate limit in bps. Type: integer
-| | ... | - framesize - Framesize in bytes. Type: integer or string
-| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer
-| | ... | - pps_limit - NIC limit rate value in pps. Type: integer or None
-| | ...
-| | ... | *Returns:*
-| | ... | - 2-tuple, consisting of:
-| | ... | - Calculated unidirectional maximal transmit rate.
-| | ... | Type: integer or float
-| | ... | - Jumbo boolean, true if jumbo packet support has to be enabled.
-| | ... | Type: boolean
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Get Max Rate And Jumbo And Handle Multi Seg | \${10000000} \
-| | ... | \| IMIX_v4_1 \| overhead=\${40} \| pps_limit=\${18750000} \|
-| | ...
-| | [Arguments] | ${bps_limit} | ${framesize}
-| | ... | ${overhead}=${0} | ${pps_limit}=${None}
-| | ...
-| | ${max_rate} | ${jumbo} = | Get Max Rate And Jumbo
-| | ... | ${bps_limit} | ${framesize} | ${overhead} | ${pps_limit}
-| | Run Keyword If | not ${jumbo} | Add no multi seg to all DUTs
-| | Return From Keyword | ${max_rate} | ${jumbo}
-
| Find NDR and PDR intervals using optimized search
| | [Documentation]
| | ... | Find boundaries for RFC2544 compatible NDR and PDR values
| | ... | using an optimized search algorithm.
| | ... | Display results as formatted test message.
| | ... | Fail if a resulting lower bound has too high loss fraction.
-| | ... | Proceed with Perform additional measurements based on NDRPDR result.
| | ... | Input rates are understood as uni-directional,
| | ... | reported result contains bi-directional rates.
+| | ... | Currently, the min_rate value is hardcoded to match test teardowns.
| | ...
| | ... | TODO: Should the trial duration of the additional
| | ... | measurements be configurable?
| | ...
+| | ... | Some inputs are read from variables to streamline suites.
+| | ...
+| | ... | *Test (or broader scope) variables read:*
+| | ... | - traffic_profile - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
+| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
+| | ... | Type: float
+| | ...
| | ... | *Arguments:*
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - minimum_transmit_rate - Lower limit of search [pps]. Type: float
-| | ... | - maximum_transmit_rate - Upper limit of search [pps]. Type: float
| | ... | - packet_loss_ratio - Accepted loss during search. Type: float
| | ... | - final_relative_width - Maximal width multiple of upper. Type: float
| | ... | - final_trial_duration - Duration of final trials [s]. Type: float
@@ -169,29 +69,25 @@
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Find NDR and PDR intervals using optimized search \| \${64} \| \
-| | ... | 3-node-IPv4 \| \${100000} \| \${14880952} \| \${0.005} \| \${0.005} \
-| | ... | \| \${30.0} \| \${1.0} \| \${2} \| ${600.0} \| ${2} \|
+| | ... | \| Find NDR and PDR intervals using optimized search \| \${0.005}
+| | ... | \| \${0.005} \| \${30.0} \| \${1.0} \| \${2} \| ${600.0} \| ${2} \|
| | ...
-| | [Arguments] | ${frame_size} | ${topology_type} | ${minimum_transmit_rate}
-| | ... | ${maximum_transmit_rate} | ${packet_loss_ratio}=${0.005}
+| | [Arguments] | ${packet_loss_ratio}=${0.005}
| | ... | ${final_relative_width}=${0.005} | ${final_trial_duration}=${30.0}
| | ... | ${initial_trial_duration}=${1.0}
| | ... | ${number_of_intermediate_phases}=${2} | ${timeout}=${720.0}
| | ... | ${doublings}=${2}
| | ...
| | ${result} = | Perform optimized ndrpdr search | ${frame_size}
-| | ... | ${topology_type} | ${minimum_transmit_rate*2}
-| | ... | ${maximum_transmit_rate*2} | ${packet_loss_ratio}
-| | ... | ${final_relative_width} | ${final_trial_duration}
-| | ... | ${initial_trial_duration} | ${number_of_intermediate_phases}
-| | ... | timeout=${timeout} | doublings=${doublings}
+| | ... | ${traffic_profile} | ${20000} | ${max_rate*2}
+| | ... | ${packet_loss_ratio} | ${final_relative_width}
+| | ... | ${final_trial_duration} | ${initial_trial_duration}
+| | ... | ${number_of_intermediate_phases} | timeout=${timeout}
+| | ... | doublings=${doublings}
| | Display result of NDRPDR search | ${result} | ${frame_size}
| | Check NDRPDR interval validity | ${result.pdr_interval}
| | ... | ${packet_loss_ratio}
| | Check NDRPDR interval validity | ${result.ndr_interval}
-| | Perform additional measurements based on NDRPDR result
-| | ... | ${result} | ${frame_size} | ${topology_type}
| Find critical load using PLRsearch
| | [Documentation]
@@ -201,28 +97,28 @@
| | ... | Fail if computed lower bound is below minimal rate.
| | ... | Input rates are understood as uni-directional,
| | ... | reported result contains bi-directional rates.
-| | ... | TODO: Any additional measurements for debug purposes?
+| | ... | Currently, the min_rate value is hardcoded to match test teardowns.
+| | ... | Some inputs are read from variables to streamline suites.
+| | ...
+| | ... | *Test (or broader scope) variables read:*
+| | ... | - traffic_profile - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
+| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
+| | ... | Type: float
| | ...
| | ... | *Arguments:*
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - minimum_transmit_rate - Lower limit of search [pps]. Type: float
-| | ... | - maximum_transmit_rate - Upper limit of search [pps]. Type: float
| | ... | - packet_loss_ratio - Accepted loss during search. Type: float
| | ... | - timeout - Stop when search duration is longer [s]. Type: float
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Find critical load usingPLR search \| \${64} \| \
-| | ... | 3-node-IPv4 \| \${100000} \| \${14880952} \| \${1e-7} \| \${1800} \
+| | ... | \| Find critical load usingPLR search \| \${1e-7} \| \${1800} \|
| | ...
-| | [Arguments] | ${frame_size} | ${topology_type} | ${minimum_transmit_rate}
-| | ... | ${maximum_transmit_rate} | ${packet_loss_ratio}=${1e-7}
-| | ... | ${timeout}=${1800.0}
+| | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${1800.0}
| | ...
-| | ${min_rate} = | Set Variable | ${minimum_transmit_rate*2}
+| | ${min_rate} = | Set Variable | ${20000}
| | ${average} | ${stdev} = | Perform soak search | ${frame_size}
-| | ... | ${topology_type} | ${min_rate} | ${maximum_transmit_rate*2}
+| | ... | ${traffic_profile} | ${min_rate} | ${max_rate*2}
| | ... | ${packet_loss_ratio} | timeout=${timeout}
| | ${lower} | ${upper} = | Display result of soak search
| | ... | ${average} | ${stdev} | ${frame_size}
@@ -243,7 +139,7 @@
| | ... | *Arguments:*
| | ... | - text - Flavor text describing which bound is this. Type: string
| | ... | - rate_total - Total (not per stream) measured Tr [pps]. Type: float
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
| | ... | - latency - Latency data to display if non-empty. Type: string
| | ...
| | ... | *Example:*
@@ -251,9 +147,9 @@
| | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \
| | ... | \| \${64} \| show_latency=\${EMPTY} \|
| | ...
-| | [Arguments] | ${text} | ${rate_total} | ${framesize} | ${latency}=${EMPTY}
+| | [Arguments] | ${text} | ${rate_total} | ${frame_size} | ${latency}=${EMPTY}
| | ...
-| | ${bandwidth_total} = | Evaluate | ${rate_total} * (${framesize}+20)*8 / 1e9
+| | ${bandwidth_total} = | Evaluate | ${rate_total} * (${frame_size}+20)*8 / 1e9
| | Set Test Message | ${\n}${text}: ${rate_total} pps, | append=yes
| | Set Test Message | ${bandwidth_total} Gbps (untagged) | append=yes
| | Return From Keyword If | not """${latency}"""
@@ -273,25 +169,25 @@
| | ...
| | ... | *Arguments:*
| | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Display result of NDRPDR search \| \${result} \| \${64} \|
| | ...
-| | [Arguments] | ${result} | ${framesize}
+| | [Arguments] | ${result} | ${frame_size}
| | ...
-| | ${framesize} = | Get Average Frame Size | ${framesize}
+| | ${frame_size} = | Get Average Frame Size | ${frame_size}
| | Display single bound | NDR_LOWER
-| | ... | ${result.ndr_interval.measured_low.transmit_rate} | ${framesize}
+| | ... | ${result.ndr_interval.measured_low.transmit_rate} | ${frame_size}
| | ... | ${result.ndr_interval.measured_low.latency}
| | Display single bound | NDR_UPPER
-| | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${framesize}
+| | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${frame_size}
| | Display single bound | PDR_LOWER
-| | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${framesize}
+| | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${frame_size}
| | ... | ${result.pdr_interval.measured_low.latency}
| | Display single bound | PDR_UPPER
-| | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${framesize}
+| | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${frame_size}
| Display result of soak search
| | [Documentation]
@@ -308,7 +204,7 @@
| | ... | *Arguments:*
| | ... | - avg - Estimated average critical load [pps]. Type: float
| | ... | - stdev - Standard deviation of critical load [pps]. Type: float
-| | ... | - framesize - L2 Frame Size [B]. Type: integer
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer
| | ...
| | ... | *Returns:*
| | ... | - Lower and upper bound of critical load [pps]. Type: 2-tuple of float
@@ -317,15 +213,15 @@
| | ...
| | ... | \| Display result of soak search \| \${100000} \| \${100} \| \${64} \|
| | ...
-| | [Arguments] | ${avg} | ${stdev} | ${framesize}
+| | [Arguments] | ${avg} | ${stdev} | ${frame_size}
| | ...
-| | ${framesize} = | Get Average Frame Size | ${framesize}
+| | ${frame_size} = | Get Average Frame Size | ${frame_size}
| | ${avg} = | Convert To Number | ${avg}
| | ${stdev} = | Convert To Number | ${stdev}
| | ${lower} = | Evaluate | ${avg} - ${stdev}
| | ${upper} = | Evaluate | ${avg} + ${stdev}
-| | Display single bound | PLRsearch lower bound: | ${lower} | ${framesize}
-| | Display single bound | PLRsearch upper bound: | ${upper} | ${framesize}
+| | Display single bound | PLRsearch lower bound: | ${lower} | ${frame_size}
+| | Display single bound | PLRsearch upper bound: | ${upper} | ${frame_size}
| | Return From Keyword | ${lower} | ${upper}
| Check NDRPDR interval validity
@@ -356,31 +252,6 @@
| | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other}
| | Fail | ${message}
-| Perform additional measurements based on NDRPDR result
-| | [Documentation]
-| | ... | Perform any additional measurements which are not directly needed
-| | ... | for determining NDR nor PDR, but which are needed for gathering
-| | ... | additional data for debug purposes.
-| | ... | Currently, just "Traffic should pass with no loss" is called.
-| | ... | TODO: Move latency measurements from optimized search here.
-| | ...
-| | ... | *Arguments:*
-| | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | - topology_type - Topology type. Type: string
-| | ...
-| | ... | *Example:*
-| | ... | \| Perform additional measurements based on NDRPDR result \
-| | ... | \| \${result} \| ${64} \| 3-node-IPv4 \|
-| | ...
-| | [Arguments] | ${result} | ${framesize} | ${topology_type}
-| | ...
-| | ${duration}= | Set Variable | 5.0
-| | ${rate_per_stream}= | Evaluate
-| | ... | ${result.ndr_interval.measured_low.target_tr} / 2.0
-| | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
-| | ... | ${framesize} | ${topology_type} | fail_on_loss=${False}
-
| Traffic should pass with no loss
| | [Documentation]
| | ... | Send traffic at specified rate. No packet loss is accepted at loss
@@ -389,8 +260,8 @@
| | ... | *Arguments:*
| | ... | - duration - Duration of traffic run [s]. Type: integer
| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
-| | ... | - topology_type - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
+| | ... | - traffic_profile - Topology type. Type: string
| | ... | - fail_on_loss - If True, the keyword fails if loss occurred.
| | ... | Type: boolean
| | ...
@@ -399,22 +270,27 @@
| | ... | \| Traffic should pass with no loss \| 10 \| 4.0mpps \| 64 \
| | ... | \| 3-node-IPv4 \|
| | ...
-| | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
+| | [Arguments] | ${duration} | ${rate} | ${frame_size} | ${traffic_profile}
| | ... | ${fail_on_loss}=${True}
| | ...
-| | Send traffic at specified rate | ${duration} | ${rate} | ${framesize}
-| | ... | ${topology_type}
+| | Send traffic at specified rate | ${duration} | ${rate} | ${frame_size}
+| | ... | ${traffic_profile}
| | Run Keyword If | ${fail_on_loss} | No traffic loss occurred
| Traffic should pass with maximum rate
| | [Documentation]
| | ... | Send traffic at maximum rate.
| | ...
+| | ... | Some inputs are read from variables to streamline suites.
+| | ...
+| | ... | *Test (or broader scope) variables read:*
+| | ... | - traffic_profile - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
+| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
+| | ... | Type: float
+| | ...
| | ... | *Arguments:*
-| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
-| | ... | - topology_type - Topology type. Type: string
-| | ... | - subsamples - How many trials in this measurement. Type:int
+| | ... | - subsamples - How many trials in this measurement. Type: int
| | ... | - trial_duration - Duration of single trial [s]. Type: float
| | ... | - fail_no_traffic - Whether to fail on zero receive count. Type: boolean
| | ... | - unidirection - False if traffic is bidirectional. Type: boolean
@@ -423,18 +299,16 @@
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Traffic should pass with maximum rate \| 4.0mpps \| 64 \
-| | ... | \| 3-node-IPv4 \| ${1} \| ${10.0} \| ${False}
-| | ... | \| ${False} \| ${0} | ${1} \|
+| | ... | \| Traffic should pass with maximum rate \| ${1} \| ${10.0} \|
+| | ... | \| ${False} \| ${False} \| ${0} \| ${1} \|
| | ...
-| | [Arguments] | ${rate} | ${framesize} | ${topology_type}
-| | ... | ${trial_duration}=${perf_trial_duration} | ${fail_no_traffic}=${True}
-| | ... | ${subsamples}=${perf_trial_multiplicity}
+| | [Arguments] | ${trial_duration}=${perf_trial_duration}
+| | ... | ${fail_no_traffic}=${True} | ${subsamples}=${perf_trial_multiplicity}
| | ... | ${unidirection}=${False} | ${tx_port}=${0} | ${rx_port}=${1}
| | ...
-| | ${results} = | Send traffic at specified rate | ${trial_duration} | ${rate}
-| | ... | ${framesize} | ${topology_type} | ${subsamples} | ${unidirection}
-| | ... | ${tx_port} | ${rx_port}
+| | ${results} = | Send traffic at specified rate | ${trial_duration}
+| | ... | ${max_rate}pps | ${frame_size} | ${traffic_profile} | ${subsamples}
+| | ... | ${unidirection} | ${tx_port} | ${rx_port}
| | Set Test Message | ${\n}Maximum Receive Rate trial results
| | Set Test Message | in packets per second: ${results}
| | ... | append=yes
@@ -446,12 +320,13 @@
| | [Documentation]
| | ... | Send traffic at specified rate.
| | ... | Return list of measured receive rates.
+| | ... | The rate argument should be TRex friendly, so it should include "pps".
| | ...
| | ... | *Arguments:*
| | ... | - trial_duration - Duration of single trial [s]. Type: float
| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B]. Type: integer/string
-| | ... | - topology_type - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B]. Type: integer/string
+| | ... | - traffic_profile - Topology type. Type: string
| | ... | - subsamples - How many trials in this measurement. Type: int
| | ... | - unidirection - False if traffic is bidirectional. Type: boolean
| | ... | - tx_port - TX port of TG, default 0. Type: integer
@@ -462,12 +337,12 @@
| | ... | \| Send traffic at specified rate \| ${1.0} \| 4.0mpps \| 64 \
| | ... | \| 3-node-IPv4 \| ${10} \| ${False} \| ${0} | ${1} \|
| | ...
-| | [Arguments] | ${trial_duration} | ${rate} | ${framesize}
-| | ... | ${topology_type} | ${subsamples}=${1} | ${unidirection}=${False}
+| | [Arguments] | ${trial_duration} | ${rate} | ${frame_size}
+| | ... | ${traffic_profile} | ${subsamples}=${1} | ${unidirection}=${False}
| | ... | ${tx_port}=${0} | ${rx_port}=${1}
| | ...
| | Clear and show runtime counters with running traffic | ${trial_duration}
-| | ... | ${rate} | ${framesize} | ${topology_type}
+| | ... | ${rate} | ${frame_size} | ${traffic_profile}
| | ... | ${unidirection} | ${tx_port} | ${rx_port}
| | Run Keyword If | ${dut_stats}==${True} | Clear all counters on all DUTs
| | Run Keyword If | ${dut_stats}==${True} and ${pkt_trace}==${True}
@@ -478,8 +353,8 @@
| | :FOR | ${i} | IN RANGE | ${subsamples}
| | | # The following line is skipping some default arguments,
| | | # that is why subsequent arguments have to be named.
-| | | Send traffic on tg | ${trial_duration} | ${rate} | ${framesize}
-| | | ... | ${topology_type} | warmup_time=${0} | unidirection=${unidirection}
+| | | Send traffic on tg | ${trial_duration} | ${rate} | ${frame_size}
+| | | ... | ${traffic_profile} | warmup_time=${0} | unidirection=${unidirection}
| | | ... | tx_port=${tx_port} | rx_port=${rx_port}
| | | ${rx} = | Get Received
| | | ${rr} = | Evaluate | ${rx} / ${trial_duration}
@@ -501,8 +376,8 @@
| | ... | *Arguments:*
| | ... | - duration - Duration of traffic run [s]. Type: integer
| | ... | - rate - Rate for sending packets. Type: string
-| | ... | - framesize - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
-| | ... | - topology_type - Topology type. Type: string
+| | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string
+| | ... | - traffic_profile - Topology type. Type: string
| | ... | - unidirection - False if traffic is bidirectional. Type: boolean
| | ... | - tx_port - TX port of TG, default 0. Type: integer
| | ... | - rx_port - RX port of TG, default 1. Type: integer
@@ -512,10 +387,11 @@
| | ... | \| Clear and show runtime counters with running traffic \| 10 \
| | ... | \| 4.0mpps \| 64 \| 3-node-IPv4 \| ${False} \| ${0} | ${1} \|
| | ...
-| | [Arguments] | ${duration} | ${rate} | ${framesize} | ${topology_type}
+| | [Arguments] | ${duration} | ${rate} | ${frame_size} | ${traffic_profile}
| | ... | ${unidirection}=${False} | ${tx_port}=${0} | ${rx_port}=${1}
| | ...
-| | Send traffic on tg | ${-1} | ${rate} | ${framesize} | ${topology_type}
+| | # Duration of -1 means we will stop traffic manually.
+| | Send traffic on tg | ${-1} | ${rate} | ${frame_size} | ${traffic_profile}
| | ... | warmup_time=${0} | async_call=${True} | latency=${False}
| | ... | unidirection=${unidirection} | tx_port=${tx_port} | rx_port=${rx_port}
| | Run Keyword If | ${dut_stats}==${True}
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 8f1924250f..59fd83d5ee 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -106,21 +106,21 @@
| | ... | *Arguments:*
| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs
| | ... | (Optional). Type: integer, default value: ${1}
-| | ... | - topology_type - Topology type.
+| | ... | - traffic_type - A value affecting behavior, such as spoofing.
| | ... | (Optional). Type: string, default value: L2
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Configure AVF device on all DUTs \| ${1} \| L2 \|
| | ...
-| | [Arguments] | ${numvfs}=${1} | ${topology_type}=L2
+| | [Arguments] | ${numvfs}=${1} | ${traffic_type}=L2
| | ...
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1}
-| | | ... | numvfs=${numvfs} | topology_type=${topology_type}
+| | | ... | numvfs=${numvfs} | traffic_type=${traffic_type}
| | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2}
-| | | ... | numvfs=${numvfs} | topology_type=${topology_type}
+| | | ... | numvfs=${numvfs} | traffic_type=${traffic_type}
# Currently only one AVF is supported.
| | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]}
| | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]}