X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_configuration.robot;h=4701b2314435c01c6afe905b83b06f5c4245a3c2;hb=fad4332b24675bbd712fdf22d5295d64fb877029;hp=b69980bf1a421d9ce0c7696fbefac310ca1a12a6;hpb=85eaed551e088d0a3f3dd71febc361acecc17add;p=csit.git diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index b69980bf1a..4701b23144 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -64,7 +64,7 @@ | | | ... | 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} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error @@ -83,7 +83,7 @@ | | | ... | 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} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} | Set single interfaces in path up | | [Documentation] @@ -104,7 +104,7 @@ | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up | | | Run Keyword Unless | '${if1_status}' == 'PASS' | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up -| | All VPP Interfaces Ready Wait | ${nodes} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error @@ -161,16 +161,10 @@ | | Set Test Variable | ${dut2_if2_mac} | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | | ... | ${dut1_if1_ip4} | 24 -| | Configure IP addresses on interfaces | ${dut1} | ${dut1_if2} -| | ... | ${dut1_if2_ip4} | 24 -| | Configure IP addresses on interfaces | ${dut2} | ${dut2_if1} -| | ... | ${dut2_if1_ip4} | 24 | | Configure IP addresses on interfaces | ${dut2} | ${dut2_if2} | | ... | ${dut2_if2_ip4} | 24 | | Add arp on dut | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac} -| | Add arp on dut | ${dut1} | ${dut1_if2} | ${dut2_if1_ip4} | ${dut2_if1_mac} | | Add arp on dut | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac} -| | Add arp on dut | ${dut2} | ${dut2_if1} | ${dut1_if2_ip4} | ${dut1_if2_mac} | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4} | | ... | interface=${dut1_if1} | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | gateway=${tg_if2_ip4} @@ -2301,10 +2295,11 @@ | | ... | 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} -| | ... | cpu_count_int=${cpu_count_int} | rxq_count_int=${rxq_count_int} +| | ... | 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} | | Run Keyword If | ${use_tuned_cfs} | vnf_manager.Set Scheduler All VMs -| | All VPP Interfaces Ready Wait | ${nodes} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual | Configure guest VM with dpdk-testpmd connected via vhost-user @@ -2343,17 +2338,12 @@ | | ... | ${qemu_id}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024} | | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True} | | ... -| | ${apply_patch}= | Set Variable | ${False} -| | ${perf_qemu_path}= | Set Variable If | ${apply_patch} -| | ... | ${perf_qemu_path}-patch/bin -| | ... | ${perf_qemu_path}-base/bin | | ${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 | ${nodes['${dut}']} | | ... | qemu_id=${qemu_id} | smp=${nf_cpus_count} | mem=${2048} -| | ... | img=${perf_vm_image} | bin_path=${perf_qemu_path} | | ... | WITH NAME | ${vm_name} | | Run Keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1} | | ... | jumbo_frames=${jumbo} | queues=${rxq_count_int} @@ -2361,8 +2351,6 @@ | | Run Keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ... | jumbo_frames=${jumbo} | queues=${rxq_count_int} | | ... | queue_size=${perf_qemu_qsz} -| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${nodes['${dut}']} -| | ... | apply_patch=${apply_patch} | | ${vm}= | Run Keyword | ${vm_name}.Qemu Start | | Run Keyword | ${vm_name}.Qemu Set Affinity | @{nf_cpus} | | Run Keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy @@ -2370,7 +2358,7 @@ | | ${testpmd_cpus}= | Cpu list per node str | ${nodes['${dut}']} | ${0} | | ... | cpu_cnt=${nf_cpus_count} | | Dpdk Testpmd Start | ${vm} | eal_corelist=${testpmd_cpus} -| | ... | eal_mem_channels=4 | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE} +| | ... | pmd_fwd_mode=io | pmd_disable_hw_vlan=${TRUE} | | ... | pmd_rxd=${perf_qemu_qsz} | pmd_txd=${perf_qemu_qsz} | | ... | pmd_rxq=${rxq} | pmd_txq=${rxq} | pmd_max_pkt_len=${max_pkt_len} | | Return From Keyword | ${vm} @@ -2399,9 +2387,10 @@ | | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False} | | ... | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1 -| | | ${nf_cpus}= | Create network function CPU list | ${dut} -| | | ... | chains=${1} | nodeness=${vm_count} | chain_id=${1} -| | | ... | node_id=${number} | auto_scale=${True} +| | | ${nf_cpus}= | Get Affinity NF | ${nodes} | ${dut} +| | | ... | nf_chains=${1} | nf_nodes=${vm_count} +| | | ... | nf_chain=${1} | nf_node=${number} +| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${cpu_count_int} | | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1 | | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2 | | | ${vm}= @@ -2439,7 +2428,7 @@ | | | 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} | timeout=${90} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${45} | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual | Configure guest VM with dpdk-testpmd-mac connected via vhost-user @@ -2482,17 +2471,12 @@ | | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024} | | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${True} | | ... -| | ${apply_patch}= | Set Variable | ${False} -| | ${perf_qemu_path}= | Set Variable If | ${apply_patch} -| | ... | ${perf_qemu_path}-patch/bin -| | ... | ${perf_qemu_path}-base/bin | | ${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 | ${nodes['${dut}']} | | ... | qemu_id=${qemu_id} | smp=${nf_cpus_count} | mem=${2048} -| | ... | img=${perf_vm_image} | bin_path=${perf_qemu_path} | | ... | WITH NAME | ${vm_name} | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1} | | ... | jumbo_frames=${jumbo} | queues=${rxq_count_int} @@ -2500,8 +2484,6 @@ | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ... | jumbo_frames=${jumbo} | queues=${rxq_count_int} | | ... | queue_size=${perf_qemu_qsz} -| | Run Keyword If | ${qemu_build} | ${vm_name}.Build QEMU | ${nodes['${dut}']} -| | ... | apply_patch=${False} | | ${vm}= | Run keyword | ${vm_name}.Qemu Start | | Run keyword | ${vm_name}.Qemu Set Affinity | @{nf_cpus} | | Run keyword If | ${use_tuned_cfs} | ${vm_name}.Qemu Set Scheduler Policy @@ -2509,7 +2491,7 @@ | | ${testpmd_cpus}= | Cpu list per node str | ${nodes['${dut}']} | ${0} | | ... | cpu_cnt=${nf_cpus_count} | | Dpdk Testpmd Start | ${vm} | eal_corelist=${testpmd_cpus} -| | ... | eal_mem_channels=4 | pmd_fwd_mode=mac | pmd_eth_peer_0=0,${eth0_mac} +| | ... | 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} | pmd_txq=${rxq} | pmd_max_pkt_len=${max_pkt_len} @@ -2542,9 +2524,10 @@ | | ... | ${perf_qemu_qsz}=${1024} | ${use_tuned_cfs}=${False} | | ... | | :FOR | ${number} | IN RANGE | 1 | ${vm_count}+1 -| | | ${nf_cpus}= | Create network function CPU list | ${dut} -| | | ... | chains=${1} | nodeness=${vm_count} | chain_id=${1} -| | | ... | node_id=${number} | auto_scale=${True} +| | | ${nf_cpus}= | Get Affinity NF | ${nodes} | ${dut} +| | | ... | nf_chains=${1} | nf_nodes=${vm_count} +| | | ... | nf_chain=${1} | nf_node=${number} +| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${cpu_count_int} | | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1 | | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2 | | | ${vm}= @@ -2584,134 +2567,7 @@ | | | 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} | timeout=${90} -| | 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] -| | ... | Start 1 chain of 1..N QEMU guests (VNFs) with two vhost-user\ -| | ... | interfaces and interconnecting DPDK testpmd with fwd mode set to mac\ -| | ... | rewrite on VPP node. -| | ... -| | ... | *Arguments:* -| | ... | - dut - DUT node to start guest VM on. Type: dictionary -| | ... | - nf_chains - Number of chains of NFs. Type: integer -| | ... | - nf_chain - NF chain ID. Type: integer -| | ... | - nf_nodes - Number of guest VMs. 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 vhost interface -| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure chain of NFs with dpdk-testpmd-mac connected via \ -| | ... | vhost-user on node \| DUT1 \| 1 \| 1 \| 1 \| False \| 1024 \| -| | ... -| | [Arguments] | ${dut} | ${nf_chains}=${1} | ${nf_chain}=${1} -| | ... | ${nf_nodes}=${1} | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024} -| | ... | ${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} -| | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes} + ${1} -| | | ${nf_cpus}= | Create network function CPU list | ${dut} -| | | ... | chains=${nf_chains} | nodeness=${nf_nodes} | chain_id=${nf_chain} -| | | ... | node_id=${nf_node} | auto_scale=${False} -| | | ${qemu_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node} -| | | ${sock1}= | Set Variable | /var/run/vpp/sock-${qemu_id}-1 -| | | ${sock2}= | Set Variable | /var/run/vpp/sock-${qemu_id}-2 -| | | ${nf_name}= | Set Variable | ${dut}_VM${qemu_id} -| | | ${prev_qemu_id}= | Evaluate | ${qemu_id} - ${1} -| | | ${next_qemu_id}= | Evaluate | ${qemu_id} + ${1} -| | | ${prev_qemu_id_hex}= | Convert To Hex | ${prev_qemu_id} | length=2 -| | | ... | lowercase=yes -| | | ${next_qemu_id_hex}= | Convert To Hex | ${next_qemu_id} | length=2 -| | | ... | lowercase=yes -| | | ${vif1_mac}= | Set Variable If | ${nf_node} == ${1} -| | | ... | ${tg_if1_mac} -| | | ... | 52:54:00:00:${prev_qemu_id_hex}:02 -| | | ${vif2_mac}= | Set Variable If | ${nf_node} == ${nf_nodes} -| | | ... | ${tg_if2_mac} -| | | ... | 52:54:00:00:${next_qemu_id_hex}:01 -| | | ${vm}= -| | | ... | Configure guest VM with dpdk-testpmd-mac connected via vhost-user -| | | ... | ${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 -| | [Documentation] -| | ... | Start 1 chain of 1..N QEMU guests (VNFs) with two vhost-user\ -| | ... | interfaces and interconnecting DPDK testpmd with fwd mode set to mac\ -| | ... | rewrite on all defined VPP nodes. -| | ... -| | ... | *Arguments:* -| | ... | - nf_chains - Number of chains of NFs. Type: integer -| | ... | - nf_chain - NF chain ID. 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 vhost interface -| | ... | in VM as vswitch, otherwise use single RXQ. Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure chain of NFs with dpdk-testpmd-mac connected via\ -| | ... | vhost-user \| 1 \| 1 \| 1 \| False \| 1024 \| -| | ... -| | [Arguments] | ${nf_chains}=${1} | ${nf_chain}=${1} | ${nf_nodes}=${1} -| | ... | ${jumbo}=${False} | ${perf_qemu_qsz}=${1024} -| | ... | ${use_tuned_cfs}=${False} | ${auto_scale}=${False} -| | ... -| | ${duts}= | Get Matches | ${nodes} | DUT* -| | :FOR | ${dut} | IN | @{duts} -| | | Configure chain of NFs with dpdk-testpmd-mac connected via vhost-user on node -| | | ... | ${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] -| | ... | Start 1..N chains of 1..N QEMU guests (VNFs) with two vhost-user\ -| | ... | interfaces and interconnecting DPDK testpmd with fwd mode set to mac\ -| | ... | rewrite on all defined VPP nodes. -| | ... -| | ... | *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 -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure chains of VMs with dpdk-testpmd-mac connected via \ -| | ... | vhost-user \| 1 \| 1 \| False \| 1024 \| -| | ... -| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${jumbo}=${False} -| | ... | ${perf_qemu_qsz}=${1024} | ${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} | auto_scale=${auto_scale} -| | All VPP Interfaces Ready Wait | ${nodes} +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${45} | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=Virtual | Initialize LISP IPv4 forwarding in 3-node circular topology