X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_configuration.robot;h=25a76fed374811b50713d50561544e76ab9d3f8a;hb=1f2723170ac74555aa505ab3cb772ded76501362;hp=47dec46d49dc29d9850b3b01e32685f218ef2232;hpb=1577123a3c27541181097cb4186aa8855f20b1cc;p=csit.git diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index 47dec46d49..25a76fed37 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.L2Util | Library | resources.libraries.python.NodePath | Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.TestConfig | Library | resources.libraries.python.TrafficGenerator | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl | Library | resources.libraries.python.VhostUser @@ -48,7 +49,6 @@ # software interfaces. Run KW at the start phase of VPP setup to split # from other "functional" configuration. This will allow modularity of this # library -| | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error | | | ... | Variable Should Exist | ${${dut}_if1} @@ -66,8 +66,6 @@ | | | ... | 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} | retries=${300} -| | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error | | | ... | Variable Should Exist | ${${dut}_if1} @@ -96,7 +94,6 @@ # software interfaces. Run KW at the start phase of VPP setup to split # from other "functional" configuration. This will allow modularity of this # library -| | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error | | | ... | Variable Should Exist | ${${dut}_if1} @@ -106,8 +103,6 @@ | | | ... | 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} | retries=${300} -| | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error | | | ... | Variable Should Exist | ${${dut}_if1} @@ -179,19 +174,25 @@ | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24 | | ... | and next hop of neighbour DUT interface IPv4 address. | | ... +| | ... | *Arguments:* +| | ... | - remote_host1_ip - IP address of remote host1 (Optional). +| | ... | Type: string +| | ... | - remote_host2_ip - IP address of remote host2 (Optional). +| | ... | Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize IPv4 forwarding in circular topology \ +| | ... | \| 192.168.0.1 \| 192.168.0.2 \| +| | ... +| | [Arguments] | ${remote_host1_ip}=${NONE} | ${remote_host2_ip}=${NONE} +| | ... | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${dut2} | | ... | | Set interfaces in path up | | ... -| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1} -| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2} -| | ${dut1_if2_mac}= | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Get Interface MAC | ${dut1} | ${dut1_if2} -| | ${dut2_if1_mac}= | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Get Interface MAC | ${dut2} | ${dut2_if1} -| | ... -| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg1_if1_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac} | | Run Keyword If | '${dut2_status}' == 'PASS' | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac} @@ -204,7 +205,7 @@ | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS' | | ... | Set Variable | ${dut2_if2} | | ... | ELSE | Set Variable | ${dut1_if2} -| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg1_if2_mac} +| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg_if2_mac} | | ... | | Configure IP addresses on interfaces | ${dut1} | ${dut1_if1} | | ... | 10.10.10.1 | 24 @@ -223,6 +224,21 @@ | | Run Keyword If | '${dut2_status}' == 'PASS' | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1 | | ... | interface=${dut2_if1} +| | ... +| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32 +| | ... | gateway=10.10.10.2 | interface=${dut1_if1} +| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' +| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 32 +| | ... | gateway=20.20.20.2 | interface=${dut_if2} +| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' +| | ... | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32 +| | ... | gateway=1.1.1.2 | interface=${dut1_if2} +| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' +| | ... | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 32 +| | ... | gateway=1.1.1.1 | interface=${dut2_if1} | Initialize IPv4 forwarding with scaling in circular topology | | [Documentation] @@ -535,90 +551,78 @@ | | Vpp Route Add | ${dut} | ${tg_if2_net} | 30 | gateway=3.3.3.1 | | ... | interface=${dut_if2} -| Initialize IPv4 policer 2r3c-${t} in circular topology +| Initialize IPv6 forwarding 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 +| | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node +| | ... | circular topology. Get the interface MAC addresses and setup neighbor +| | ... | on all VPP interfaces. Setup IPv6 addresses with /64 prefix on DUT-TG +| | ... | links. In case of 3-node topology setup IPv6 adresses with /64 prefix +| | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /64 +| | ... | and next hop of neighbour DUT interface IPv4 address. +| | ... +| | ... | *Arguments:* +| | ... | - remote_host1_ip - IP address of remote host1 (Optional). +| | ... | Type: string +| | ... | - remote_host2_ip - IP address of remote host2 (Optional). +| | ... | Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Initialize IPv6 forwarding in circular topology \ +| | ... | \| 3ffe:5f::1 \| 3ffe:5f::2 \| +| | ... +| | [Arguments] | ${remote_host1_ip}=${NONE} | ${remote_host2_ip}=${NONE} +| | ... | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${dut2} +| | ... +| | Set interfaces in path up +| | ... +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | VPP Add IP Neighbor +| | ... | ${dut1} | ${dut1_if2} | 2001:3::1 | ${dut2_if1_mac} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | VPP Add IP Neighbor +| | ... | ${dut2} | ${dut2_if1} | 2001:3::2 | ${dut1_if2_mac} | | ${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 2-node circular topology -| | [Documentation] -| | ... | Set UP state on VPP interfaces in path on nodes in 2-node circular -| | ... | topology. Get the interface MAC addresses and setup neighbour on all -| | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all -| | ... | interfaces. +| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:2::2 | ${tg_if2_mac} | | ... -| | Set interfaces in path up -| | ${prefix}= | Set Variable | 64 -| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1} -| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2} -| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix} -| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:2::1 | ${prefix} -| | Suppress ICMPv6 router advertisement message | ${nodes} -| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac} -| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:2::2 | ${tg1_if2_mac} - -| Initialize IPv6 forwarding 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 neighbour on all -| | ... | VPP interfaces. Setup IPv6 addresses with /128 prefixes on all -| | ... | interfaces. Set routing on both DUT nodes with prefix /64 and -| | ... | next hop of neighbour DUT interface IPv6 address. +| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | 64 +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:3::1 | 64 +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2001:3::2 | 64 +| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:2::1 | 64 | | ... -| | Set interfaces in path up -| | ${prefix}= | Set Variable | 64 -| | ${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} -| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | ${prefix} -| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:3::1 | ${prefix} -| | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2001:3::2 | ${prefix} -| | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} | 2001:2::1 | ${prefix} | | Suppress ICMPv6 router advertisement message | ${nodes} -| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg1_if1_mac} -| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg1_if2_mac} -| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:3::2 | ${dut2_if1_mac} -| | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 2001:3::1 | ${dut1_if2_mac} -| | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | gateway=2001:3::2 +| | ... +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut1} | 2001:2::0 | 24 | gateway=2001:3::2 | | ... | interface=${dut1_if2} -| | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | gateway=2001:3::1 +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut2} | 2001:1::0 | 24 | gateway=2001:3::1 | | ... | interface=${dut2_if1} +| | ... +| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128 +| | ... | gateway=2001:1::2 | interface=${dut1_if1} +| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' +| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 128 +| | ... | gateway=2001:2::2 | interface=${dut_if2} +| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' +| | ... | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128 +| | ... | gateway=2001:3::2 | interface=${dut1_if2} +| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' +| | ... | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 128 +| | ... | gateway=2001:3::1 | interface=${dut2_if1} | Initialize IPv6 forwarding with scaling in circular topology | | [Documentation] @@ -776,26 +780,6 @@ | | 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} | ${skip_n} | ${match_n} -| | ... | 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} | ${skip_n} | ${match_n} -| | ... | 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 @@ -918,17 +902,17 @@ | | VPP Interface Set IP Address | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix} | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1} -| | ... | ${dut1-memif-1-if1_ip6} | ${prefix} +| | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix} | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2} -| | ... | ${dut1-memif-1-if2_ip6} | ${prefix} +| | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix} | | VPP Interface Set IP Address | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix} | | VPP Interface Set IP Address | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix} | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1} -| | ... | ${dut2-memif-1-if1_ip6} | ${prefix} +| | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix} | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2} -| | ... | ${dut2-memif-1-if2_ip6} | ${prefix} +| | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix} | | Suppress ICMPv6 router advertisement message | ${nodes} | | VPP Add IP Neighbor | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac} @@ -1228,7 +1212,7 @@ | | 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} @@ -1731,20 +1715,18 @@ | | ${dut1_ip_start}= | Set Variable | 172.16.0.1 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2 | | ... -| | ${ip_limit} = | Set Variable | 255.255.255.255 -| | ... | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut1} | | ... | node_vxlan_if=${dut1_if2} | node_vlan_if=${dut1_if1} | | ... | op_node=${dut2} | op_node_if=${dut2_if1} | n_tunnels=${vxlan_count} | | ... | vni_start=${vni_start} | src_ip_start=${dut1_ip_start} | | ... | dst_ip_start=${dut2_ip_start} | ip_step=${ip_step} -| | ... | ip_limit=${ip_limit} | bd_id_start=${bd_id_start} +| | ... | bd_id_start=${bd_id_start} | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut2} | | ... | node_vxlan_if=${dut2_if1} | node_vlan_if=${dut2_if2} | | ... | op_node=${dut1} | op_node_if=${dut1_if2} | n_tunnels=${vxlan_count} | | ... | vni_start=${vni_start} | src_ip_start=${dut2_ip_start} | | ... | dst_ip_start=${dut1_ip_start} | ip_step=${ip_step} -| | ... | ip_limit=${ip_limit} | bd_id_start=${bd_id_start} +| | ... | bd_id_start=${bd_id_start} | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology | | [Documentation] @@ -2076,7 +2058,7 @@ | | 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} @@ -2815,10 +2797,8 @@ | | ... | | [Arguments] | ${dut} | ${count} | | ... -| | @{duts}= | Get Matches | ${nodes} | DUT* | | ${dut_index}= | Get Index From List | ${duts} | ${dut} -| | ${duts_length}= | Get Length | ${duts} -| | ${last_dut_index}= | Evaluate | ${duts_length} - ${1} +| | ${last_dut_index}= | Evaluate | ${duts_count} - ${1} | | ... | | ${tg_if1_net}= | Set Variable | 10.10.10.0 | | ${tg_if2_net}= | Set Variable | 20.20.20.0 @@ -2932,7 +2912,6 @@ | | ... | | [Arguments] | ${count}=${1} | | ... -| | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | Initialize IPv4 routing with memif pairs on DUT node | ${dut} | ${count} | | Set interfaces in path up