X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_configuration.robot;h=e40d3f6bcdaad79fbf2c524dcf421481b22c4721;hp=568114f15ba478a27db349b6c28897991d429668;hb=0cd7a2d0d4e701ca61421c5de9b4b0460fdfa28a;hpb=cd288d8e0812793b2c701ae9a4596d6d0837ca6b diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index 568114f15b..e40d3f6bcd 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -21,6 +21,7 @@ | Library | resources.libraries.python.VhostUser | Library | resources.libraries.python.TrafficGenerator | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl +| Library | resources.libraries.python.Classify | Resource | resources/libraries/robot/shared/default.robot | Resource | resources/libraries/robot/shared/interfaces.robot | Resource | resources/libraries/robot/shared/counters.robot @@ -731,8 +732,19 @@ | | ... | that is created automatically with index 1. Learning is enabled. | | ... | Interfaces are brought up. | | ... -| | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2} -| | Configure L2BD forwarding | ${dut2} | ${dut2_if1} | ${dut2_if2} +| | ... | *Arguments:* +| | ... | - bd_id - Bridge domain ID. Type: integer +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize L2 bridge domain in 3-node circular topology \| 1 \| +| | ... +| | [Arguments] | ${bd_id}=${1} +| | ... +| | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id} +| | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id} +| | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id} +| | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id} | | All Vpp Interfaces Ready Wait | ${nodes} | Configure IPv4 ACLs @@ -840,6 +852,48 @@ | | All Vpp Interfaces Ready Wait | ${nodes} | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2} +| Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in 3-node circular topology +| | [Documentation] +| | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular +| | ... | topology. Get the interface MAC addresses and setup ARP on all VPP +| | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG links and +| | ... | /30 prefix on DUT1-DUT2 link. Set routing on both DUT nodes with +| | ... | prefix /24 and next hops of neighbour DUT interface IPv4 address. +| | ... | Apply required ACL rules to DUT1 interfaces. +| | ... +| | ... | _NOTE:_ This KW uses following test case variables: +| | ... | - ${dut1} - DUT1 node. +| | ... | - ${dut2} - DUT2 node. +| | ... | - ${dut1_if1} - DUT1 interface towards TG. +| | ... | - ${dut1_if2} - DUT1 interface towards DUT2. +| | ... | - ${dut2_if1} - DUT2 interface towards DUT1. +| | ... | - ${dut2_if2} - DUT2 interface towards TG. +| | ... +| | Set Interface State | ${dut1} | ${dut1_if1} | up +| | Set Interface State | ${dut1} | ${dut1_if2} | up +| | Set Interface State | ${dut2} | ${dut2_if1} | up +| | Set Interface State | ${dut2} | ${dut2_if2} | up +| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1} +| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2} +| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2} +| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1} +| | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2 +| | | Add arp on dut | ${dut1} | ${dut1_if1} | 10.10.10.${number} +| | | ... | ${tg1_if1_mac} +| | | Add arp on dut | ${dut2} | ${dut2_if2} | 20.20.20.${number} +| | | ... | ${tg1_if2_mac} +| | Add arp on dut | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac} +| | Add arp on dut | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac} +| | Configure IP addresses on interfaces +| | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24 +| | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30 +| | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30 +| | ... | ${dut2} | ${dut2_if2} | 20.20.20.1 | 24 +| | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | 1.1.1.2 | ${dut1_if2} +| | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1} +| | All Vpp Interfaces Ready Wait | ${nodes} +| | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2} + | Initialize L2 bridge domains with Vhost-User in 3-node circular topology | | [Documentation] | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each @@ -1023,6 +1077,43 @@ | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2} | | All Vpp Interfaces Ready Wait | ${nodes} +| Initialize L2 bridge domains with VLAN dot1q sub-interfaces in a 3-node circular topology +| | [Documentation] +| | ... | Setup L2 bridge domain topology with learning enabled with VLAN +| | ... | between DUTs by connecting physical and vlan interfaces on each DUT. +| | ... | All interfaces are brought up. +| | ... +| | ... | *Arguments:* +| | ... | - bd_id1 - Bridge domain ID. Type: integer +| | ... | - bd_id2 - Bridge domain ID. Type: integer +| | ... | - subid - ID of the sub-interface to be created. Type: string +| | ... | - tag_rewrite - Method of tag rewrite. Type: string +| | ... +| | ... | _NOTE:_ This KW uses following test case variables: +| | ... | - ${dut1} - DUT1 node. +| | ... | - ${dut2} - DUT2 node. +| | ... | - ${dut1_if2} - DUT1 interface towards DUT2. +| | ... | - ${dut2_if1} - DUT2 interface towards DUT1. +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces +| | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \| +| | ... +| | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite} +| | ... +| | Set interfaces in path in 3-node circular topology up +| | Initialize VLAN dot1q sub-interfaces in 3-node circular topology +| | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid} +| | Configure L2 tag rewrite method on interfaces +| | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2} +| | ... | ${tag_rewrite} +| | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1} +| | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1} +| | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id2} +| | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2} +| | All Vpp Interfaces Ready Wait | ${nodes} + | Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology | | [Documentation] | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each @@ -1132,8 +1223,8 @@ | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} | | ... | ${True} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} -| | ... | apply_patch=${apply_patch} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1 @@ -1177,6 +1268,8 @@ | | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM${number} | | | ... | skip=${skip_cpus} | count=${vm_cpus} | qemu_id=${number} | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2} +| | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built} +| | | ... | ${True} | Configure guest VM with dpdk-testpmd using SMT connected via vhost-user | | [Documentation] @@ -1213,8 +1306,8 @@ | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} | | ... | ${True} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} -| | ... | apply_patch=${apply_patch} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1 @@ -1278,8 +1371,8 @@ | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} | | ... | ${True} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} -| | ... | apply_patch=${apply_patch} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1 @@ -1331,6 +1424,8 @@ | | | ... | ${dut2-vhost-${number}-if2_mac} | skip=${skip_cpus} | | | ... | count=${vm_cpus} | qemu_id=${number} | | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM${number} | ${vm2} +| | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built} +| | | ... | ${True} | Configure guest VM with dpdk-testpmd-mac using SMT connected via vhost-user | | [Documentation] @@ -1369,8 +1464,8 @@ | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} | | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} | | ... | ${True} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} -| | ... | apply_patch=${apply_patch} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1 @@ -1415,7 +1510,10 @@ | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${False} | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1} | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True} +| | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} +| | ... | ${True} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1 @@ -1462,7 +1560,10 @@ | | ... | skip_cnt=${skip} | cpu_cnt=${count} | smt_used=${True} | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock1} | | Run keyword | ${vm_name}.Qemu Add Vhost User If | ${sock2} -| | Run Keyword | ${vm_name}.Build QEMU | ${dut_node} | apply_patch=${True} +| | ${apply_patch}= | Set Variable If | "${perf_qemu_qsz}" == "256" | ${False} +| | ... | ${True} +| | Run Keyword Unless | ${qemu_built} | ${vm_name}.Build QEMU | ${dut_node} +| | ... | force_install=${True} | apply_patch=${apply_patch} | | Run keyword | ${vm_name}.Qemu Set Bin | ${perf_qemu_bin} | | Run keyword | ${vm_name}.Qemu Set Node | ${dut_node} | | Run keyword | ${vm_name}.Qemu Set Smp | ${count} | ${count} | 1 | 1