aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/container.robot25
-rw-r--r--resources/libraries/robot/shared/default.robot146
-rw-r--r--resources/libraries/robot/shared/interfaces.robot138
-rw-r--r--resources/libraries/robot/shared/memif.robot2
-rw-r--r--resources/libraries/robot/shared/suite_setup.robot161
-rw-r--r--resources/libraries/robot/shared/suite_teardown.robot18
-rw-r--r--resources/libraries/robot/shared/test_setup.robot7
-rw-r--r--resources/libraries/robot/shared/test_teardown.robot37
-rw-r--r--resources/libraries/robot/shared/traffic.robot57
-rw-r--r--resources/libraries/robot/shared/vm.robot17
10 files changed, 439 insertions, 169 deletions
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index 06ac1209e5..9f08e6b1d4 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2024 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:
@@ -84,9 +84,9 @@
| | ... | ${nf_dtc}
| | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
| | ${env}= | Create List | DEBIAN_FRONTEND=noninteractive
-| | ${dut1_uuid_length} = | Get Length | ${DUT1_UUID}
-| | ${root}= | Run Keyword If | ${dut1_uuid_length}
-| | ... | Get Docker Mergeddir | ${nodes['DUT1']} | ${DUT1_UUID}
+| | ${in_container}= | Running in Container | ${nodes['${dut}']}
+| | ${root}= | Run Keyword If | ${in_container}
+| | ... | Get Docker Mergeddir | ${nodes['${dut}']}
| | ... | ELSE | Set Variable | ${EMPTY}
| | ${node_arch}= | Get Node Arch | ${nodes['${dut}']}
| | ${name}= | Set Variable | ${dut}_${container_group}${nf_id}${DUT1_UUID}
@@ -106,7 +106,7 @@
| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | &{cont_args}= | Create Dictionary
| | ... | name=${name} | node=${nodes['${dut}']} | mnt=${mnt} | env=${env}
-| | ... | root=${root}
+| | ... | root=${root} | page_size=${page_size}
| | Run Keyword If | ${pinning}
| | ... | Set To Dictionary | ${cont_args} | cpuset_cpus=${nf_cpus}
| | Run Keyword | ${container_group}.Construct container | &{cont_args}
@@ -240,6 +240,10 @@
| | ... | ${container_chain_topology}
| | ... | dut1_if=${DUT1_${int}2}[0]
| | ... | dut2_if=${DUT2_${int}2}[0]
+| | ... | ELSE IF | '${container_chain_topology}' == 'chain_dma'
+| | ... | ${group}.Configure VPP In All Containers
+| | ... | ${container_chain_topology}
+| | ... | dma_wqs=${DUT1_dma_wqs}
| | ... | ELSE
| | ... | ${group}.Configure VPP In All Containers
| | ... | ${container_chain_topology}
@@ -325,14 +329,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}
-| | ${rxq_count_int}= | Run keyword if | ${rx_queues}
+| | ... | 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}/2)
+| | ... | 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 853f567cf6..2dc78941b3 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2024 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:
@@ -25,13 +25,18 @@
| Library | resources.libraries.python.CpuUtils
| Library | resources.libraries.python.CoreDumpUtil
| Library | resources.libraries.python.DUTSetup
+| Library | resources.libraries.python.FlowUtil
| Library | resources.libraries.python.L2Util
| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.IPTopology
| Library | resources.libraries.python.IPUtil
| Library | resources.libraries.python.IPv6Util
+| Library | resources.libraries.python.IrqUtil
+| Library | resources.libraries.python.model.ExportJson
| Library | resources.libraries.python.NodePath
| Library | resources.libraries.python.Namespaces
| Library | resources.libraries.python.PapiHistory
+| Library | resources.libraries.python.QATUtil
| Library | resources.libraries.python.SchedUtils
| Library | resources.libraries.python.Tap
| Library | resources.libraries.python.Tap.TapFeatureMask
@@ -40,6 +45,7 @@
| Library | resources.libraries.python.topology.Topology
| Library | resources.libraries.python.Trace
| Library | resources.libraries.python.VhostUser.VirtioFeatureMask
+| Library | resources.libraries.python.VppConfigGenerator.VppInitConfig
| Library | resources.libraries.python.VppCounters
| Library | resources.libraries.python.VPPUtil
|
@@ -72,18 +78,15 @@
*** Variables ***
| ${cpu_alloc_str}= | ${0}
+| ${page_size}= | ${DEFAULT_HUGEPAGE_SIZE}
*** Keywords ***
-# TODO: Sort keywords alphabetically.
-
| Call Resetter
| | [Documentation]
| | ... | Check for a presence of test variable \${resetter}.
| | ... | If it exists (and not None), call the resetter (as a Python callable).
| | ... | This is usually used to reset any state on DUT before next trial.
| |
-| | ... | TODO: Move to a more specific library if needed.
-| |
| | ... | *Example:*
| |
| | ... | \| Call Resetter \|
@@ -94,29 +97,6 @@
| | # Parens are there to perform the call.
| | Run Keyword If | $resetter | Evaluate | $resetter()
-| 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
-| | ... | try to initialize/disable.
-| |
-| | ... | *Arguments:*
-| | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx; default
-| | ... | value: HW_DH895xcc. Type: string
-| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs; default
-| | ... | value: ${32} Type: integer
-| | ... | - force_init - Force to initialize. Type: boolean
-| |
-| | ... | *Example:*
-| |
-| | ... | \| Configure crypto device on all DUTs \| HW_DH895xcc \| ${32} \|
-| |
-| | [Arguments] | ${crypto_type} | ${numvfs} | ${force_init}=${False}
-| |
-| | FOR | ${dut} | IN | @{duts}
-| | | Crypto Device Verify | ${nodes['${dut}']} | ${crypto_type}
-| | | ... | ${numvfs} | force_init=${force_init}
-| | END
-
| Configure kernel module on all DUTs
| | [Documentation] | Verify if specific kernel module is loaded on all DUTs.
| | ... | If parameter force_load is set to True, then try to load.
@@ -168,18 +148,21 @@
| | | Run Keyword | ${dut}.Set Node | ${nodes['${dut}']} | node_key=${dut}
| | | Run Keyword | ${dut}.Add Unix Log
| | | Run Keyword | ${dut}.Add Unix CLI Listen
-| | | Run Keyword | ${dut}.Add Unix Nodaemon
+| | | Run Keyword | ${dut}.Add Unix CLI No Pager
+| | | Run Keyword | ${dut}.Add Unix GID
+| | | Run Keyword | ${dut}.Add API Segment Prefix | ${dut}
| | | Run Keyword | ${dut}.Add Unix Coredump
| | | Run Keyword | ${dut}.Add Socksvr | ${SOCKSVR_PATH}
-| | | Run Keyword | ${dut}.Add Main Heap Size | ${${heap_size_mult}*${2}}G
-| | | Run Keyword | ${dut}.Add Main Heap Page Size | 2M
-| | | Run Keyword | ${dut}.Add Statseg Size | 2G
-| | | Run Keyword | ${dut}.Add Statseg Page Size | 2M
+| | | Run Keyword | ${dut}.Add Main Heap Size | ${${heap_size_mult}*${3}}G
+| | | Run Keyword | ${dut}.Add Main Heap Page Size | ${page_size}
+| | | Run Keyword | ${dut}.Add Default Hugepage Size | ${page_size}
+| | | Run Keyword | ${dut}.Add Statseg Size | 3G
+| | | Run Keyword | ${dut}.Add Statseg Page Size | ${page_size}
| | | Run Keyword | ${dut}.Add Statseg Per Node Counters | on
| | | Run Keyword | ${dut}.Add Plugin | disable | default
| | | Run Keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable}
| | | Run Keyword | ${dut}.Add IP6 Hash Buckets | 2000000
-| | | Run Keyword | ${dut}.Add IP6 Heap Size | 4G
+| | | Run Keyword | ${dut}.Add IP6 Heap Size | 3G
| | | Run Keyword | ${dut}.Add Graph Node Variant | ${GRAPH_NODE_VARIANT}
| | END
@@ -189,9 +172,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
@@ -206,69 +187,46 @@
| | [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}
+| | Create compute resources variables
+| | ... | ${phy_cores} | rx_queues=${rx_queues} | rxd=${rxd} | txd=${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} | ${2}
-| | | ${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 | ${dut}.Add CPU Main Core | ${${dut}_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
+| | | ... | ${dut}.Add CPU Corelist Workers | ${${dut}_cpu_wt}
+| | | 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 DPDK VLAN strip offload switch off between DUTs
+| Create compute resources variables
| | [Documentation]
-| | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
-| | ... | configuration file.
-| |
-| | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
-| | | ${_even}= | Evaluate | ${pf} % 2
-| | | Run Keyword Unless | ${even}
-| | | ... | DUT1.Add DPDK Dev Parameter | ${DUT1_${int}${pf}_pci}[0]
-| | | ... | vlan-strip-offload | off
-| | END
-| | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
-| | | ${_even}= | Evaluate | ${pf} % 2
-| | | Run Keyword If | ${even}
-| | | ... | DUT2.Add DPDK Dev Parameter | ${DUT2_${int}${pf}_pci}[0]
-| | | ... | vlan-strip-offload | off
+| | ... | Create compute resources variables
+| |
+| | ... | _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}
+| | | Set Test Variable | ${${variable}} | ${value}
| | END
+| | 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 NAT to all DUTs
| | [Documentation] | Add NAT configuration to all DUTs.
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index a9b6440173..4af68d0e28 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2024 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:
@@ -22,7 +22,7 @@
| Set single interfaces in path up
| | [Documentation]
| | ... | *Set UP state on single physical VPP interfaces in path on all DUT
-| | ... | nodes and set maximal MTU.*
+| | ... | nodes.*
| |
| | ... | *Arguments:*
| | ... | - pf - NIC physical function (physical port).
@@ -41,8 +41,7 @@
| Set interfaces in path up
| | [Documentation]
-| | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set
-| | ... | maximal MTU.*
+| | ... | *Set UP state on VPP interfaces in path on all DUT nodes.*
| |
| | ... | *Arguments:*
| | ... | - validate - Validate interfaces are up.
@@ -58,8 +57,7 @@
| Set interfaces in path up on node
| | [Documentation]
-| | ... | *Set UP state on VPP interfaces in path on specified DUT node and
-| | ... | set maximal MTU.*
+| | ... | *Set UP state on VPP interfaces in path on specified DUT node.*
| |
| | ... | *Arguments:*
| | ... | - dut - DUT node on which to set the interfaces up.
@@ -77,8 +75,7 @@
| Set interfaces in path up on node on PF
| | [Documentation]
-| | ... | *Set UP state on VPP interfaces in path on specified DUT node and
-| | ... | set maximal MTU.*
+| | ... | *Set UP state on VPP interfaces in path on specified DUT node.*
| |
| | ... | *Arguments:*
| | ... | - dut - DUT node on which to set the interfaces up.
@@ -97,7 +94,6 @@
| | ${_id}= | Set Variable If | '${_chains}' == 'PASS' | _1 | ${EMPTY}
| | FOR | ${if} | IN | @{${dut}_${int}${pf}${_id}}
| | | Set Interface State | ${nodes['${dut}']} | ${if} | up
-| | | VPP Set Interface MTU | ${nodes['${dut}']} | ${if}
| | END
| Pre-initialize layer driver
@@ -137,7 +133,8 @@
| | Run Keyword If | ${index} >= 0 | Return From Keyword
| | FOR | ${dut} | IN | @{duts}
| | | Stop VPP Service | ${nodes['${dut}']}
-| | | PCI Driver Unbind List | ${nodes['${dut}']} | @{${dut}_pf_pci}
+| | | Unbind PCI Devices From Other Driver | ${nodes['${dut}']} | vfio-pci |
+| | | ... | @{${dut}_pf_pci}
| | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci}
| | | Run Keyword If | ${dpdk_no_tx_checksum_offload}
| | | ... | ${dut}.Add DPDK No Tx Checksum Offload
@@ -151,12 +148,9 @@
| | | 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
-| | ... | Variable Should Exist | ${vlan_strip_off}
-| | Run keyword If | '${_vlan_strip}' == 'PASS' and ${duts_count} == 2
-| | ... | Add DPDK VLAN strip offload switch off between DUTs
| Pre-initialize layer avf on all DUTs
| | [Documentation]
@@ -164,15 +158,29 @@
| |
| | No operation
+| Pre-initialize layer af_xdp on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize af_xdp driver.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Set Interface State PCI
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | state=up
+| | | Set Interface XDP off
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci}
+| | | Set Interface Channels
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | num_queues=${rxq_count_int}
+| | | ... | channel=combined
+| | END
+
| Pre-initialize layer rdma-core on all DUTs
| | [Documentation]
| | ... | Pre-initialize rdma-core driver.
| |
| | FOR | ${dut} | IN | @{duts}
+| | | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci}
+| | | ... | mtu=${recommended_mtu}
| | | Set Interface Flow Control
-| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rx="off" | tx="off"
-| | | Set PCI Parameter
-| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | key="68.w" | value="3BCD"
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rxf="off" | txf="off"
| | END
| Pre-initialize layer mlx5_core on all DUTs
@@ -180,14 +188,26 @@
| | ... | Pre-initialize mlx5_core driver.
| |
| | FOR | ${dut} | IN | @{duts}
-| | | Run Keyword If | ${jumbo}
-| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=9200
-| | | ... | ELSE
-| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=1500
| | | Set Interface Flow Control
-| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rx="off" | tx="off"
-| | | Set PCI Parameter
-| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | key="68.w" | value="3BCD"
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rxf="off" | txf="off"
+| | END
+| | ${index}= | Get Index From List | ${TEST TAGS} | DPDK
+| | Run Keyword If | ${index} >= 0 | Return From Keyword
+| | FOR | ${dut} | IN | @{duts}
+| | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci}
+| | | Run Keyword If | ${dpdk_no_tx_checksum_offload}
+| | | ... | ${dut}.Add DPDK No Tx Checksum Offload
+| | | Run Keyword | ${dut}.Add DPDK Log Level | debug
+| | | Run Keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int}
+| | | Run Keyword If | not ${jumbo}
+| | | ... | ${dut}.Add DPDK No Multi Seg
+| | | Run Keyword If | ${nic_rxq_size} > 0
+| | | ... | ${dut}.Add DPDK Dev Default RXD | ${nic_rxq_size}
+| | | 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 | ${dp_count_int}
+| | | Run Keyword | ${dut}.Add DPDK Max Simd Bitwidth | ${GRAPH_NODE_VARIANT}
| | END
| Initialize layer driver
@@ -326,7 +346,7 @@
| Initialize layer vfio-pci on node
| | [Documentation]
| | ... | Initialize vfio-pci interfaces on DUT on NIC PF.
-| | ... | Currently no operation.
+| | ... | Currently just set MTU to the recommended value.
| |
| | ... | *Arguments:*
| | ... | - dut - DUT node. Type: string
@@ -338,7 +358,9 @@
| |
| | [Arguments] | ${dut} | ${pf}
| |
-| | No operation
+| | Set Interface State | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | down
+| | VPP Set Interface MTU
+| | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | mtu=${recommended_mtu}
| Initialize layer avf on node
| | [Documentation]
@@ -377,6 +399,32 @@
| | | Set List Value | ${${dut}_vf${pf}_vlan} | ${vf} | ${_vlan}
| | END
+| Initialize layer af_xdp on node
+| | [Documentation]
+| | ... | Initialize AF_XDP (eBPF) interfaces on DUT on NIC PF.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node. Type: string
+| | ... | - pf - NIC physical function (physical port). Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer af_xdp on node \| DUT1 \| 1 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | ${_af_xdp}= | VPP Create AF XDP Interface
+| | ... | ${nodes['${dut}']} | ${${dut}_vf${pf}}[0]
+| | ... | num_rx_queues=${65535}
+| | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size}
+| | ${cpu_skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM}+${CPU_CNT_MAIN}
+| | ${cpu_skip_cnt}= | Evaluate | ${cpu_skip_cnt}+${cpu_count_int}
+| | ${cpu_skip_cnt}= | Evaluate | ${cpu_skip_cnt}+(${pf}-${1})*${rxq_count_int}
+| | Set Interface IRQs Affinity
+| | ... | ${nodes['${dut}']} | ${_af_xdp}
+| | ... | cpu_skip_cnt=${cpu_skip_cnt} | cpu_cnt=${rxq_count_int}
+| | Set List Value | ${${dut}_vf${pf}} | 0 | ${_af_xdp}
+
| Initialize layer rdma-core on node
| | [Documentation]
| | ... | Initialize rdma-core (Mellanox VPP) interfaces on DUT on NIC PF.
@@ -400,9 +448,21 @@
| Initialize layer mlx5_core on node
| | [Documentation]
| | ... | Initialize mlx5_core interfaces on DUT on NIC PF.
-| | ... | Currently no operation.
+| | ... | Currently just set MTU to the recommended value.
| |
-| | No operation
+| | ... | *Arguments:*
+| | ... | - dut - DUT node. Type: string
+| | ... | - pf - NIC physical function (physical port). Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer rdma-core on node \| DUT1 \| 1 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | Set Interface State | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | down
+| | VPP Set Interface MTU
+| | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | mtu=${recommended_mtu}
| Initialize layer interface
| | [Documentation]
@@ -792,3 +852,23 @@
| |
| | ${vhost_dump}= | Vhost User Dump | ${dut}
| | Return From Keyword | ${vhost_dump}
+
+| Lower DUT1-DUT2 MTU For Fragmentation
+| | [Documentation] | Set lower MTU on both ends of DUT1-DUT2 link.
+| |
+| | ... | This should force VPP to fragment (and reassembly) packets.
+| | ... | Should be called after Initialize Layer Interface.
+| | ... | Suite variables such as \${dut2_if1} should be defined by then.
+| |
+| | ... | As VPP (at least dpdk plugin) require interface to be down
+| | ... | before MTU can be changed, interfaces are temporarily downed.
+| |
+| | # TODO: ip_reassembly_set to increase max_reassembly_length so jumbo passes.
+| | Set Interface State | ${nodes['DUT1']} | ${dut1_if2} | down
+| | Set Interface State | ${nodes['DUT2']} | ${dut2_if1} | down
+| | VPP Set Interface MTU
+| | ... | ${nodes['DUT1']} | ${dut1_if2} | ${MTU_FOR_FRAGMENTATION}
+| | VPP Set Interface MTU
+| | ... | ${nodes['DUT2']} | ${dut2_if1} | ${MTU_FOR_FRAGMENTATION}
+| | Set Interface State | ${nodes['DUT1']} | ${dut1_if2} | up
+| | Set Interface State | ${nodes['DUT2']} | ${dut2_if1} | up
diff --git a/resources/libraries/robot/shared/memif.robot b/resources/libraries/robot/shared/memif.robot
index 50051ca413..e3f3ddc793 100644
--- a/resources/libraries/robot/shared/memif.robot
+++ b/resources/libraries/robot/shared/memif.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2021 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:
diff --git a/resources/libraries/robot/shared/suite_setup.robot b/resources/libraries/robot/shared/suite_setup.robot
index a9e57e7024..5c92ad9f52 100644
--- a/resources/libraries/robot/shared/suite_setup.robot
+++ b/resources/libraries/robot/shared/suite_setup.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 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:
@@ -16,12 +16,16 @@
*** Settings ***
| Library | resources.libraries.python.DPDK.DPDKTools
| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.NGINX.NGINXTools
+| Library | resources.tools.ab.ABTools
+| Library | resources.libraries.python.Iperf3
| Library | resources.libraries.python.NodePath
| Library | resources.libraries.python.topology.Topology
| Library | resources.libraries.python.TrafficGenerator
| Variables | resources/libraries/python/Constants.py
|
| Documentation | Suite setup keywords.
+
*** Keywords ***
| Create suite topology variables
| | [Documentation]
@@ -81,12 +85,14 @@
| |
| | [Arguments] | @{actions}
| |
+| | Start Suite Setup Export
| | ${nic_model_list}= | Create list | ${nic_name}
| | &{info}= | Compute Circular Topology
| | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs}
| | ... | always_same_link=${False} | topo_has_tg=${True}
| | Set suite variable | &{topology_info} | &{info}
| | Create suite topology variables | @{actions}
+| | Finalize Suite Setup Export
| Setup suite topology interfaces with no TG
| | [Documentation]
@@ -102,17 +108,43 @@
| |
| | [Arguments] | @{actions}
| |
+| | Start Suite Setup Export
| | ${nic_model_list}= | Create list | ${nic_name}
| | &{info}= | Compute Circular Topology
| | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs}
| | ... | always_same_link=${True} | topo_has_tg=${False}
| | Set suite variable | &{topology_info} | &{info}
| | Create suite topology variables | @{actions}
+| | Finalize Suite Setup Export
+
+| Setup suite topology interfaces with no DUT
+| | [Documentation]
+| | ... | Common suite setup for single link tests with no device under test
+| | ... | node.
+| | ... |
+| | ... | Compute path for testing on given topology nodes in circular topology
+| | ... | based on interface model provided as an argument and set
+| | ... | corresponding suite variables.
+| |
+| | ... | *Arguments:*
+| | ... | - ${actions} - Additional setup action. Type: list
+| |
+| | [Arguments] | @{actions}
+| |
+| | Start Suite Setup Export
+| | ${nic_model_list}= | Create list | ${nic_name}
+| | &{info}= | Compute Circular Topology
+| | ... | ${nodes} | filter_list=${nic_model_list} | nic_pfs=${nic_pfs}
+| | ... | always_same_link=${True} | topo_has_tg=${True} | topo_has_dut=${False}
+| | Set suite variable | &{topology_info} | &{info}
+| | Create suite topology variables | @{actions}
+| | Finalize Suite Setup Export
| Additional Suite Setup Action For scapy
| | [Documentation]
| | ... | Additional Setup for suites which uses scapy as Traffic generator.
| |
+| | Export TG Type And Version | scapy | 2.4.3
| | FOR | ${dut} | IN | @{duts}
| | | Set Suite Variable | ${${dut}_vf1} | ${${dut}_${int}1}
| | | Set Suite Variable | ${${dut}_vf2} | ${${dut}_${int}2}
@@ -124,6 +156,8 @@
| | [Documentation]
| | ... | Additional Setup for suites which uses dpdk.
| |
+| | ${version} = | Get Dpdk Version | ${nodes}[DUT1]
+| | Export Dut Type And Version | dpdk | ${version}
| | FOR | ${dut} | IN | @{duts}
| | | Initialize DPDK Framework | ${nodes['${dut}']}
| | | ... | ${${dut}_${int}1}[0] | ${${dut}_${int}2}[0] | ${nic_driver}
@@ -139,15 +173,15 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Additional Suite Setup Action For performance_dut \| DUT1 \|
+| | ... | \| Additional Suite Setup Action For performance vf \| DUT1 \|
| |
| | [Arguments] | ${dut}
| |
| | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
| | | ${_vf}=
-| | | ... | Run Keyword | Init ${nic_driver} interface
-| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | numvfs=${nic_vfs}
-| | | ... | osi_layer=${osi_layer}
+| | | ... | Run Keyword | Init interface
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | driver=${nic_driver}
+| | | ... | numvfs=${nic_vfs} | osi_layer=${osi_layer}
| | | ${_mac}=
| | | ... | Create List | ${EMPTY}
| | | ${_ip4_addr}=
@@ -174,6 +208,26 @@
| | Set Suite Variable
| | ... | ${int} | prevf
+| Additional Suite Setup Action For performance pf
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement for
+| | ... | single DUT (inner loop).
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node. Type: string
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Additional Suite Setup Action For performance pf \| DUT1 \|
+| |
+| | [Arguments] | ${dut}
+| |
+| | FOR | ${pf} | IN RANGE | 1 | ${nic_pfs} + 1
+| | | Run Keyword | Init interface
+| | | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0] | driver=${nic_driver}
+| | | ... | numvfs=${0} | osi_layer=${osi_layer}
+| | END
+
| Additional Suite Setup Action For performance
| | [Documentation]
| | ... | Additional Setup for suites which uses performance measurement.
@@ -181,20 +235,93 @@
| | FOR | ${dut} | IN | @{duts}
| | | Run Keyword If | ${nic_vfs} > 0
| | | ... | Additional Suite Setup Action For performance vf | ${dut}
+| | | ... | ELSE
+| | | ... | Additional Suite Setup Action For performance pf | ${dut}
| | END
-| | Initialize traffic generator
-| | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0]
-| | ... | ${dut1} | ${DUT1_${int}1}[0]
-| | ... | ${dut${duts_count}} | ${DUT${duts_count}_${int}2}[0]
-| | ... | ${osi_layer}
+| | ${type} = | Get TG Type | ${nodes}[TG]
+| | ${version} = | Get TG Version | ${nodes}[TG]
+| | Export TG Type And Version | ${type} | ${version}
+| | Initialize traffic generator | ${osi_layer} | ${nic_pfs}
+
+| Additional Suite Setup Action For performance_tg_nic
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement
+| | ... | for L1 cross connect tests.
+| |
+| | ${type} = | Get TG Type | ${nodes}[TG]
+| | ${version} = | Get TG Version | ${nodes}[TG]
+| | Export Dut Type And Version | ${type} | ${version}
+| | Export TG Type And Version | ${type} | ${version}
+| | Initialize traffic generator | ${osi_layer} | ${nic_pfs}
-| Additional Suite Setup Action For ipsechw
+| Additional Suite Setup Action For iPerf3
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement over
+| | ... | iPerf3.
+| |
+| | ${type} = | Get iPerf Type
+| | ${version} = | Get iPerf Version | ${nodes}[TG]
+| | Export TG Type And Version | ${type} | ${version}
+
+| Additional Suite Setup Action For cryptohw
| | [Documentation]
| | ... | Additional Setup for suites which uses QAT HW.
| |
-| | ${numvfs}= | Set Variable If
-| | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32}
-| | ... | '${crypto_type}' == 'HW_C3xxx' | ${16}
-| | Configure crypto device on all DUTs | ${crypto_type} | numvfs=${numvfs}
-| | ... | force_init=${True}
-| | Configure kernel module on all DUTs | vfio_pci | force_load=${True}
+| | Crypto Device Verify on all DUTs | ${nodes}
+
+| Additional Suite Setup Action For nginx
+| | [Documentation]
+| | ... | Additional Setup for suites which uses Nginx.
+| |
+| | Install NGINX framework on all DUTs | ${nodes} | ${packages_dir}
+| | ... | ${nginx_version}
+
+| Additional Suite Setup Action For vppecho
+| | [Documentation]
+| | ... | Additional Setup for suites which uses performance measurement over
+| | ... | VPP Echo.
+| |
+| | Export DUT Type And Version | ${DUT_TYPE} | ${DUT_VERSION}
+| | Export TG Type And Version | ${DUT_TYPE} | ${DUT_VERSION}
+
+| Additional Suite Setup Action For ab
+| | [Documentation]
+| | ... | Additional Setup for suites which uses ab TG.
+| |
+| | Iface update numa node | ${tg}
+| | ${running}= | Is TRex running | ${tg}
+| | Run keyword if | ${running}==${True} | Teardown traffic generator | ${tg}
+| | ${curr_driver}= | Get PCI dev driver | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf1}[0]']['pci_address']}
+| | Run keyword if | '${curr_driver}'!='${None}'
+| | ... | PCI Driver Unbind | ${tg} |
+| | ... | ${tg['interfaces']['${TG_pf1}[0]']['pci_address']}
+| | ${driver}= | Get Variable Value
+| | ... | ${tg['interfaces']['${TG_pf1}[0]']['driver']}
+| | PCI Driver Bind | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf1}[0]']['pci_address']} | ${driver}
+| | ${intf_name}= | Get Linux interface name | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf1}[0]']['pci_address']}
+| | FOR | ${ip_addr} | IN | @{ab_ip_addrs}
+| | | ${ip_addr_on_intf}= | Linux interface has IP | ${tg} | ${intf_name}
+| | | ... | ${ip_addr} | ${ab_ip_prefix}
+| | | Run Keyword If | ${ip_addr_on_intf}==${False} | Set Linux interface IP
+| | | ... | ${tg} | ${intf_name} | ${ip_addr} | ${ab_ip_prefix}
+| | END
+| | Set Linux interface up | ${nodes}[TG] | ${intf_name}
+| | ${curr_driver}= | Get PCI dev driver | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf2}[0]']['pci_address']}
+| | Run keyword if | '${curr_driver}'!='${None}'
+| | ... | PCI Driver Unbind | ${tg} |
+| | ... | ${tg['interfaces']['${TG_pf2}[0]']['pci_address']}
+| | ${driver}= | Get Variable Value
+| | ... | ${tg['interfaces']['${TG_pf2}[0]']['driver']}
+| | PCI Driver Bind | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf2}[0]']['pci_address']} | ${driver}
+| | ${intf_name}= | Get Linux interface name | ${tg}
+| | ... | ${tg['interfaces']['${TG_pf2}[0]']['pci_address']}
+| | Set Linux interface up | ${nodes}[TG] | ${intf_name}
+| | Check AB | ${tg}
+| | ${type} = | Get AB Type | ${nodes}[TG]
+| | ${version} = | Get AB Version | ${nodes}[TG]
+| | Export TG Type And Version | ${type} | ${version}
diff --git a/resources/libraries/robot/shared/suite_teardown.robot b/resources/libraries/robot/shared/suite_teardown.robot
index f164b0eeb5..810c8bb066 100644
--- a/resources/libraries/robot/shared/suite_teardown.robot
+++ b/resources/libraries/robot/shared/suite_teardown.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 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:
@@ -30,10 +30,25 @@
| |
| | [Arguments] | @{actions}
| |
+| | Start Suite Teardown Export
| | FOR | ${action} | IN | @{actions}
| | | Run Keyword | Additional Suite Tear Down Action For ${action}
| | END
| | Remove All Added VIF Ports On All DUTs From Topology | ${nodes}
+| | Finalize Suite Teardown Export
+
+| Additional Suite Tear Down Action For ab
+| | [Documentation]
+| | ... | Additional teardown for suites which uses ab.
+| |
+| | ${intf_name}= | Get Linux interface name | ${tg}
+| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
+| | FOR | ${ip_addr} | IN | @{ab_ip_addrs}
+| | | ${ip_addr_on_intf}= | Linux Interface Has IP | ${tg} | ${intf_name}
+| | | ... | ${ip_addr} | ${ab_ip_prefix}
+| | | Run Keyword If | ${ip_addr_on_intf}==${True} | Delete Linux Interface IP
+| | | ... | ${tg} | ${intf_name} | ${ip_addr} | ${ab_ip_prefix}
+| | END
| Additional Suite Tear Down Action For performance
| | [Documentation]
@@ -58,3 +73,4 @@
| | FOR | ${dut} | IN | @{duts}
| | | Kill Program | ${nodes['${dut}']} | iperf3
| | | Kill Program | ${nodes['${dut}']} | vpp_echo
+| | END
diff --git a/resources/libraries/robot/shared/test_setup.robot b/resources/libraries/robot/shared/test_setup.robot
index b5b9e57cf7..22e017fd6f 100644
--- a/resources/libraries/robot/shared/test_setup.robot
+++ b/resources/libraries/robot/shared/test_setup.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2022 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:
@@ -21,13 +21,14 @@
*** Keywords ***
| Setup test
| | [Documentation]
-| | ... | Common test setup for tests.
+| | ... | Common test setup for VPP tests.
| |
| | ... | *Arguments:*
| | ... | - ${actions} - Additional setup action. Type: list
| |
| | [Arguments] | @{actions}
| |
+| | Start Test Export
| | Reset PAPI History On All DUTs | ${nodes}
| | ${int} = | Set Variable If | ${nic_vfs} > 0 | prevf | pf
| | Create base startup configuration of VPP on all DUTs
@@ -48,4 +49,4 @@
| | ... | Additional Setup for tests which uses namespace.
| |
| | ${trex_running}= | Is Trex Running | ${tg}
-| | Run Keyword Unless | ${trex_running} | Startup Trex | ${tg} | ${osi_layer}
+| | Run Keyword If | not ${trex_running} | Startup Trex | ${tg} | ${osi_layer}
diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot
index 18be67cfc5..f590e8a7cd 100644
--- a/resources/libraries/robot/shared/test_teardown.robot
+++ b/resources/libraries/robot/shared/test_teardown.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:
@@ -14,7 +14,7 @@
"""Keywords used in test teardowns."""
*** Settings ***
-| Resource | resources/libraries/robot/shared/container.robot
+| Resource | resources/libraries/robot/shared/default.robot
| Library | resources.libraries.python.PapiHistory
| Library | resources.libraries.python.topology.Topology
| Variables | resources/libraries/python/Constants.py
@@ -45,6 +45,7 @@
| | | Run Keyword | Additional Test Tear Down Action For ${action}
| | END
| | Clean Sockets On All Nodes | ${nodes}
+| | Finalize Test Export
| Tear down test raw
| | [Documentation]
@@ -60,6 +61,7 @@
| | | Run Keyword | Additional Test Tear Down Action For ${action}
| | END
| | Clean Sockets On All Nodes | ${nodes}
+| | Finalize Test Export
# Additional Test Tear Down Actions in alphabetical order
| Additional Test Tear Down Action For acl
@@ -86,6 +88,14 @@
| | | Destroy all '${container_group}' containers
| | END
+| Additional Test Tear Down Action For nginx
+| | [Documentation]
+| | ... | Additional teardown for tests which uses nginx.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Kill Program | ${nodes['${dut}']} | nginx
+| | END
+
| Additional Test Tear Down Action For det44
| | [Documentation]
| | ... | Additional teardown for tests which uses DET44 feature.
@@ -120,6 +130,16 @@
| | | ... | Show Ipsec Security Association | ${nodes['${dut}']}
| | END
+| Additional Test Tear Down Action For ipsec_all
+| | [Documentation]
+| | ... | Additional teardown for tests which use varied IPSec configuration.
+| | ... | Databases.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Run Keyword If Test Failed
+| | | ... | Vpp Ipsec Show All | ${nodes['${dut}']}
+| | END
+
| Additional Test Tear Down Action For linux_bridge
| | [Documentation]
| | ... | Additional teardown for tests which uses linux_bridge.
@@ -162,18 +182,25 @@
| |
| | Show Packet Trace on All DUTs | ${nodes}
+| Additional Test Tear Down Action For telemetry
+| | [Documentation]
+| | ... | Additional teardown for tests which uses telemetry reads.
+| |
+| | Run Telemetry On All DUTs
+| | ... | ${nodes} | profile=${telemetry_profile}.yaml
+
| Additional Test Tear Down Action For performance
| | [Documentation]
| | ... | Additional teardown for tests which uses performance measurement.
| | ... | Optionally, call \${resetter} (if defined) to reset DUT state.
| |
-| | ... | TODO: Document what test variables are required or optional.
-| |
| | Run Keyword If Test Passed | Return From Keyword
| | ${use_latency} = | Get Use Latency
| | ${rate_for_teardown} = | Get Rate For Teardown
| | Call Resetter
| | Set Test Variable | \${extended_debug} | ${True}
+| | Set Test Variable | ${telemetry_rate} | ${EMPTY}
+| | Set Test Variable | ${telemetry_export} | ${False}
| | Send traffic at specified rate
| | ... | trial_duration=${1.0}
| | ... | rate=${rate_for_teardown}
@@ -207,4 +234,4 @@
| |
| | ${vnf_status} | ${value}= | Run Keyword And Ignore Error
| | ... | Keyword Should Exist | vnf_manager.Kill All VMs
-| | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs \ No newline at end of file
+| | Run Keyword If | '${vnf_status}' == 'PASS' | vnf_manager.Kill All VMs
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index 08f579c9df..af348bb12e 100644
--- a/resources/libraries/robot/shared/traffic.robot
+++ b/resources/libraries/robot/shared/traffic.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 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:
@@ -652,3 +652,58 @@
| | ... | --tun_vni ${tun_vni} | --tun_src_ip ${tun_src_ip}
| | ... | --tun_dst_ip ${tun_dst_ip}
| | Run Traffic Script On Node | geneve_tunnel.py | ${node} | ${args}
+
+| Send flow packet and verify action
+| | [Documentation] | Send packet and verify the correctness of flow action.
+| |
+| | ... | *Arguments:*
+| |
+| | ... | _NOTE:_ Arguments are based on topology:
+| | ... | TG(if1)->(if1)DUT
+| |
+| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary
+| | ... | - tx_interface - TG Interface 1. Type: string
+| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string
+| | ... | - flow_type - Flow packet type. Type: string
+| | ... | - proto - Flow packet protocol. Type: string
+| | ... | - src_ip - Source ip address. Type: string
+| | ... | - dst_ip - Destination IP address. Type: string
+| | ... | - src_port - Source port. Type: int
+| | ... | - dst_port - Destination port. Type: int
+| | ... | - value - Additional packet value. Type: integer
+| | ... | - traffic_script - Traffic script that send packet. Type: string
+| | ... | - action - drop, mark or redirect-to-queue. Type: string
+| | ... | - action_value - action value. Type: integer
+| |
+| | ... | *Return:*
+| | ... | - No value returned
+| |
+| | ... | *Example:*
+| | ... | \| Send flow packet and verify actions \| ${nodes['TG']} \| eth2 \
+| | ... | \| 08:00:27:a2:52:5b \| IP4 \| UDP \
+| | ... | \| src_ip=1.1.1.1 \| dst_ip=2.2.2.2 \
+| | ... | \| src_port=${100} \| dst_port=${200} \
+| | ... | \| traffic_script=send_flow_packet \
+| | ... | \|action=mark \| action_value=${3} \|
+| |
+| | [Arguments] | ${tg_node} | ${tx_interface} | ${tx_dst_mac}
+| | ... | ${flow_type} | ${proto}
+| | ... | ${src_ip}=${None} | ${dst_ip}=${None}
+| | ... | ${src_port}=${None} | ${dst_port}=${None}
+| | ... | ${value}=${None}
+| | ... | ${traffic_script}=send_flow_packet
+| | ... | ${action}=redirect-to-queue
+| | ... | ${action_value}=${3}
+| |
+| | ${tx_src_mac}= | Get Interface Mac | ${tg_node} | ${tx_interface}
+| | ${tx_if_name}= | Get interface name | ${tg_node} | ${tx_interface}
+| | ${args}= | Catenate
+| | ... | --tg_if1_mac ${tx_src_mac} | --dut_if1_mac ${tx_dst_mac}
+| | ... | --tx_if ${tx_if_name} | --flow_type ${flow_type} | --proto ${proto}
+| | ... | --src_ip ${src_ip} | --dst_ip ${dst_ip}
+| | ... | --src_port ${src_port} | --dst_port ${dst_port}
+| | ... | --value ${value}
+| | Run Traffic Script On Node | ${traffic_script}.py | ${tg_node} | ${args}
+| | Vpp Verify Flow action | ${dut1} | ${action} | ${action_value}
+| | ... | ${tx_src_mac} | ${tx_dst_mac}
+| | ... | ${src_ip} | ${dst_ip}
diff --git a/resources/libraries/robot/shared/vm.robot b/resources/libraries/robot/shared/vm.robot
index eb6acb371f..5b45718a03 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:
@@ -38,7 +38,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Configure chains of VMs connected via vhost-user
+| | ... | \| Configure chains of NFs connected via vhost-user
| | ... | \| 1 \| 1 \| False \| 1024 \| False \| False \| vpp \| True \|
| |
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${jumbo}=${False}
@@ -59,7 +59,7 @@
| | ... | vnf=${vnf} | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | ... | rxq_count_int=${rxq_count_int}
-| | ... | virtio_feature_mask=${virtio_feature_mask}
+| | ... | 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}
@@ -114,10 +114,11 @@
| | ... | vnf=${vnf} | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | ... | rxq_count_int=${rxq_count_int}
-| | ... | virtio_feature_mask=${virtio_feature_mask}
+| | ... | 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}
+| | ${cpu_alloc_str}= | Catenate | SEPARATOR=,
+| | ... | ${${node}_cpu_alloc_str} | ${cpu_wt}
+| | Set Test Variable | ${${node}_cpu_alloc_str} | ${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
@@ -143,7 +144,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Configure chains of VMs connected via passtrough
+| | ... | \| Configure chains of NFs connected via passtrough
| | ... | \| 1 \| 1 \| False \| 1024 \| False \| False \| vpp \| True \|
| |
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${jumbo}=${False}
@@ -164,7 +165,7 @@
| | ... | vnf=${vnf} | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | ... | rxq_count_int=${rxq_count_int}
-| | ... | virtio_feature_mask=${virtio_feature_mask}
+| | ... | virtio_feature_mask=${virtio_feature_mask} | page_size=${page_size}
| | ... | if1=${DUT1_${int}1}[0] | if2=${DUT1_${int}2}[0]
| | ${cpu_wt}= | Run Keyword | vnf_manager.Start All VMs | pinning=${pinning}
| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt}