From cb6b9fd6499a6e2f0efbb87ee84a8e768a7df869 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Fri, 7 Jul 2017 15:05:33 +0200 Subject: CSIT-704: Add ACL IP4BASE perf tests Change-Id: I1fada28f2855534faf3b3051a3efe1cbb4dcdd03 Signed-off-by: Jan Gelety --- .../performance/performance_configuration.robot | 43 ++++++++++++++++++++++ .../robot/performance/performance_setup.robot | 28 ++++++++++++-- .../trex/trex-sl-3n-ethip4udp-100u1000p-conc.py | 26 ++++++------- .../trex/trex-sl-3n-ethip4udp-10u1000p-conc.py | 26 ++++++------- .../trex/trex-sl-3n-ethip4udp-10u10p-conc.py | 26 ++++++------- 5 files changed, 107 insertions(+), 42 deletions(-) (limited to 'resources') diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index adf233d4ba..4d0e53f896 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 @@ -851,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 diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot index de50fd3254..6e46e3bc0d 100644 --- a/resources/libraries/robot/performance/performance_setup.robot +++ b/resources/libraries/robot/performance/performance_setup.robot @@ -531,16 +531,38 @@ | | ... | *Arguments:* | | ... | - rate - Rate for sending packets. Type: string | | ... | - framesize - L2 Frame Size [B]. Type: integer -| | ... | - topology_type - Topology type. Type: string +| | ... | - traffic_profile - Traffic profile. Type: string | | ... | | ... | *Example:* | | ... -| | ... | \| Tear down performance discovery test with SNAT \| 4.0mpps \| 64 \ +| | ... | \| Tear down performance discovery test with SNAT \| 100000pps \| 64 \ | | ... | \| ${traffic_profile} \| | | ... | | [Arguments] | ${rate} | ${framesize} | ${traffic_profile} | | ... -| | Tear down performance discovery test | ${rate}pps | ${framesize} +| | Tear down performance discovery test | ${rate} | ${framesize} | | ... | ${traffic_profile} | | Show SNAT verbose | ${dut1} | | Show SNAT verbose | ${dut2} + +| Tear down performance test with ACL +| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \ +| | ... | tests with ACL feature used. +| | ... +| | ... | *Arguments:* +| | ... | - rate - Rate for sending packets. Type: string +| | ... | - framesize - L2 Frame Size [B]. Type: integer +| | ... | - traffic_profile - Traffic profile. Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Tear down performance test with ACL \| 100000pps \| 64 \ +| | ... | \| ${traffic_profile} \| +| | ... +| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile} +| | ... +| | Tear down performance discovery test | ${rate} | ${framesize} +| ... | ${traffic_profile} +| | Vpp Log Plugin Acl Settings | ${dut1} +| | Run Keyword And Ignore Error | Vpp Log Plugin Acl Interface Assignment +| ... | ${dut1} diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py index 2f8b782ca6..02d9cda075 100755 --- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py +++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py @@ -17,13 +17,13 @@ Stream profile: - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time. - Packet: ETH / IP / UDP - Direction 0 --> 1: - - Source IP address range: 10.10.10.0 - 10.10.10.99 - - Destination IP address range: 20.20.20.0 - 20.20.20.99 + - Source IP address range: 10.10.10.2 - 10.10.10.101 + - Destination IP address range: 20.20.20.2 - 20.20.20.101 - Source UDP port range: 1001 - 2000 - Destination UDP port range: 2001 - 3000 - Direction 1 --> 0: - - Source IP address range: 20.20.20.0 - 20.20.20.99 - - Destination IP address range: 10.10.10.0 - 10.10.10.99 + - Source IP address range: 20.20.20.2 - 20.20.20.101 + - Destination IP address range: 10.10.10.2 - 10.10.10.101 - Source UDP port range: 2001-3000 - Destination UDP port range: 1001 - 2000 """ @@ -41,15 +41,15 @@ class TrafficStreams(TrafficStreamsBaseClass): super(TrafficStreamsBaseClass, self).__init__() # IPs used in packet headers. - self.p1_src_start_ip = '10.10.10.0' - self.p1_src_end_ip = '10.10.10.99' - self.p1_dst_start_ip = '20.20.20.0' - self.p1_dst_end_ip = '20.20.20.99' - - self.p2_src_start_ip = '20.20.20.0' - self.p2_src_end_ip = '20.20.20.99' - self.p2_dst_start_ip = '10.10.10.0' - self.p2_dst_end_ip = '10.10.10.99' + self.p1_src_start_ip = '10.10.10.2' + self.p1_src_end_ip = '10.10.10.101' + self.p1_dst_start_ip = '20.20.20.2' + self.p1_dst_end_ip = '20.20.20.101' + + self.p2_src_start_ip = '20.20.20.2' + self.p2_src_end_ip = '20.20.20.101' + self.p2_dst_start_ip = '10.10.10.2' + self.p2_dst_end_ip = '10.10.10.101' # UDP ports used in packet headers. self.p1_src_start_udp_port = 1001 diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py index b0362aedcd..847eccdf0a 100755 --- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py +++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py @@ -17,13 +17,13 @@ Stream profile: - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time. - Packet: ETH / IP / UDP - Direction 0 --> 1: - - Source IP address range: 10.10.10.0 - 10.10.10.9 - - Destination IP address range: 20.20.20.0 - 20.20.20.9 + - Source IP address range: 10.10.10.2 - 10.10.10.11 + - Destination IP address range: 20.20.20.2 - 20.20.20.11 - Source UDP port range: 1001 - 2000 - Destination UDP port range: 2001 - 3000 - Direction 1 --> 0: - - Source IP address range: 20.20.20.0 - 20.20.20.9 - - Destination IP address range: 10.10.10.0 - 10.10.10.9 + - Source IP address range: 20.20.20.2 - 20.20.20.11 + - Destination IP address range: 10.10.10.2 - 10.10.10.11 - Source UDP port range: 2001-3000 - Destination UDP port range: 1001 - 2000 """ @@ -41,15 +41,15 @@ class TrafficStreams(TrafficStreamsBaseClass): super(TrafficStreamsBaseClass, self).__init__() # IPs used in packet headers. - self.p1_src_start_ip = '10.10.10.0' - self.p1_src_end_ip = '10.10.10.9' - self.p1_dst_start_ip = '20.20.20.0' - self.p1_dst_end_ip = '20.20.20.9' - - self.p2_src_start_ip = '20.20.20.0' - self.p2_src_end_ip = '20.20.20.9' - self.p2_dst_start_ip = '10.10.10.0' - self.p2_dst_end_ip = '10.10.10.9' + self.p1_src_start_ip = '10.10.10.2' + self.p1_src_end_ip = '10.10.10.11' + self.p1_dst_start_ip = '20.20.20.2' + self.p1_dst_end_ip = '20.20.20.11' + + self.p2_src_start_ip = '20.20.20.2' + self.p2_src_end_ip = '20.20.20.11' + self.p2_dst_start_ip = '10.10.10.2' + self.p2_dst_end_ip = '10.10.10.11' # UDP ports used in packet headers. self.p1_src_start_udp_port = 1001 diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py index 76ccb53259..81d113350b 100755 --- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py +++ b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py @@ -17,13 +17,13 @@ Stream profile: - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time. - Packet: ETH / IP / UDP - Direction 0 --> 1: - - Source IP address range: 10.10.10.0 - 10.10.10.9 - - Destination IP address range: 20.20.20.0 - 20.20.20.9 + - Source IP address range: 10.10.10.2 - 10.10.10.11 + - Destination IP address range: 20.20.20.2 - 20.20.2011 - Source UDP port range: 1001 - 1010 - Destination UDP port range: 2001 - 2010 - Direction 1 --> 0: - - Source IP address range: 20.20.20.0 - 20.20.20.9 - - Destination IP address range: 10.10.10.0 - 10.10.10.9 + - Source IP address range: 20.20.20.2 - 20.20.20.11 + - Destination IP address range: 10.10.10.2 - 10.10.10.11 - Source UDP port range: 2001-2010 - Destination UDP port range: 1001 - 1010 """ @@ -41,15 +41,15 @@ class TrafficStreams(TrafficStreamsBaseClass): super(TrafficStreamsBaseClass, self).__init__() # IPs used in packet headers. - self.p1_src_start_ip = '10.10.10.0' - self.p1_src_end_ip = '10.10.10.9' - self.p1_dst_start_ip = '20.20.20.0' - self.p1_dst_end_ip = '20.20.20.9' - - self.p2_src_start_ip = '20.20.20.0' - self.p2_src_end_ip = '20.20.20.9' - self.p2_dst_start_ip = '10.10.10.0' - self.p2_dst_end_ip = '10.10.10.9' + self.p1_src_start_ip = '10.10.10.2' + self.p1_src_end_ip = '10.10.10.11' + self.p1_dst_start_ip = '20.20.20.2' + self.p1_dst_end_ip = '20.20.20.11' + + self.p2_src_start_ip = '20.20.20.2' + self.p2_src_end_ip = '20.20.20.11' + self.p2_dst_start_ip = '10.10.10.2' + self.p2_dst_end_ip = '10.10.10.11' # UDP ports used in packet headers. self.p1_src_start_udp_port = 1001 -- cgit 1.2.3-korg