Framework: Add possibility to send ramp-up traffic 88/29088/25
authorJan Gelety <jgelety@cisco.com>
Fri, 11 Sep 2020 07:07:13 +0000 (09:07 +0200)
committerJan Gelety <jgelety@cisco.com>
Wed, 30 Sep 2020 18:37:43 +0000 (18:37 +0000)
Change-Id: Ie24184ca4ac2d6c7abc32f0f103e10bc402ad93b
Signed-off-by: Jan Gelety <jgelety@cisco.com>
resources/libraries/robot/ip/nat.robot
resources/libraries/robot/performance/performance_utils.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1-p1-s1-ndrpdr.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h1024-p63-s64512-ndrpdr.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h16384-p63-s1032192-ndrpdr.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h262144-p63-s16515072-ndrpdr.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h4096-p63-s258048-ndrpdr.robot
tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44det-h65536-p63-s4128758-ndrpdr.robot

index 2c88cbb..b78575a 100644 (file)
 | |
 | | 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.
 | |
index 34c8c99..69402dc 100644 (file)
 | # 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
 | | ... | ${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
 | | 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}
 | | 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.
 | | ... | 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.
index 68e9723..6a695b8 100644 (file)
 | ${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
 | |
 | | 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}
 | | 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
index e8daa64..e026893 100644 (file)
 | ${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
 | |
 | | 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}
 | | 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
index dd5276a..30ee082 100644 (file)
 | ${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
 | |
 | | 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}
 | | 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
index 91f658a..a01ce52 100644 (file)
 | ${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}
 
 | |
 | | 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}
 | | 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
index 54ab91e..0b1d3f7 100644 (file)
 | ${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
 | |
 | | 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}
 | | 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
index 6dea556..0b78790 100644 (file)
 | ${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}
 
 | |
 | | 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}
 | | 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