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.robot152
-rw-r--r--resources/libraries/robot/shared/interfaces.robot256
-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.robot158
-rw-r--r--resources/libraries/robot/shared/traffic.robot148
-rw-r--r--resources/libraries/robot/shared/vm.robot69
10 files changed, 742 insertions, 254 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 641cfa5cb1..2dc78941b3 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.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:
@@ -20,24 +20,32 @@
| Library | OperatingSystem
| Library | String
|
+| Library | resources.libraries.python.Adl
| Library | resources.libraries.python.Classify
| Library | resources.libraries.python.CpuUtils
| Library | resources.libraries.python.CoreDumpUtil
-| Library | resources.libraries.python.Cop
| 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
| Library | resources.libraries.python.TestConfig
| Library | resources.libraries.python.TGSetup
| 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
|
@@ -57,7 +65,6 @@
| Resource | resources/libraries/robot/overlay/lisp.robot
| Resource | resources/libraries/robot/overlay/lispgpe.robot
| Resource | resources/libraries/robot/overlay/lisp_api.robot
-| Resource | resources/libraries/robot/performance/performance_limits.robot
| Resource | resources/libraries/robot/performance/performance_utils.robot
| Resource | resources/libraries/robot/shared/interfaces.robot
| Resource | resources/libraries/robot/shared/container.robot
@@ -71,30 +78,24 @@
*** Variables ***
| ${cpu_alloc_str}= | ${0}
+| ${page_size}= | ${DEFAULT_HUGEPAGE_SIZE}
*** Keywords ***
-| 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
+| 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.
| |
| | ... | *Example:*
| |
-| | ... | \| Configure crypto device on all DUTs \| HW_DH895xcc \| ${32} \|
+| | ... | \| Call Resetter \|
| |
-| | [Arguments] | ${crypto_type} | ${numvfs} | ${force_init}=${False}
-| |
-| | FOR | ${dut} | IN | @{duts}
-| | | Crypto Device Verify | ${nodes['${dut}']} | ${crypto_type}
-| | | ... | ${numvfs} | force_init=${force_init}
-| | END
+| | ${resetter} = | Get Resetter
+| | # See http://robotframework.org/robotframework/3.1.2/libraries/BuiltIn.html
+| | # #Evaluating%20expressions for $variable (without braces) syntax.
+| | # Parens are there to perform the call.
+| | Run Keyword If | $resetter | Evaluate | $resetter()
| Configure kernel module on all DUTs
| | [Documentation] | Verify if specific kernel module is loaded on all DUTs.
@@ -147,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
@@ -168,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
@@ -185,68 +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_count_int}= | Run Keyword If | ${rx_queues}
-| | | ... | Set variable | ${rx_queues}
-| | | ... | ELSE | Evaluate | int(${thr_count_int}/2)
-| | | ${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 4fdc1ee0a6..b4d6959d01 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.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:
@@ -16,13 +16,14 @@
| Library | resources.libraries.python.VhostUser
*** Variables ***
+| ${dpdk_enable_tcp_udp_checksum}= | ${False}
| ${dpdk_no_tx_checksum_offload}= | ${True}
*** Keywords ***
| 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,18 +42,23 @@
| 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.
+| | ... | Type: boolean
+| |
+| | [Arguments] | ${validate}=${True}
| |
| | FOR | ${dut} | IN | @{duts}
| | | Set interfaces in path up on node | ${dut}
| | END
-| | All VPP Interfaces Ready Wait | ${nodes} | retries=${60}
+| | Run Keyword If | ${validate}
+| | ... | All VPP Interfaces Ready Wait | ${nodes} | retries=${60}
| 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.
@@ -70,8 +76,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.
@@ -90,7 +95,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
@@ -109,6 +113,18 @@
| |
| | Run Keyword | Pre-initialize layer ${driver} on all DUTs
+| Pre-initialize layer tap on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize tap driver. Currently no operation.
+| |
+| | No operation
+
+| Pre-initialize layer vhost on all DUTs
+| | [Documentation]
+| | ... | Pre-initialize vhost driver. Currently no operation.
+| |
+| | No operation
+
| Pre-initialize layer vfio-pci on all DUTs
| | [Documentation]
| | ... | Pre-initialize vfio-pci driver by adding related sections to startup
@@ -118,13 +134,22 @@
| | 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_enable_tcp_udp_checksum}
+| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum
| | | 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 Uio Driver | vfio-pci
| | | Run Keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int}
+| | | Run Keyword If | '${nic_name}' == 'Amazon-Nitro-100G'
+| | | ... | ${dut}.Add DPDK Dev Default Devargs |
+| | | ... | "normal_llq_hdr=1,enable_llq=1,control_path_poll_interval=0"
+| | | Run Keyword If | '${nic_name}' == 'Amazon-Nitro-200G'
+| | | ... | ${dut}.Add DPDK Dev Default Devargs |
+| | | ... | "normal_llq_hdr=1,enable_llq=1,control_path_poll_interval=0"
| | | Run Keyword If | not ${jumbo}
| | | ... | ${dut}.Add DPDK No Multi Seg
| | | Run Keyword If | ${nic_rxq_size} > 0
@@ -132,12 +157,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]
@@ -145,15 +167,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
@@ -161,14 +197,28 @@
| | ... | 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_enable_tcp_udp_checksum}
+| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum
+| | | 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
@@ -179,18 +229,20 @@
| | ... | *Arguments:*
| | ... | - driver - NIC driver used in test [vfio-pci|avf|rdma-core].
| | ... | Type: string
+| | ... | - validate - Validate interfaces are up.
+| | ... | Type: boolean
| |
| | ... | *Example:*
| |
| | ... | \| Initialize layer driver \| vfio-pci \|
| |
-| | [Arguments] | ${driver}
+| | [Arguments] | ${driver} | ${validate}=${True}
| |
| | FOR | ${dut} | IN | @{duts}
| | | Initialize layer driver on node | ${dut} | ${driver}
| | END
| | Set Test Variable | ${int} | vf
-| | Set interfaces in path up
+| | Set interfaces in path up | validate=${validate}
| Initialize layer driver on node
| | [Documentation]
@@ -236,10 +288,76 @@
| | | Run Keyword | Initialize layer ${driver} on node | ${dut} | ${pf}
| | END
+| Initialize layer tap on node
+| | [Documentation]
+| | ... | Initialize tap interfaces on DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node.
+| | ... | Type: string
+| | ... | - pf - TAP ID (logical port).
+| | ... | Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer tap on node \| DUT1 \| 0 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | Create Namespace
+| | ... | ${nodes['${dut}']} | tap${${pf}-1}_namespace
+| | ${tap_feature_mask}= | Create Tap feature mask | gso=${enable_gso}
+| | ${_tap}=
+| | ... | And Add Tap Interface | ${nodes['${dut}']} | tap${${pf}-1}
+| | ... | host_namespace=tap${${pf}-1}_namespace
+| | ... | num_rx_queues=${rxq_count_int}
+| | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size}
+| | ... | tap_feature_mask=${tap_feature_mask}
+| | ${_mac}=
+| | ... | Get Interface MAC | ${nodes['${dut}']} | tap${pf}
+| | ${_tap}= | Create List | ${_tap}
+| | ${_mac}= | Create List | ${_mac}
+| | Vhost User Affinity
+| | ... | ${nodes['${dut}']} | ${${dut}_pf${pf}}[0]
+| | ... | skip_cnt=${${CPU_CNT_MAIN}+${CPU_CNT_SYSTEM}+${cpu_count_int}}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}} | ${_tap}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}_mac} | ${_mac}
+
+| Initialize layer vhost on node
+| | [Documentation]
+| | ... | Initialize vhost interfaces on DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT node.
+| | ... | Type: string
+| | ... | - pf - VHOST ID (logical port).
+| | ... | Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Initialize layer vhost on node \| DUT1 \| 0 \|
+| |
+| | [Arguments] | ${dut} | ${pf}
+| |
+| | ${virtio_feature_mask}= | Create Virtio feature mask | gso=${enable_gso}
+| | ${vhost}= | Vpp Create Vhost User Interface
+| | ... | ${nodes['${dut}']} | /var/run/vpp/sock-${pf}-1
+| | ... | is_server=${True} | virtio_feature_mask=${virtio_feature_mask}
+| | ${_mac}=
+| | ... | Get Interface MAC | ${nodes['${dut}']} | vhost${pf}
+| | ${_vhost}= | Create List | ${_vhost}
+| | ${_mac}= | Create List | ${_mac}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}} | ${_vhost}
+| | Set Test Variable
+| | ... | ${${dut}_vf${pf}_mac} | ${_mac}
+
| 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
@@ -251,7 +369,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]
@@ -290,6 +410,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.
@@ -313,9 +459,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]
@@ -415,9 +573,9 @@
| | ... | ${nodes['${dut}']} | ${bond_mode} | load_balance=${lb_mode}
| | ... | mac=00:00:00:01:01:01
| | Set Interface State | ${nodes['${dut}']} | ${if_index} | up
-| | VPP Enslave Physical Interface
+| | VPP Add Bond Member
| | ... | ${nodes['${dut}']} | ${${dut}_${int}1_1} | ${if_index}
-| | VPP Enslave Physical Interface
+| | VPP Add Bond Member
| | ... | ${nodes['${dut}']} | ${${dut}_${int}2_1} | ${if_index}
| | FOR | ${id} | IN RANGE | 1 | ${count} + 1
| | | Set Test Variable | ${${dut}_bond1_${id}} | ${if_index}
@@ -661,8 +819,8 @@
| | ... | Type: string
| | ... | - ${is_server} - Server side of connection (Optional).
| | ... | Type: boolean
-| | ... | - ${enable_gso} - Generic segmentation offloading (Optional).
-| | ... | Type: boolean
+| | ... | - ${virtio_feature_mask} - Enabled Virtio feature flags (Optional).
+| | ... | Type: integer
| |
| | ... | _NOTE:_ This KW sets following test case variable:
| | ... | - ${${vhost_if1}} - First Vhost-User interface.
@@ -675,14 +833,14 @@
| |
| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vhost_if1}=vhost_if1
| | ... | ${vhost_if2}=vhost_if2 | ${is_server}=${False}
-| | ... | ${enable_gso}=${False}
+| | ... | ${virtio_feature_mask}=${None}
| |
| | ${vhost_1}= | Vpp Create Vhost User Interface
| | ... | ${dut_node} | ${sock1} | is_server=${is_server}
-| | ... | enable_gso=${enable_gso}
+| | ... | virtio_feature_mask=${virtio_feature_mask}
| | ${vhost_2}= | Vpp Create Vhost User Interface
| | ... | ${dut_node} | ${sock2} | is_server=${is_server}
-| | ... | enable_gso=${enable_gso}
+| | ... | virtio_feature_mask=${virtio_feature_mask}
| | ${vhost_1_key}= | Get Interface By SW Index | ${dut_node} | ${vhost_1}
| | ${vhost_2_key}= | Get Interface By SW Index | ${dut_node} | ${vhost_2}
| | ${vhost_1_mac}= | Get Interface MAC | ${dut_node} | ${vhost_1_key}
@@ -705,3 +863,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 93c4574c83..f590e8a7cd 100644
--- a/resources/libraries/robot/shared/test_teardown.robot
+++ b/resources/libraries/robot/shared/test_teardown.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:
@@ -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,21 +61,24 @@
| | | Run Keyword | Additional Test Tear Down Action For ${action}
| | END
| | Clean Sockets On All Nodes | ${nodes}
+| | Finalize Test Export
-| Additional Test Tear Down Action For performance
+# Additional Test Tear Down Actions in alphabetical order
+| Additional Test Tear Down Action For acl
| | [Documentation]
-| | ... | Additional teardown for tests which uses performance measurement.
+| | ... | Additional teardown for tests which uses ACL feature.
| |
| | Run Keyword If Test Failed
-| | ... | Send traffic at specified rate | ${1.0} | 10000
-| | ... | ${frame_size} | ${traffic_profile} | trial_multiplicity=${1}
-| | ... | extended_debug=${True}
+| | ... | Vpp Log Plugin Acl Settings | ${dut1}
+| | Run Keyword If Test Failed
+| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
-| Additional Test Tear Down Action For packet_trace
+| Additional Test Tear Down Action For classify
| | [Documentation]
-| | ... | Additional teardown for tests which uses packet trace.
+| | ... | Additional teardown for tests which uses classify tables.
| |
-| | Show Packet Trace on All DUTs | ${nodes}
+| | Run Keyword If Test Failed
+| | ... | Show Classify Tables Verbose on all DUTs | ${nodes}
| Additional Test Tear Down Action For container
| | [Documentation]
@@ -84,50 +88,56 @@
| | | Destroy all '${container_group}' containers
| | END
-| Additional Test Tear Down Action For vhost
+| Additional Test Tear Down Action For nginx
| | [Documentation]
-| | ... | Additional teardown for tests which uses vhost(s) and VM(s).
+| | ... | Additional teardown for tests which uses nginx.
| |
-| | Show VPP vhost on all DUTs | ${nodes}
-| | ${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
+| | FOR | ${dut} | IN | @{duts}
+| | | Kill Program | ${nodes['${dut}']} | nginx
+| | END
-| Additional Test Tear Down Action For vhost-pt
+| Additional Test Tear Down Action For det44
| | [Documentation]
-| | ... | Additional teardown for tests which uses pci-passtrough and VM(s).
+| | ... | Additional teardown for tests which uses DET44 feature.
| |
-| | ${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
+| | FOR | ${dut} | IN | @{duts}
+| | | Run Keyword If Test Failed
+| | | ... | Show DET44 verbose | ${nodes['${dut}']}
+| | END
-| Additional Test Tear Down Action For det44
+| Additional Test Tear Down Action For geneve4
| | [Documentation]
-| | ... | Additional teardown for tests which uses DET44 feature.
+| | ... | Additional teardown for tests which uses GENEVE IPv4 tunnel.
| |
| | FOR | ${dut} | IN | @{duts}
-#| | | Run Keyword If Test Failed
-#| | | ... | Show DET44 verbose | ${nodes['${dut}']}
-| | | Show DET44 verbose | ${nodes['${dut}']}
+| | | Run Keyword If Test Failed
+| | | ... | Show Geneve Tunnel Data | ${nodes['${dut}']}
| | END
-| Additional Test Tear Down Action For nat-ed
+| Additional Test Tear Down Action For iPerf3
| | [Documentation]
-| | ... | Additional teardown for tests which uses NAT feature.
+| | ... | Additional teardown for test which uses iPerf3 server.
+| |
+| | Run Keyword And Ignore Error
+| | ... | Teardown iPerf | ${nodes['${iperf_server_node}']}
+
+| Additional Test Tear Down Action For ipsec_sa
+| | [Documentation]
+| | ... | Additional teardown for tests which uses IPSec security association.
| |
| | FOR | ${dut} | IN | @{duts}
-| | | Show NAT Config | ${nodes['${dut}']}
-| | | Show NAT44 Summary | ${nodes['${dut}']}
-| | | Show NAT Base Data | ${nodes['${dut}']}
-| | | Vpp Get Ip Table Summary | ${nodes['${dut}']}
+| | | Run Keyword If Test Failed
+| | | ... | Show Ipsec Security Association | ${nodes['${dut}']}
| | END
-| Additional Test Tear Down Action For namespace
+| Additional Test Tear Down Action For ipsec_all
| | [Documentation]
-| | ... | Additional teardown for tests which uses namespace.
+| | ... | Additional teardown for tests which use varied IPSec configuration.
+| | ... | Databases.
| |
| | FOR | ${dut} | IN | @{duts}
-| | | Clean Up Namespaces | ${nodes['${dut}']}
+| | | Run Keyword If Test Failed
+| | | ... | Vpp Ipsec Show All | ${nodes['${dut}']}
| | END
| Additional Test Tear Down Action For linux_bridge
@@ -138,15 +148,6 @@
| | | Linux Del Bridge | ${nodes['${dut}']} | ${bid_TAP}
| | END
-| Additional Test Tear Down Action For acl
-| | [Documentation]
-| | ... | Additional teardown for tests which uses ACL feature.
-| |
-| | Run Keyword If Test Failed
-| | ... | Vpp Log Plugin Acl Settings | ${dut1}
-| | Run Keyword If Test Failed
-| | ... | Vpp Log Plugin Acl Interface Assignment | ${dut1}
-
| Additional Test Tear Down Action For macipacl
| | [Documentation]
| | ... | Additional teardown for tests which uses MACIP ACL feature.
@@ -156,12 +157,56 @@
| | Run Keyword If Test Failed
| | ... | Vpp Log Macip Acl Interface Assignment | ${dut1}
-| Additional Test Tear Down Action For classify
+| Additional Test Tear Down Action For namespace
| | [Documentation]
-| | ... | Additional teardown for tests which uses classify tables.
+| | ... | Additional teardown for tests which uses namespace.
| |
-| | Run Keyword If Test Failed
-| | ... | Show Classify Tables Verbose on all DUTs | ${nodes}
+| | FOR | ${dut} | IN | @{duts}
+| | | Clean Up Namespaces | ${nodes['${dut}']}
+| | END
+
+| Additional Test Tear Down Action For nat-ed
+| | [Documentation]
+| | ... | Additional teardown for tests which uses NAT feature.
+| |
+| | FOR | ${dut} | IN | @{duts}
+| | | Show NAT44 Config | ${nodes['${dut}']}
+| | | Show NAT44 Summary | ${nodes['${dut}']}
+| | | Show NAT Base Data | ${nodes['${dut}']}
+| | | Vpp Get Ip Table Summary | ${nodes['${dut}']}
+| | END
+
+| Additional Test Tear Down Action For packet_trace
+| | [Documentation]
+| | ... | Additional teardown for tests which uses packet trace.
+| |
+| | 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.
+| |
+| | 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}
+| | ... | trial_multiplicity=${1}
+| | ... | use_latency=${use_latency}
+| | ... | duration_limit=${1.0}
| Additional Test Tear Down Action For srv6
| | [Documentation]
@@ -173,3 +218,20 @@
| | ... | Show SR Steering Policies on all DUTs | ${nodes}
| | Run Keyword If Test Failed
| | ... | Show SR LocalSIDs on all DUTs | ${nodes}
+
+| Additional Test Tear Down Action For vhost
+| | [Documentation]
+| | ... | Additional teardown for tests which uses vhost(s) and VM(s).
+| |
+| | Show VPP vhost on all DUTs | ${nodes}
+| | ${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
+
+| Additional Test Tear Down Action For vhost-pt
+| | [Documentation]
+| | ... | Additional teardown for tests which uses pci-passtrough and VM(s).
+| |
+| | ${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
diff --git a/resources/libraries/robot/shared/traffic.robot b/resources/libraries/robot/shared/traffic.robot
index 1f10787bc1..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:
@@ -61,7 +61,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Send packet and verify headers \| ${nodes['TG']} \| 10.0.0.1 \
+| | ... | \| Send packet and verify headers \| \${nodes['TG']} \| 10.0.0.1 \
| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \|
| |
@@ -120,7 +120,7 @@
| | ... | *Example:*
| |
| | ... | \| Packet transmission from port to port should fail \
-| | ... | \| ${nodes['TG']} \| 10.0.0.1 \ \| 32.0.0.1 \| eth2 \
+| | ... | \| \${nodes['TG']} \| 10.0.0.1 \ \| 32.0.0.1 \| eth2 \
| | ... | \| 08:00:27:a2:52:5b \| eth3 \| 08:00:27:4d:ca:7a \
| | ... | \| 08:00:27:ee:fd:b3 \| 08:00:27:7d:fd:10 \|
| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port}
@@ -150,7 +150,7 @@
| | ... | - dst_ip - Packet destination IP address. Type: string
| |
| | ... | *Example:*
-| | ... | \| Send packet and verify marking \| ${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| Send packet and verify marking \| \${nodes['TG']} \| eth1 \| eth2 \
| | ... | \| 08:00:27:87:4d:f7 \| 52:54:00:d4:d8:22 \| 192.168.122.2 \
| | ... | \| 192.168.122.1 \|
| |
@@ -190,9 +190,9 @@
| | ... | *Example:*
| |
| | ... | \| Send VXLAN encapsulated packet and verify received packet \
-| | ... | \| ${tg_node} \| port4 \| port4 \
+| | ... | \| \${tg_node} \| port4 \| port4 \
| | ... | \| fa:16:3e:6d:f9:c5 \| fa:16:3e:e6:6d:9a \| 192.168.0.1 \
-| | ... | \| 192.168.0.2 \| ${101} \| 192.168.0.2 \| 192.168.0.1 \| ${102} \|
+| | ... | \| 192.168.0.2 \| ${101} \| 192.168.0.2 \| 192.168.0.1 \| \${102} \|
| |
| | [Arguments] | ${tg_node} | ${tx_if} | ${rx_if}
| | ... | ${tx_src_mac} | ${tx_dst_mac}
@@ -231,7 +231,7 @@
| | ... | *Example:*
| |
| | ... | \| Send ICMP echo request and verify answer \
-| | ... | \| ${nodes['TG']} \| eth2 \
+| | ... | \| \${nodes['TG']} \| eth2 \
| | ... | \| 08:00:27:46:2b:4c \| 08:00:27:66:b8:57 \
| | ... | \| 192.168.23.10 \| 192.168.23.1 \| 10 \|
| |
@@ -270,14 +270,14 @@
| | ... | - r_tunnel - Remote tunnel IP address (optional). Type: string
| |
| | ... | *Example:*
-| | ... | \| ${encr_alg}= \| Crypto Alg AES CBC 128 \|
-| | ... | \| ${auth_alg}= \| Integ Alg SHA1 96 \|
+| | ... | \| \${encr_alg}= \| Crypto Alg AES CBC 128 \|
+| | ... | \| \${auth_alg}= \| Integ Alg SHA1 96 \|
| | ... | \| Send IPsec Packet and verify ESP encapsulation in received packet\
-| | ... | \| ${nodes['TG']} \| eth1 \| eth2 \
-| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| ${encr_alg} \
+| | ... | \| \${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| \${encr_alg} \
| | ... | \| sixteenbytes_key \| ${auth_alg} \| twentybytessecretkey \
-| | ... | \| ${1001} \| ${1000} \| 192.168.3.3 \| 192.168.4.4 \| 192.168.100.2 \
-| | ... | \| 192.168.100.3 \|
+| | ... | \| \${1001} \| \00} \| 192.168.3.3 \| 192.168.4.4 \
+| | ... | \| 192.168.100.2 \| 192.168.100.3 \|
| |
| | [Arguments] | ${node} | ${tx_interface} | ${rx_interface} | ${tx_dst_mac}
| | ... | ${rx_src_mac} | ${crypto_alg} | ${crypto_key} | ${integ_alg}
@@ -329,7 +329,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \
+| | ... | \| Send packet and verify LISP encap \| \${nodes['TG']} \| 10.0.0.1 \
| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \
| | ... | \| 10.0.1.2 \|
@@ -373,14 +373,14 @@
| | ... | - dst_tun - Destination tunnel IP address. Type: string
| |
| | ... | *Example:*
-| | ... | \| ${encr_alg}= \| Crypto Alg AES CBC 128 \|
-| | ... | \| ${auth_alg}= \| Integ Alg SHA1 96 \|
+| | ... | \| \${encr_alg}= \| Crypto Alg AES CBC 128 \|
+| | ... | \| \${auth_alg}= \| Integ Alg SHA1 96 \|
| | ... | \| Send IPsec Packet and verify ESP encapsulation in received packet\
-| | ... | \| ${nodes['TG']} \| eth1 \| eth2 \
-| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| ${encr_alg} \
-| | ... | \| sixteenbytes_key \| ${auth_alg} \| twentybytessecretkey \
-| | ... | \| ${1001} \| ${1000} \| 192.168.3.3 \| 192.168.4.4 \| 192.168.100.2 \
-| | ... | \| 192.168.100.3 \|
+| | ... | \| \${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| \${encr_alg} \
+| | ... | \| sixteenbytes_key \| \${auth_alg} \| twentybytessecretkey \
+| | ... | \| \${1001} \| \${1000} \| 192.168.3.3 \| 192.168.4.4 \
+| | ... | \| 192.168.100.2 \| 192.168.100.3 \|
| |
| | [Arguments] | ${node} | ${tx_interface} | ${rx_interface} | ${tx_dst_mac}
| | ... | ${rx_src_mac} | ${crypto_alg} | ${crypto_key} | ${integ_alg}
@@ -429,7 +429,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Send packet and verify LISP GPE encap \| ${nodes['TG']} \
+| | ... | \| Send packet and verify LISP GPE encap \| \${nodes['TG']} \
| | ... | \| 10.0.0.1 \| 32.0.0.1 \
| | ... | \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \
@@ -476,7 +476,7 @@
| |
| | ... | *Example:*
| |
-| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \
+| | ... | \| Send packet and verify LISP encap \| \${nodes['TG']} \| 10.0.0.1 \
| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \
| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \
| | ... | \| 10.0.1.2 \|
@@ -529,7 +529,7 @@
| |
| | ... | *Example:*
| | ... | \| Send IPv6 Packet and verify SRv6 encapsulation in received packet\
-| | ... | \| ${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| \${nodes['TG']} \| eth1 \| eth2 \
| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| 2002:1:: \
| | ... | \| 2003:2:: \| 2003:1:: \| 2002:2:: \| decap=${False} \
| | ... | \| tg_dstsid3=2002:4:: \| dut_dstsid3=2003:4:: \
@@ -589,7 +589,7 @@
| | ... | *Example:*
| |
| | ... | \| Send TCP or UDP packet and verify network address translations \
-| | ... | \| ${nodes['TG']} \| port1 \| port2 \| 08:00:27:cc:4f:54 \
+| | ... | \| \${nodes['TG']} \| port1 \| port2 \| 08:00:27:cc:4f:54 \
| | ... | \| 08:00:27:c9:6a:d5 \| 192.168.0.0 \| 68.142.68.0 \| 20.0.0.0 \
| | ... | \| TCP \| 1024 \| 8080 \|
| |
@@ -609,3 +609,101 @@
| | ... | --src_port_in ${src_port_in} | --src_port_out ${src_port_out}
| | ... | --dst_port ${dst_port}
| | Run Traffic Script On Node | nat.py | ${tg_node} | ${args}
+
+| Send IP packet and verify GENEVE encapsulation in received packets
+| | [Documentation] | Send IP packet from TG to DUT. Receive GENEVE packet\
+| | ... | from DUT on TG and verify GENEVE encapsulation. Send GENEVE packet in\
+| | ... | opposite direction and verify received IP packet.
+| |
+| | ... | *Arguments:*
+| | ... | - node - TG node. Type: dictionary
+| | ... | - tx_interface - TG Interface 1. Type: string
+| | ... | - rx_interface - TG Interface 2. Type: string
+| | ... | - tx_dst_mac - Destination MAC for TX interface / DUT interface 1 MAC.
+| | ... | Type: string
+| | ... | - rx_src_mac - Source MAC for RX interface / DUT interface 2 MAC.
+| | ... | Type: string
+| | ... | - tun_local_ip - GENEVE tunnel source IP address. Type: string
+| | ... | - tun_remote_ip - GENEVE tunnel destination IP address. Type: string
+| | ... | - tun_vni - GENEVE tunnel VNI. Type: integer
+| | ... | - tun_src_ip - Source IP address of original IP packet / inner source
+| | ... | IP address of GENEVE packet. Type: string
+| | ... | - tun_dst_ip - Destination IP address of original IP packet / inner
+| | ... | destination IP address of GENEVE packet. Type: string
+| |
+| | ... | *Example:*
+| | ... | \| Send IP packet and verify GENEVE encapsulation in received packets\
+| | ... | \| \${nodes['TG']} \| eth1 \| eth2 \
+| | ... | \| 52:54:00:d4:d8:22 \| 52:54:00:d4:d8:3e \| 1.1.1.2 \| 1.1.1.1 \
+| | ... | \| 1 \| 10.128.1.0 \| 10.0.1.0 \| 24 \|11.0.1.2\|
+| |
+| | [Arguments] | ${node} | ${tx_interface} | ${rx_interface}
+| | ... | ${tx_dst_mac} | ${rx_src_mac} | ${tun_local_ip} | ${tun_remote_ip}
+| | ... | ${tun_vni} | ${tun_src_ip} | ${tun_dst_ip}
+| |
+| | ${tx_src_mac}= | Get Interface Mac | ${node} | ${tx_interface}
+| | ${tx_if_name}= | Get Interface Name | ${node} | ${tx_interface}
+| | ${rx_dst_mac}= | Get Interface Mac | ${node} | ${rx_interface}
+| | ${rx_if_name}= | Get Interface Name | ${node} | ${rx_interface}
+| | ${args}= | Catenate | --rx_if ${rx_if_name} | --tx_if ${tx_if_name}
+| | ... | --tx_src_mac ${tx_src_mac} | --tx_dst_mac ${tx_dst_mac}
+| | ... | --rx_src_mac ${rx_src_mac} | --rx_dst_mac ${rx_dst_mac}
+| | ... | --tun_local_ip ${tun_local_ip} | --tun_remote_ip ${tun_remote_ip}
+| | ... | --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 c33ca5fea9..5b45718a03 100644
--- a/resources/libraries/robot/shared/vm.robot
+++ b/resources/libraries/robot/shared/vm.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:
@@ -12,9 +12,9 @@
# limitations under the License.
*** Settings ***
-| Documentation | Keywords related to vm lifecycle management
-...
| Library | resources.libraries.python.InterfaceUtil
+|
+| Documentation | Keywords related to vm lifecycle management
*** Keywords ***
| Configure chains of NFs connected via vhost-user
@@ -32,28 +32,34 @@
| | ... | Type: boolean
| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ... | - fixed_auto_scale - Enable fixed auto_scale (nf_dtc). Type: boolean
| | ... | - vnf - Network function as a payload. Type: string
| | ... | - pinning - Whether to pin QEMU VMs to specific cores
| |
| | ... | *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}
| | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False}
-| | ... | ${auto_scale}=${True} | ${vnf}=vpp | ${pinning}=${True}
+| | ... | ${auto_scale}=${True} | ${fixed_auto_scale}=${False} | ${vnf}=vpp
+| | ... | ${pinning}=${True}
| |
+| | ${enable_gso} = | Get Variable Value | ${enable_gso} | ${False}
+| | ${enable_csum} = | Get Variable Value | ${enable_csum} | ${False}
+| | ${virtio_feature_mask}= | Create Virtio feature mask
+| | ... | gso=${enable_gso} | csum=${enable_csum}
| | Import Library | resources.libraries.python.QemuManager | ${nodes}
| | ... | WITH NAME | vnf_manager
| | Run Keyword | vnf_manager.Construct VMs on all nodes
| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo}
| | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs}
-| | ... | auto_scale=${auto_scale} | vnf=${vnf}
-| | ... | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
+| | ... | auto_scale=${auto_scale} | fixed_auto_scale=${fixed_auto_scale}
+| | ... | 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} | enable_csum=${False}
-| | ... | enable_gso=${False}
+| | ... | rxq_count_int=${rxq_count_int}
+| | ... | virtio_feature_mask=${virtio_feature_mask} | page_size=${page_size}
| | ${cpu_wt}= | Run Keyword | vnf_manager.Start All VMs | pinning=${pinning}
| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt}
| | Set Test Variable | ${cpu_alloc_str}
@@ -76,8 +82,10 @@
| | ... | Type: boolean
| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ... | - fixed_auto_scale - Enable override auto_scale. Type: boolean
| | ... | - vnf - Network function as a payload. Type: string
| | ... | - pinning - Whether to pin QEMU VMs to specific cores
+| | ... | - validate - Validate interfaces are up. Type: boolean
| |
| | ... | *Example:*
| |
@@ -87,9 +95,14 @@
| |
| | [Arguments] | ${node} | ${nf_chains}=${1} | ${nf_nodes}=${1}
| | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024}
-| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True} | ${vnf}=vpp
-| | ... | ${pinning}=${True}
+| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True}
+| | ... | ${fixed_auto_scale}=${False} | ${vnf}=vpp | ${pinning}=${True}
+| | ... | ${validate}=${True}
| |
+| | ${enable_gso}= | Get Variable Value | ${enable_gso} | ${False}
+| | ${enable_csum}= | Get Variable Value | ${enable_csum} | ${False}
+| | ${virtio_feature_mask}= | Create Virtio feature mask
+| | ... | gso=${enable_gso} | csum=${enable_csum}
| | Import Library | resources.libraries.python.QemuManager | ${nodes}
| | ... | WITH NAME | vnf_manager
| | Run Keyword | vnf_manager.Initialize
@@ -97,15 +110,17 @@
| | ... | node=${node}
| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo}
| | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs}
-| | ... | auto_scale=${auto_scale} | vnf=${vnf}
-| | ... | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
+| | ... | auto_scale=${auto_scale} | fixed_auto_scale=${fixed_auto_scale}
+| | ... | 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} | enable_csum=${False}
-| | ... | enable_gso=${False}
+| | ... | rxq_count_int=${rxq_count_int}
+| | ... | virtio_feature_mask=${virtio_feature_mask} | page_size=${page_size}
| | ${cpu_wt}= | Run Keyword | vnf_manager.Start All VMs | pinning=${pinning}
-| | ${cpu_alloc_str}= | Catenate | SEPARATOR=, | ${cpu_alloc_str} | ${cpu_wt}
-| | Set Test Variable | ${cpu_alloc_str}
-| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300}
+| | ${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
| Configure chains of NFs connected via passtrough
@@ -123,28 +138,34 @@
| | ... | Type: boolean
| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ... | - fixed_auto_scale - Enable override auto_scale. Type: boolean
| | ... | - vnf - Network function as a payload. Type: string
| | ... | - pinning - Whether to pin QEMU VMs to specific cores
| |
| | ... | *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}
| | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False}
-| | ... | ${auto_scale}=${True} | ${vnf}=vpp | ${pinning}=${True}
+| | ... | ${auto_scale}=${True} | ${fixed_auto_scale}=${False} | ${vnf}=vpp
+| | ... | ${pinning}=${True}
| |
+| | ${enable_gso} = | Get Variable Value | ${enable_gso} | ${False}
+| | ${enable_csum} = | Get Variable Value | ${enable_csum} | ${False}
+| | ${virtio_feature_mask}= | Create Virtio feature mask
+| | ... | gso=${enable_gso} | csum=${enable_csum}
| | Import Library | resources.libraries.python.QemuManager | ${nodes}
| | ... | WITH NAME | vnf_manager
| | Run Keyword | vnf_manager.Construct VMs on all nodes
| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo}
| | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs}
-| | ... | auto_scale=${auto_scale} | vnf=${vnf}
-| | ... | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0]
+| | ... | auto_scale=${auto_scale} | fixed_auto_scale=${fixed_auto_scale}
+| | ... | 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} | enable_csum=${False}
-| | ... | enable_gso=${False}
+| | ... | rxq_count_int=${rxq_count_int}
+| | ... | 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}