Refactor VPP Device VM vhost tests
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
index fee1295..a6f1ace 100644 (file)
 | | ... | ${dut1} | ${dut1_if1} | 100.0.0.1 | 30
 | | Configure IP addresses on interfaces
 | | ... | ${dut1} | ${dut1_if2} | 200.0.0.1 | 30
-| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
-| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg1_if1_mac}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 200.0.0.2 | ${tg1_if2_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 200.0.0.2 | ${tg_if2_mac}
 | | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
 | | ... | interface=${dut1_if1} | vrf=${fib_table_1}
 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=200.0.0.2
 | | Vpp Route Add | ${dut} | ${tg_if2_net} | 30 | gateway=3.3.3.1
 | | ... | interface=${dut_if2}
 
-| Initialize IPv4 policer 2r3c-${t} in circular topology
-| | [Documentation]
-| | ... | Setup of 2r3c color-aware or color-blind policer with dst ip match
-| | ... | on all DUT nodes in 2-node / 3-node circular topology. Policer is
-| | ... | applied on links TG - DUTx.
-| | ...
-| | ${dscp}= | DSCP AF22
-| | Policer Set Name | policer1
-| | Policer Set CIR | ${cir}
-| | Policer Set EIR | ${eir}
-| | Policer Set CB | ${cb}
-| | Policer Set EB | ${eb}
-| | Policer Set Rate Type pps
-| | Policer Set Round Type Closest
-| | Policer Set Type 2R3C 2698
-| | Policer Set Conform Action Transmit
-| | Policer Set Exceed Action Mark and Transmit | ${dscp}
-| | Policer Set Violate Action Transmit
-| | Policer Enable Color Aware
-| | Run Keyword If | ${t} == 'ca' | Policer Enable Color Aware
-| | Policer Classify Set Precolor Exceed
-| | Policer Set Node | ${dut1}
-| | Policer Classify Set Interface | ${dut1_if1}
-| | Policer Classify Set Match IP | 20.20.20.2 | ${False}
-| | Policer Set Configuration
-| | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
-| | ... | Variable Should Exist | ${dut2}
-| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2}
-| | ... | ELSE | Set Variable | ${dut1}
-| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
-| | Run Keyword Unless | '${dut2_status}' == 'PASS'
-| | ... | Policer Set Name | policer2
-| | Policer Set Node | ${dut}
-| | Policer Classify Set Interface | ${dut_if2}
-| | Policer Classify Set Match IP | 10.10.10.2 | ${False}
-| | Policer Set Configuration
-
 | Initialize IPv6 forwarding in circular topology
 | | [Documentation]
 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
 | | Vpp Route Add | ${dut} | 2001:2::0 | ${host_prefix} | gateway=2001:5::2
 | | ... | interface=${dut_if2} | count=${count}
 
+| Initialize IPv6 forwarding with vhost in 2-node circular topology
+| | [Documentation]
+| | ... | Create pairs of Vhost-User interfaces for defined number of VMs on \
+| | ... | VPP node. Set UP state of all VPP interfaces in path. Create \
+| | ... | nf_nodes+1 FIB tables on DUT with multipath routing. Assign each \
+| | ... | Virtual interface to FIB table with Physical interface or Virtual \
+| | ... | interface on both nodes. Setup IPv6 addresses with /64 prefix on \
+| | ... | DUT-TG links. Set routing on DUT nodes in all FIB tables with \
+| | ... | prefix /64 and next hop of neighbour IPv6 address. Setup neighbours \
+| | ... | on all VPP interfaces.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_nodes - Number of guest VMs. Type: integer
+| | ...
+| | ... | *Note:*
+| | ... | Socket paths for VM are defined in following format:
+| | ... | - /var/run/vpp/sock-${VM_ID}-1
+| | ... | - /var/run/vpp/sock-${VM_ID}-2
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| IPv6 forwarding with Vhost-User initialized in a 2-node circular\
+| | ... | topology \| 1 \|
+| | ...
+| | [Arguments] | ${nf_nodes}=${1}
+| | ...
+| | Suppress ICMPv6 router advertisement message | ${nodes}
+| | Set interfaces in path up
+| | ${prefix}= | Set Variable | 64
+| | ${fib_table_1}= | Set Variable | ${101}
+| | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nf_nodes}
+| | Add Fib Table | ${dut1} | ${fib_table_1} | ipv6=${True}
+| | Add Fib Table | ${dut1} | ${fib_table_2} | ipv6=${True}
+| | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
+| | ... | ipv6=${True}
+| | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
+| | ... | ipv6=${True}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:100::1
+| | ... | ${prefix}
+| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:200::1
+| | ... | ${prefix}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:100::2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:200::2 | ${tg_if2_mac}
+| | Vpp Route Add | ${dut1} | 2001:1::0 | 64 | gateway=2001:100::2
+| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
+| | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:200::2
+| | ... | interface=${dut1_if2} | vrf=${fib_table_2}
+| | :FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
+| | | ${fib_table_1}= | Evaluate | ${100}+${number}
+| | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
+| | | Configure vhost interfaces for L2BD forwarding | ${dut1}
+| | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2
+| | | ... | dut1-vhost-${number}-if1 | dut1-vhost-${number}-if2
+| | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
+| | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
+| | | Add Fib Table | ${dut1} | ${fib_table_1} | ipv6=${True}
+| | | Add Fib Table | ${dut1} | ${fib_table_2} | ipv6=${True}
+| | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
+| | | ... | ${fib_table_1} | ipv6=${True}
+| | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
+| | | ... | ${fib_table_2} | ipv6=${True}
+| | | Configure IP addresses on interfaces
+| | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | 1:1::2 | 64
+| | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | 1:2::2 | 64
+| | | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=1:1::1
+| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Vpp Route Add | ${dut1} | 2001:1::0 | 64 | gateway=1:2::1
+| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
+
 | Initialize IPv6 forwarding with VLAN dot1q sub-interfaces in circular topology
 | | [Documentation]
 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
 | | Vpp Route Add | ${dut} | ${tg_if2_net} | ${host_prefix}
 | | ... | gateway=2002:3::1 | interface=${dut_if2}
 
-| Initialize IPv6 iAcl whitelist in 3-node circular topology
-| | [Documentation]
-| | ... | Creates classify L3 table on DUTs. IPv6 iAcl security whitelist
-| | ... | ingress /64 filter entries applied on links TG - DUT1 and DUT2 - TG.
-| | ...
-| | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
-| | ... | ${dut1} | ip6 | dst
-| | And Vpp Configures Classify Session L3
-| | ... | ${dut1} | permit | ${table_idx} | ip6 | dst | 2001:2::2
-| | And Vpp Enable Input Acl Interface
-| | ... | ${dut1} | ${dut1_if1} | ip6 | ${table_idx}
-| | ${table_idx} | ${skip_n} | ${match_n}= | And Vpp Creates Classify Table L3
-| | ... | ${dut2} | ip6 | dst
-| | And Vpp Configures Classify Session L3
-| | ... | ${dut2} | permit | ${table_idx} | ip6 | dst | 2001:1::2
-| | And Vpp Enable Input Acl Interface
-| | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx}
-
 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
 | | [Documentation]
 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
 | | Run Keyword Unless | '${if2_status}' == 'PASS'
 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
 | | ... | ${dut2_eth_bond_if1}
-| | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
+| | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
 | | Initialize VLAN dot1q sub-interfaces in circular topology
 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
 | | ... | ${subid}
 | | Run Keyword Unless | '${if2_status}' == 'PASS'
 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
 | | ... | ${dut2_eth_bond_if1}
-| | VPP Show Bond Data On All Nodes | ${nodes} | details=${TRUE}
+| | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
 | | Initialize VLAN dot1q sub-interfaces in circular topology
 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
 | | ... | ${subid}
 | | Add Eth Interface | ${dut1} | ${dut1_eth_bond_if1_name} | ifc_pfx=eth_bond
 | | Add Eth Interface | ${dut2} | ${dut2_eth_bond_if1_name} | ifc_pfx=eth_bond
 
-| Configure chains of NFs connected via vhost-user
-| | [Documentation]
-| | ... | Start 1..N chains of 1..N QEMU guests (VNFs) with two vhost-user\
-| | ... | interfaces and interconnecting NF.
-| | ...
-| | ... | *Arguments:*
-| | ... | - nf_chains - Number of chains of NFs. Type: integer
-| | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
-| | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
-| | ... | in the test. Type: boolean
-| | ... | - perf_qemu_qsz - Virtio Queue Size. Type: integer
-| | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
-| | ... | Type: boolean
-| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
-| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
-| | ... | - vnf - Network function as a payload. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Configure chains of VMs connected via vhost-user
-| | ... | \| 1 \| 1 \| False \| 1024 \| False \| False \| vpp
-| | ...
-| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${jumbo}=${False}
-| | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False}
-| | ... | ${auto_scale}=${True} | ${vnf}=vpp
-| | ...
-| | 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_if1_mac=${tg_if1_mac} | tg_if2_mac=${tg_if2_mac}
-| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
-| | ... | rxq_count_int=${rxq_count_int}
-| | Run Keyword | vnf_manager.Start All VMs | pinning=${True}
-| | 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 vhost-user on single node
-| | [Documentation]
-| | ... | Start 1..N chains of 1..N QEMU guests (VNFs) with two vhost-user\
-| | ... | interfaces and interconnecting NF on single DUT node.
-| | ...
-| | ... | *Arguments:*
-| | ... | - node - DUT node. Type: dictionary
-| | ... | - nf_chains - Number of chains of NFs. Type: integer
-| | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
-| | ... | - jumbo - Jumbo frames are used (True) or are not used (False)
-| | ... | in the test. Type: boolean
-| | ... | - perf_qemu_qsz - Virtio Queue Size. Type: integer
-| | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
-| | ... | Type: boolean
-| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
-| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
-| | ... | - vnf - Network function as a payload. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Configure chains of NFs connected via vhost-user on single node
-| | ... | \| DUT1 \| 1 \| 1 \| False \| 1024 \| False \| False \| vpp
-| | ...
-| | [Arguments] | ${node} | ${nf_chains}=${1} | ${nf_nodes}=${1}
-| | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024}
-| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True} | ${vnf}=vpp
-| | ...
-| | Import Library | resources.libraries.python.QemuManager | ${nodes}
-| | ... | WITH NAME | vnf_manager
-| | Run Keyword | vnf_manager.Initialize
-| | Run Keyword | vnf_manager.Construct VMs on node
-| | ... | 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_if1_mac=${tg_if1_mac} | tg_if2_mac=${tg_if2_mac}
-| | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
-| | ... | rxq_count_int=${rxq_count_int}
-| | Run Keyword | vnf_manager.Start All VMs | pinning=${True}
-| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300}
-| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual
-
 | Initialize LISP IPv4 forwarding in 3-node circular topology
 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
 | | ... | Don`t set route.