CSIT-1411 Implement manual rx-placement override for bug in VPP
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
index 2330cff..be30d37 100644 (file)
 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
 | | ... | Type: bool
+| | ... | - auto_scale - Whether to use same amount of RXQs for vhost interface
+| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean
 | | ...
 | | ... | *Note:*
 | | ... | KW uses test variables \${rxq_count_int}, \${thr_count_int} and
 | | ...
 | | [Arguments] | ${dut} | ${sock1} | ${sock2} | ${vm_name} | ${nf_cpus}
 | | ... | ${qemu_id}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
-| | ... | ${use_tuned_cfs}=${False}
+| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True}
 | | ...
 | | ${nf_cpus_count}= | Get Length | ${nf_cpus}
+| | ${rxq}= | Run Keyword If | '${auto_scale}' == ${True}
+| | ... | Set Variable | ${rxq_count_int}
+| | ... | ELSE | Set Variable | ${1}
 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
 | | ... | WITH NAME | ${vm_name}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${nodes['${dut}']}
 | | Dpdk Testpmd Start | ${vm} | eal_corelist=${testpmd_cpus}
 | | ... | eal_mem_channels=4 | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE}
 | | ... | pmd_rxd=${perf_qemu_qsz} | pmd_txd=${perf_qemu_qsz}
-| | ... | pmd_rxq=${rxq_count_int} | pmd_txq=${rxq_count_int}
-| | ... | pmd_max_pkt_len=${max_pkt_len}
+| | ... | pmd_rxq=${rxq} | pmd_txq=${rxq} | pmd_max_pkt_len=${max_pkt_len}
 | | Return From Keyword | ${vm}
 
 | Configure guest VMs with dpdk-testpmd connected via vhost-user on node
 | | | ... | ${dut} | vm_count=${vm_count} | jumbo=${jumbo}
 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${False}
 | | All VPP Interfaces Ready Wait | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual
 
 | Configure guest VM with dpdk-testpmd-mac connected via vhost-user
 | | [Documentation]
 | | ... | - perf_qemu_qsz - Virtio Queue Size. Type: int
 | | ... | - use_tuned_cfs - Set True if CFS RR should be used for Qemu SMP.
 | | ... | Type: bool
+| | ... | - auto_scale - Whether to use same amount of RXQs for vhost interface
+| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean
 | | ...
 | | ... | *Note:*
 | | ... | KW uses test variables \${rxq_count_int}, \${thr_count_int} and
 | | [Arguments] | ${dut} | ${sock1} | ${sock2} | ${vm_name}
 | | ... | ${eth0_mac} | ${eth1_mac} | ${nf_cpus} | ${qemu_id}=${1}
 | | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
-| | ... | ${use_tuned_cfs}=${False}
+| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True}
 | | ...
 | | ${nf_cpus_count}= | Get Length | ${nf_cpus}
+| | ${rxq}= | Run Keyword If | '${auto_scale}' == ${True}
+| | ... | Set Variable | ${rxq_count_int}
+| | ... | ELSE | Set Variable | ${1}
 | | Import Library | resources.libraries.python.QemuUtils | qemu_id=${qemu_id}
 | | ... | WITH NAME | ${vm_name}
 | | Run keyword | ${vm_name}.Qemu Set Node | ${nodes['${dut}']}
 | | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac}
 | | ... | pmd_eth_peer_1=1,${eth1_mac} | pmd_disable_hw_vlan=${TRUE}
 | | ... | pmd_rxd=${perf_qemu_qsz} | pmd_txd=${perf_qemu_qsz}
-| | ... | pmd_rxq=${rxq_count_int} | pmd_txq=${rxq_count_int}
-| | ... | pmd_max_pkt_len=${max_pkt_len}
+| | ... | pmd_rxq=${rxq} | pmd_txq=${rxq} | pmd_max_pkt_len=${max_pkt_len}
 | | Return From Keyword | ${vm}
 
 | Configure guest VMs with dpdk-testpmd-mac connected via vhost-user on node
 | | | ... | ${dut} | vm_count=${vm_count} | jumbo=${jumbo}
 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${False}
 | | All VPP Interfaces Ready Wait | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual
 
 | Configure chain of NFs with dpdk-testpmd-mac connected via vhost-user on node
 | | [Documentation]
 | | ... | - 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 vhost interface
+| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean
 | | ...
 | | ... | *Example:*
 | | ...
 | | ...
 | | [Arguments] | ${dut} | ${nf_chains}=${1} | ${nf_chain}=${1}
 | | ... | ${nf_nodes}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
-| | ... | ${use_tuned_cfs}=${False}
+| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${False}
 | | ...
 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
 | | | ... | ${dut} | ${sock1} | ${sock2} | ${nf_name} | ${vif1_mac}
 | | | ... | ${vif2_mac} | ${nf_cpus} | qemu_id=${qemu_id} | jumbo=${jumbo}
 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs}
+| | | ... | auto_scale=${auto_scale}
 | | | Set To Dictionary | ${${dut}_vm_refs} | ${nf_name} | ${vm}
 
 | Configure chain of NFs with dpdk-testpmd-mac connected via vhost-user
 | | ... | - 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 vhost interface
+| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean
 | | ...
 | | ... | *Example:*
 | | ...
 | | ...
 | | [Arguments] | ${nf_chains}=${1} | ${nf_chain}=${1} | ${nf_nodes}=${1}
 | | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${256}
-| | ... | ${use_tuned_cfs}=${False}
+| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${False}
 | | ...
 | | ${duts}= | Get Matches | ${nodes} | DUT*
 | | :FOR | ${dut} | IN | @{duts}
 | | | ... | ${dut} | nf_chains=${nf_chains} | nf_chain=${nf_chain}
 | | | ... | nf_nodes=${nf_nodes} | jumbo=${jumbo}
 | | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${False}
+| | | ... | auto_scale=${auto_scale}
 
 | Configure chains of NFs with dpdk-testpmd-mac connected via vhost-user
 | | [Documentation]
 | | ... | - 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
 | | ...
 | | ... | *Example:*
 | | ...
 | | ...
 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${jumbo}=${False}
 | | ... | ${perf_qemu_qsz}=${256} | ${use_tuned_cfs}=${False}
+| | ... | ${auto_scale}=${False}
 | | ...
 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
 | | | Configure chain of NFs with dpdk-testpmd-mac connected via vhost-user
 | | | ... | nf_chains=${nf_chains} | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
 | | | ... | jumbo=${jumbo} | perf_qemu_qsz=${perf_qemu_qsz}
-| | | ... | use_tuned_cfs=${False}
+| | | ... | use_tuned_cfs=${False} | auto_scale=${auto_scale}
 | | All VPP Interfaces Ready Wait | ${nodes}
+| | 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 \
 | | | Initialize L2 xconnect with memif pairs on DUT node | ${dut} | ${count}
 | | Set interfaces in path up
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize L2 Bridge Domain with memif pairs on DUT node
 | | [Documentation]
 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
 | | Set interfaces in path up
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize L2 Bridge Domain for pipeline with memif pairs
 | | [Documentation]
 | | | ... | auto_scale=${auto_scale}
 | | Set interfaces in path up
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
 | | [Documentation]
 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
 | | ...
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize IPv4 routing with memif pairs on DUT node
 | | [Documentation]
 | | | Initialize IPv4 routing with memif pairs on DUT node | ${dut} | ${count}
 | | Set interfaces in path up
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize L2 xconnect for single memif
 | | [Documentation]
 | | | ... | ${${dut}-memif-${number}-if1}
 | | Set single interfaces in path up
 | | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
 
 | Initialize L2 Bridge Domain for single memif
 | | [Documentation]