diff options
author | Jan Gelety <jgelety@cisco.com> | 2020-09-11 09:07:13 +0200 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2020-09-30 18:37:43 +0000 |
commit | 61044d391d6e8d6b47d0d4f156071bd61cd278df (patch) | |
tree | 20deaffb6b3870ccc1ec60dafc9808acd268dac1 | |
parent | 9d1e30c42116cba10e6b3136aff8a466e70dcf7b (diff) |
Framework: Add possibility to send ramp-up traffic
Change-Id: Ie24184ca4ac2d6c7abc32f0f103e10bc402ad93b
Signed-off-by: Jan Gelety <jgelety@cisco.com>
8 files changed, 86 insertions, 83 deletions
diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot index 2c88cbb294..b78575a960 100644 --- a/resources/libraries/robot/ip/nat.robot +++ b/resources/libraries/robot/ip/nat.robot @@ -191,6 +191,12 @@ | | | | Show DET44 | ${node} +| Verify DET44 sessions number on DUT1 node +| | [Documentation] | Verify that all required DET44 sessions are established on +| | ... | DUT1 node. +| | +| | Verify DET44 sessions number | ${nodes['DUT1']} | ${n_sessions} + | Verify DET44 sessions number | | [Documentation] | Verify that all required DET44 sessions are established. | | diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index 34c8c997a1..69402dcd41 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -34,11 +34,6 @@ | # that means the main heap size will be set to 2G. Some tests may require more | # memory for IP FIB (e.g. nat44det tests with 4M or 16M sessions). | ${heap_size_mult}= | ${1} -| # Variable holding trial duration extension [s] used in pre_stats action -| # clear-show-runtime-with-traffic. By default it is set to 0 but some -| # tests (e.g. NAT) needs this duration extension in ramp up phase (e.g. to -| # create all required nat sessions). -| ${pre_stats_duration_ext}= | ${0} *** Keywords *** | Find NDR and PDR intervals using optimized search @@ -468,13 +463,12 @@ | | ... | ${extended_debug}=${extended_debug} | ${latency}=${False} | | | | Set Test Variable | ${extended_debug} -| | # Following setting of test variables is needed as -| | # "Clear and show runtime counters with running traffic" has been moved to -| | # pre_stats actions. +| | # Following setting of test variables is needed for some pre_stats actions. | | Set Test Variable | ${rate} | | Set Test Variable | ${traffic_directions} | | Set Test Variable | ${tx_port} | | Set Test Variable | ${rx_port} +| | | | FOR | ${action} | IN | @{pre_stats} | | | Run Keyword | Additional Statistics Action For ${action} | | END @@ -482,10 +476,10 @@ | | FOR | ${i} | IN RANGE | ${trial_multiplicity} | | | # The following line is skipping some default arguments, | | | # that is why subsequent arguments have to be named. -| | | Send traffic on tg | ${trial_duration} | ${rate} | ${frame_size} -| | | ... | ${traffic_profile} | warmup_time=${0} -| | | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port} -| | | ... | rx_port=${rx_port} | latency=${latency} +| | | Send traffic on tg +| | | ... | ${trial_duration} | ${rate} | ${frame_size} | ${traffic_profile} +| | | ... | warmup_time=${0} | traffic_directions=${traffic_directions} +| | | ... | tx_port=${tx_port} | rx_port=${rx_port} | latency=${latency} | | | ${rx} = | Get Received | | | ${rr} = | Evaluate | ${rx} / ${trial_duration} | | | Append To List | ${results} | ${rr} @@ -579,6 +573,37 @@ | | END | | Stop traffic on tg +| Send ramp-up traffic +| | [Documentation] +| | ... | Start ramp-up traffic at specified rate for defined duration. +| | +| | ... | *Arguments:* +| | ... | - duration - Duration of traffic run [s]. Type: integer +| | ... | - rate - Rate [pps] for sending packets in case of T-Rex stateless +| | ... | mode or multiplier of profile CPS in case of T-Rex astf mode. +| | ... | Type: float +| | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer or string +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string +| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. +| | ... | Type: integer +| | ... | - tx_port - TX port of TG; default value: 0. Type: integer +| | ... | - rx_port - RX port of TG, default value: 1. Type: integer +| | +| | ... | *Example:* +| | +| | ... | \| Send ramp-up traffic \| \${10} \| ${400000.0} \| ${64} \ +| | ... | \| ${2} \| ${0} \| ${1} \| +| | +| | [Arguments] | ${duration}=${ramp_up_duration} | ${rate}=${ramp_up_rate} +| | ... | ${frame_size}=${frame_size} | ${traffic_profile}=${traffic_profile} +| | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1} +| | +| | Send traffic on tg +| | ... | ${duration} | ${rate} | ${frame_size} | ${traffic_profile} +| | ... | warmup_time=${0} | traffic_directions=${traffic_directions} +| | ... | tx_port=${tx_port} | rx_port=${rx_port} | latency=${False} + | Start Traffic on Background | | [Documentation] | | ... | Start traffic at specified rate then return control to Robot. @@ -690,21 +715,11 @@ | | ... | Additional Statistics Action for clear and show runtime counters with | | ... | running traffic. | | -| | ${trial_duration}= | Evaluate -| | ... | ${trial_duration} + ${pre_stats_duration_ext} -| | ${rate}= | Get Variable Value | ${pre_stats_rate} | ${rate} | | Clear and show runtime counters with running traffic | | ... | ${trial_duration} | ${rate} | | ... | ${frame_size} | ${traffic_profile} | ${traffic_directions} | | ... | ${tx_port} | ${rx_port} -| Additional Statistics Action For vpp-det44-verify-sessions -| | [Documentation] -| | ... | Additional Statistics Action to verify that all required DET44 -| | ... | sessions are established. -| | -| | Verify DET44 sessions number | ${nodes['DUT1']} | ${n_sessions} - | Additional Statistics Action For noop | | [Documentation] | | ... | Additional Statistics Action for no operation. diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1-p1-s1-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1-p1-s1-ndrpdr.robot index 68e9723061..6a695b8248 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1-p1-s1-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1-p1-s1-ndrpdr.robot @@ -82,8 +82,11 @@ | ${n_hosts}= | ${1} | ${n_ports}= | ${1} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Ramp-up settings +| ${ramp_up_rate}= | ${500000} +| ${ramp_up_duration}= | ${1} # Traffic profile -| ${traffic_profile}= | trex-stl-2n-ethip4udp-1u1p +| ${traffic_profile}= | trex-stl-2n-ethip4udp-${n_hosts}u${n_ports}p *** Keywords *** | Local Template @@ -103,13 +106,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${500000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -118,7 +114,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h1-p1-s1-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr.robot index e8daa6484e..e0268934cf 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr.robot @@ -79,8 +79,11 @@ | ${n_hosts}= | ${1024} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Ramp-up settings +| ${ramp_up_rate}= | ${500000} +| ${ramp_up_duration}= | ${1} # Traffic profile -| ${traffic_profile}= | trex-stl-ethip4udp-1024u63p +| ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p *** Keywords *** | Local Template @@ -100,13 +103,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${500000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -115,7 +111,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr.robot index dd5276a4db..30ee082baa 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr.robot @@ -79,8 +79,11 @@ | ${n_hosts}= | ${16384} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Ramp-up settings +| ${ramp_up_rate}= | ${400000} +| ${ramp_up_duration}= | ${5.5} # Traffic profile -| ${traffic_profile}= | trex-stl-ethip4udp-16384u63p +| ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p *** Keywords *** | Local Template @@ -100,15 +103,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Trial duration extension for pre_stat action -| | Set Test Variable | ${pre_stats_duration_ext} | ${2.1} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${400000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -117,7 +111,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr.robot index 91f658ab50..a01ce5228d 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr.robot @@ -79,8 +79,11 @@ | ${n_hosts}= | ${262144} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Ramp-up settings +| ${ramp_up_rate}= | ${200000} +| ${ramp_up_duration}= | ${82.8} # Traffic profile -| ${traffic_profile}= | trex-stl-ethip4udp-262144u63p +| ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p # Main heap size multiplicator | ${heap_size_mult}= | ${3} @@ -102,15 +105,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Trial duration extension for pre_stat action -| | Set Test Variable | ${pre_stats_duration_ext} | ${80.1} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${200000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -119,7 +113,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr.robot index 54ab91e7b4..0b1d3f7865 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr.robot @@ -79,8 +79,11 @@ | ${n_hosts}= | ${4096} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile -| ${traffic_profile}= | trex-stl-ethip4udp-4096u63p +# Ramp-up settings +| ${ramp_up_rate}= | ${400000} +| ${ramp_up_duration}= | ${1.6} +# Traffic profil +| ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p *** Keywords *** | Local Template @@ -100,13 +103,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${500000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -115,7 +111,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr.robot index 6dea5567b4..0b787900c9 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr.robot @@ -79,8 +79,11 @@ | ${n_hosts}= | ${65536} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Ramp-up settings +| ${ramp_up_rate}= | ${200000} +| ${ramp_up_duration}= | ${23.5} # Traffic profile -| ${traffic_profile}= | trex-stl-ethip4udp-65536u63p +| ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p # Main heap size multiplicator | ${heap_size_mult}= | ${2} @@ -102,15 +105,6 @@ | | | | Set Test Variable | \${frame_size} | | -| | ${pre_stats}= | Create List -| | ... | clear-show-runtime-with-traffic | vpp-det44-verify-sessions -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog -| | Set Test Variable | ${pre_stats} -| | # Trial duration extension for pre_stat action -| | Set Test Variable | ${pre_stats_duration_ext} | ${22.5} -| | # Reduce the rate for pre_stat action -| | Set Test Variable | ${pre_stats_rate} | ${200000} -| | | | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} @@ -119,7 +113,9 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 deterministic mode in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | Then Send ramp-up traffic +| | And Verify DET44 sessions number on DUT1 node +| | And Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr |