VPP link bonding perf tests with two links between DUTs
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
index 3050096..2e7274b 100644 (file)
 | | ...
 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
 # software interfaces. Run KW at the start phase of VPP setup to split
-# from other "functial" configuration. This will allow modularity of this
+# from other "functional" configuration. This will allow modularity of this
 # library
 | | ${duts}= | Get Matches | ${nodes} | DUT*
 | | :FOR | ${dut} | IN | @{duts}
-| | | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
-| | | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up
+| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if1}
+| | | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
+| | | ... | ELSE
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
+| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if2}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up
+| | | ... | ELSE
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up
 | | All VPP Interfaces Ready Wait | ${nodes}
 | | ${duts}= | Get Matches | ${nodes} | DUT*
 | | :FOR | ${dut} | IN | @{duts}
-| | | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
-| | | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2}
+| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if1}
+| | | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
+| | | ... | ELSE
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
+| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if2}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2}
+| | | ... | ELSE
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1}
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2}
 | | All VPP Interfaces Ready Wait | ${nodes}
 
 | Initialize IPSec in 3-node circular topology
 | | ... | ${lb_mode}
 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
-| | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
+| | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut1_if2}
+| | Run Keyword If | '${if2_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
+| | ... | ${dut1_eth_bond_if1}
+| | ... | ELSE
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
+| | ... | ${dut1_eth_bond_if1}
+| | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
 | | ... | ${dut1_eth_bond_if1}
 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
 | | ... | ${lb_mode}
 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
-| | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
+| | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut2_if1}
+| | Run Keyword If | '${if1_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
+| | ... | ${dut2_eth_bond_if1}
+| | ... | ELSE
+| | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
+| | ... | ${dut2_eth_bond_if1}
+| | 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}
 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
 | | ... | ${lb_mode}
 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
-| | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
+| | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut1_if2}
+| | Run Keyword If | '${if2_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
+| | ... | ${dut1_eth_bond_if1}
+| | ... | ELSE
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
+| | ... | ${dut1_eth_bond_if1}
+| | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
 | | ... | ${dut1_eth_bond_if1}
 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
 | | ... | ${lb_mode}
 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
-| | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
+| | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut2_if1}
+| | Run Keyword If | '${if1_status}' == 'PASS'
+| | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
+| | ... | ${dut2_eth_bond_if1}
+| | ... | ELSE
+| | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
+| | ... | ${dut2_eth_bond_if1}
+| | 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}
 | | Initialize VLAN dot1q sub-interfaces in 3-node circular topology
 | | ...
 | | ${duts}= | Get Matches | ${nodes} | DUT*
 | | :FOR | ${dut} | IN | @{duts}
-| | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
-| | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
-| | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci} | ${if2_pci}
-| | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
-| | | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
+| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if1}
+| | | ${if1_pci}= | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1}
+| | | ${if1_1_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_1}
+| | | ${if1_2_pci}= | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if1_2}
+| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | | ... | Variable Should Exist | ${${dut}_if2}
+| | | ${if2_pci}= | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2}
+| | | ${if2_1_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_1}
+| | | ${if2_2_pci}= | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Get Interface PCI Addr | ${nodes['${dut}']} | ${${dut}_if2_2}
+| | | @{pci_devs}= | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Create List | ${if1_pci}
+| | | ... | ELSE
+| | | ... | Create List | ${if1_1_pci} | ${if1_2_pci}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Append To List | ${pci_devs} | ${if2_pci}
+| | | ... | ELSE
+| | | ... | Append To List | ${pci_devs} | ${if2_1_pci} | ${if2_2_pci}
+| | | Run keyword | ${dut}.Add DPDK Dev | @{pci_devs}
+| | | Run Keyword If | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_1_pci} | ${if1_1_pci}
+| | | Run Keyword Unless | '${if1_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if1_2_pci} | ${if1_2_pci}
+| | | Run Keyword If | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_pci} | ${if2_pci}
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_1_pci} | ${if2_1_pci}
+| | | Run Keyword Unless | '${if2_status}' == 'PASS'
+| | | ... | Set Test Variable | ${${dut}_if2_2_pci} | ${if2_2_pci}
 
 | Add single PCI device to all DUTs
 | | [Documentation]
 | | | Run keyword | ${dut}.Add DPDK Dev | ${if1_pci}
 | | | Set Test Variable | ${${dut}_if1_pci} | ${if1_pci}
 
-| Add VLAN Strip Offload switch off between DUTs in 3-node single link topology
+| Add VLAN strip offload switch off between DUTs in 3-node single link topology
 | | [Documentation]
 | | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
 | | ... | configuration file.
 | | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_pci}
 | | ... | vlan-strip-offload | off
 
+| Add VLAN strip offload switch off between DUTs in 3-node double link topology
+| | [Documentation]
+| | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
+| | ... | configuration file.
+| | ...
+| | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_1_pci}
+| | ... | vlan-strip-offload | off
+| | Run keyword | DUT1.Add DPDK Dev Parameter | ${dut1_if2_2_pci}
+| | ... | vlan-strip-offload | off
+| | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_1_pci}
+| | ... | vlan-strip-offload | off
+| | Run keyword | DUT2.Add DPDK Dev Parameter | ${dut2_if1_2_pci}
+| | ... | vlan-strip-offload | off
+
 | Add DPDK bonded ethernet interfaces to DUTs in 3-node single link topology
 | | [Documentation]
 | | ... | Add DPDK bonded Ethernet interfaces with mode XOR and transmit policy
 | | Run keyword | ${vm_name}.Qemu Set Serial Port | ${serial_port}
 | | ${ssh_fwd_port}= | Evaluate | ${qemu_id} + ${10021}
 | | Run keyword | ${vm_name}.Qemu Set Ssh Fwd Port | ${ssh_fwd_port}
-| | ${dut_numa}= | Get interfaces numa node | ${nodes['${dut}']}
-| | ... | ${${dut}_if1} | ${${dut}_if2}
+| | ${if1_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${${dut}_if1}
+| | @{if_list}= | Run Keyword If | '${if1_status}' == 'PASS'
+| | ... | Create List | ${${dut}_if1}
+| | ... | ELSE | Create List | ${${dut}_if1_1} | ${${dut}_if1_2}
+| | ${if2_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${${dut}_if2}
+| | Run Keyword If | '${if2_status}' == 'PASS'
+| | ... | Append To List | ${if_list} | ${${dut}_if2}
+| | ... | ELSE | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2}
+| | ${dut_numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list}
 # Compute CPU placement for VM based on expected DUT placement.
 | | ${os_cpus}= | Set Variable | ${1}
 | | ${dut_main_cpus}= | Set Variable | ${1}