diff options
author | Vratko Polak <vrpolak@cisco.com> | 2020-10-28 12:50:10 +0100 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2020-10-26 12:42:00 +0100 |
commit | de5e719fbd965e2f8e26b7f3a9cd597b572d7ab3 (patch) | |
tree | f2ee97e9d100cf20358f6c73e9b37101a3789103 | |
parent | 90eec3d17f8a45f816b2df03dc8fed9d13ef76cd (diff) |
Support existing test types with ASTF
Manual cherry-pick from master [1],
reverting impact of [2] and [3].
[1] https://gerrit.fd.io/r/c/csit/+/28208/176
[2] https://gerrit.fd.io/r/c/csit/+/29077
[3] https://gerrit.fd.io/r/c/csit/+/29529
The heap multipliers are left in suites,
as that simplifies cherry-picking between branches.
Original [0] commit message:
Support existing test types with ASTF
+ Add UDP_CPS, TCP_CPS, UDP_PPS and TCP_PPS suites.
+ Update existing cps traffic profiles.
+ Add missing traffic profiles.
+ UDP:
+ Single burst of 32 packets was confirmed as safe enough for TRex.
+ Maybe 64 could work, but not enough testing for that.
+ Multiple bursts have lead to reduced TRex performance,
as overlaping bursts (from different client instances)
tend to fill up the buffers.
+ TCP:
+ Data size set to 11111 bytes, completely arbitrarily.
+ Results look reasonable, so I have kept that.
- MSS not set at all
- No tested support for frame size other than 64B.
- Frame size does not even factor into TCP profiles.
+ So other frame sizes are skipped in autogen.
+ Update tags in related suites.
- HOSTS_{n} and SRC_USER_{n} should be unified.
- Questionable clarification on difference between IP4BASE and SCALE.
+ Add NAT state resetters to tests that need them.
+ Resetter is called (if set) before each measurement.
+ If ramp-up is detected, resetter is not set.
+ Rename "mult" argument to "multiplier".
+ Abstracted from packets to transactions.
+ Transaction corresponds to profile.
+ TRex multiplier argument sets target rate in transactions per second.
+ The familiar STL traffic:
+ Bidirectional is considered to be 2 packets per transaction.
+ Unidirectional is considered to be 1 packet per transaction.
+ The newer ASTF traffic:
+ 4 subtypes, each has different number of packets per transaction.
+ For max rate computation:
+ Packets in the more numerous direction are considered.
+ Rely on TRex reported traffic duration for ASTF:
+ Use the server side value.
- Client side value is higher by an overhead.
- TRex is not sending traffic during that time.
+ Remove delays from traffic profiles.
- Those delays would increase the reprted traffic time.
+ Support for scale lmited trials.
+ Only for ASTF profiles, each ASTF profile has limited scale.
+ Scale defined in suite variables.
+ For TRex to send all transactions provided duration value is ignored.
+ The appropriate value is computed in TrafficGenerator.
+ An ad-hoc time constant is added to match the TRex client side time overhead.
+ The profile driver receives the computed duration.
+ Measurement for PLRsearch add a sleep if the computed duration is smaller.
+ Alternative argument for search algos if scale is limited.
+ Both need higher timeout to accomodate big scales.
+ MLRsearch can afford fewer phases.
+ Added a parameter to optionally shorten the duration.
+ Use short duration for runtime stats trial and failure stats trial.
+ Use very large keepalive values in udp profiles to avoid ka packets.
+ No polling in ASTF profile driver.
- Polling could eliminate the time overhead value.
+ But polling proved to introduce some loss, affecting the results.
+ Handle duration stretching in ASTF by stopping traffic.
+ The stop has several steps so that:
+ The traffic is really stopped entirely.
+ Late packets do not count (maybe as errors).
+ Stats are preserved to read for results (and cleared afterwards).
+ Several quantities added to ReceiveRateMeasurement:
+ Original target duration is preserved (algos need that).
+ Input estimate (tps) for early search iterations.
+ Output estimate (maybe pps) for MRR output.
+ Strict result (unsent counts as loss) for NDR.
+ Use L2 counters (opackets, ipackets) where possible.
- TRex has trouble processing packets for the L7 ones at high loads.
+ Remove warmup from profile drivers and keywords.
+ Suites should call "Send ramp-up traffic" explicitly if needed.
+ Added parsing for few more counters.
+ Both to use in formulas or just for debug purposes.
- Only 64B cases in autogen, framesize support to be added later.
+ Latency streams during search can be enabled via PERF_USE_LATENCY env var.
+ MLRsearch improvments:
+ Rename argument names to min_rate and max_rate.
+ Use relative receive rate in initial phase.
+ PLRsearch improvements:
+ Careful computation when output (pps) does not match input (tps).
+ Use geometric distribution (instead of Poisson).
+ Helps agains math errors.
+ This should improve estimate stability.
- But in practice big losses still lead to significant jumps.
+ Traffic generator improvements:
+ send_traffic_on_tg now calls the full set_rate_provider_defaults.
+ _send_traffic_on_tg_internal for the logic without provider defaults.
+ As the internal function is re-used by measure() without affecting defaults.
+ Move _parse_traffic_results just before get_measurement_result.
+ As the latter uses fields set bu the former, it is now easier to read.
+ Multiple sources for approximate duration.
+ Tried from more precise to more available.
+ Includes logic for _pps tests (added in later change).
+ Move explicit type conversions to earlier occurences.
+ Profile driver output field uses semicolons to simplify parsing.
+ Performance Robot lib file split to several smaller ones.
+ performance_actions.robot:
+ Hosts Additional Statistics Action For * keywords.
+ performance_display.robot:
+ Hosts keyword for displaying and verifying results.
+ Change test message to use the correct unit (pps or cps).
+ performance_limits.robot renamed to performance_vars.robot
+ Added many keywords, mostly for accessing test variables.
+ Moved variables for Policer into a new keyword there.
+ Some keywords need sophisticated logic.
- Other are basically Get Variable Value.
+ But in future more logic can be added, without editing callers.
+ Documentation for the new keywords acts as a documentation for test variables.
+ performance_utils.robot has the rest.
+ Eliminated arguments if the value is in test variable.
+ Small improvements to documentation.
- Still not enough cleanup with respect to arguments and test variables.
+ Keywords are sorted alphabetically now in each one.
+ Suites:
+ Unified variables table:
+ No colons in comments.
+ ${n_hosts}, ${n_ports} and use them instead hardcoded numbers.
+ Add -cps to existing cps suite names.
+ Remove "trial data overwrite".
+ Compute max rate as in STL suites.
+ Each NAT suite has ip4base suite to compare results to.
- Those act as indirect TRex calibration.
- VPP does not lose packets in those.
+ Latency in ASTF suites is disabled hard.
- As we do not support latency in ASTF profiles yet.
+ Unidirectional tests governed by suite variable, not an argument.
+ Write long argument lists vertically.
+ Prefer to use argument names.
+ In Python, also the last argument is followed by comma.
+ It makes renaming and reordering easier.
+ Similarly applies to prints with long lists of values.
+ A TODO to update api crc file comments.
Change-Id: I84729355edbec051298a9de1162107f88ff5737d
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Signed-off-by: Jan Gelety <jgelety@cisco.com>
159 files changed, 6632 insertions, 2555 deletions
diff --git a/GPL/tools/trex/trex_astf_profile.py b/GPL/tools/trex/trex_astf_profile.py index 0542486105..63831e4bf4 100644 --- a/GPL/tools/trex/trex_astf_profile.py +++ b/GPL/tools/trex/trex_astf_profile.py @@ -15,7 +15,7 @@ """This module gets T-Rex advanced stateful (astf) traffic profile together with other parameters, reads the profile and sends the traffic. At the end, it -measures the packet loss and latency. +parses for various counters. """ import argparse @@ -60,8 +60,16 @@ def fmt_latency(lat_min, lat_avg, lat_max, hdrh): def simple_burst( - profile_file, duration, framesize, mult, warmup_time, port_0, port_1, - latency, async_start=False, traffic_directions=2): + profile_file, + duration, + framesize, + multiplier, + port_0, + port_1, + latency, + async_start=False, + traffic_directions=2, + ): """Send traffic and measure packet loss and latency. Procedure: @@ -70,20 +78,36 @@ def simple_burst( - resets the ports, - removes all existing streams, - adds streams from the traffic profile to the ports, - - if the warm-up time is more than 0, sends the warm-up traffic, reads the - statistics, - clears the statistics from the client, - starts the traffic, - waits for the defined time (or runs forever if async mode is defined), - - stops the traffic, + - explicitly stops the traffic, - reads and displays the statistics and - disconnects from the client. + Duration details: + Contrary to stateless mode, ASTF profiles typically limit the number + of flows/transactions that can happen. + The caller is expected to set the duration parameter accordingly to + this limit and multiplier, including any overheads. + See *_traffic_duration output fields for TRex's measurement + of the real traffic duration (should be without any inactivity overheads). + If traffic has not ended by the final time, the traffic + is stopped explicitly, counters reflect the state just after the stop. + + TODO: Support tests which focus only on some transaction phases, + e.g. TCP tests ignoring init and teardown separated by delays. + Currently, approximated time measures the whole traffic duration. + :param profile_file: A python module with T-rex traffic profile. - :param duration: Duration of traffic run in seconds (-1=infinite). + :param duration: Expected duration for all transactions to finish, + assuming only tolerable duration stretching happens. + This includes later start of later transactions + (according to TPS multiplier) and expected duration of each transaction. + Critically, this also includes any delay TRex shows when starting + traffic (but not the similar delay during stopping). :param framesize: Frame size. - :param mult: Multiplier of profile CPS. - :param warmup_time: Traffic warm-up time in seconds, 0 = disable. + :param multiplier: Multiplier of profile CPS. :param port_0: Port 0 on the traffic generator. :param port_1: Port 1 on the traffic generator. :param latency: With latency stats. @@ -92,8 +116,7 @@ def simple_burst( :type profile_file: str :type duration: float :type framesize: int or str - :type mult: int - :type warmup_time: float + :type multiplier: int :type port_0: int :type port_1: int :type latency: bool @@ -101,7 +124,7 @@ def simple_burst( :type traffic_directions: int """ client = None - total_rcvd = 0 + total_received = 0 total_sent = 0 lost_a = 0 lost_b = 0 @@ -111,7 +134,6 @@ def simple_burst( lat_b_hist = u"" l7_data = u"" stats = dict() - stats_sampling = 1.0 approximated_duration = 0 # Read the profile. @@ -139,37 +161,6 @@ def simple_burst( if traffic_directions > 1: ports.append(port_1) - # Warm-up phase. - if warmup_time > 0: - # Clear the stats before injecting. - client.clear_stats() - # Choose CPS and start traffic. - client.start(mult=mult, duration=warmup_time) - time_start = time.monotonic() - - # Read the stats after the warmup duration (no sampling needed). - time.sleep(warmup_time) - stats[time.monotonic()-time_start] = client.get_stats() - - if client.get_warnings(): - for warning in client.get_warnings(): - print(warning) - - client.reset() - - print(u"##### Warmup Statistics #####") - print(json.dumps(stats, indent=4, separators=(u",", u": "))) - - # TODO: check stats format - stats = stats[sorted(stats.keys())[-1]] - lost_a = stats[port_0][u"opackets"] - stats[port_1][u"ipackets"] - if traffic_directions > 1: - lost_b = stats[port_1][u"opackets"] - stats[port_0][u"ipackets"] - - print(f"packets lost from {port_0} --> {port_1}: {lost_a} pkts") - if traffic_directions > 1: - print(f"packets lost from {port_1} --> {port_0}: {lost_b} pkts") - # Clear the stats before injecting. lost_a = 0 lost_b = 0 @@ -177,21 +168,15 @@ def simple_burst( # Choose CPS and start traffic. client.start( - mult=mult, duration=duration, nc=True, - latency_pps=mult if latency else 0, client_mask=2**len(ports)-1 + mult=multiplier, + # Increase the input duration slightly, + # to ensure it does not end before sleep&stop below happens. + duration=duration + 0.1 if duration > 0 else duration, + nc=True, + latency_pps=int(multiplier) if latency else 0, + client_mask=2**len(ports)-1, ) time_start = time.monotonic() - # t-rex starts the packet flow with the delay - stats[time.monotonic()-time_start] = client.get_stats(ports=[port_0]) - while stats[sorted(stats.keys())[-1]][port_0][u"opackets"] == 0: - stats.clear() - time.sleep(0.001) - stats[time.monotonic() - time_start] = \ - client.get_stats(ports=[port_0]) - else: - trex_start_time = list(sorted(stats.keys()))[-1] - time_start += trex_start_time - stats.clear() if async_start: # For async stop, we need to export the current snapshot. @@ -201,26 +186,27 @@ def simple_burst( xsnap1 = client.ports[port_1].get_xstats().reference_stats print(f"Xstats snapshot 1: {xsnap1!r}") else: - time.sleep( - stats_sampling if stats_sampling < duration else duration + time.sleep(duration) + + # Do not block yet, the existing transactions may take long time + # to finish. We need an action that is almost reset(), + # but without clearing stats. + client.stop(block=False) + client.stop_latency() + client.remove_rx_queue(client.get_all_ports()) + # Now we can wait for the real traffic stop. + client.stop(block=True) + + # Read the stats after the traffic stopped (or time up). + stats[time.monotonic() - time_start] = client.get_stats( + ports=ports ) - # Do not block until done. - while client.is_traffic_active(ports=ports): - # Sample the stats. - stats[time.monotonic()-time_start] = \ - client.get_stats(ports=ports) - time.sleep( - stats_sampling if stats_sampling < duration else duration - ) - else: - # Read the stats after the test - stats[time.monotonic()-time_start] = \ - client.get_stats(ports=ports) if client.get_warnings(): for warning in client.get_warnings(): print(warning) + # Now finish the complete reset. client.reset() print(u"##### Statistics #####") @@ -253,8 +239,10 @@ def simple_burst( if traffic_directions > 1: total_sent = \ stats[port_0][u"opackets"] + stats[port_1][u"opackets"] - total_rcvd = \ + total_received = \ stats[port_0][u"ipackets"] + stats[port_1][u"ipackets"] + client_sent = stats[port_0][u"opackets"] + client_received = stats[port_0][u"ipackets"] client_stats = stats[u"traffic"][u"client"] server_stats = stats[u"traffic"][u"server"] # Some zero counters are not sent @@ -263,109 +251,112 @@ def simple_burst( c_act_flows = client_stats[u"m_active_flows"] c_est_flows = client_stats[u"m_est_flows"] c_traffic_duration = client_stats.get(u"m_traffic_duration", 0) - l7_data = f"client_active_flows={c_act_flows}, " - l7_data += f"client_established_flows={c_est_flows}, " - l7_data += f"client_traffic_duration={c_traffic_duration}, " + l7_data = f"client_active_flows={c_act_flows}; " + l7_data += f"client_established_flows={c_est_flows}; " + l7_data += f"client_traffic_duration={c_traffic_duration}; " # Possible errors # Too many packets in NIC rx queue c_err_rx_throttled = client_stats.get(u"err_rx_throttled", 0) - l7_data += f"client_err_rx_throttled={c_err_rx_throttled}, " + l7_data += f"client_err_rx_throttled={c_err_rx_throttled}; " # Number of client side flows that were not opened # due to flow-table overflow c_err_nf_throttled = client_stats.get(u"err_c_nf_throttled", 0) - l7_data += f"client_err_nf_throttled={c_err_nf_throttled}, " + l7_data += f"client_err_nf_throttled={c_err_nf_throttled}; " # Too many flows c_err_flow_overflow = client_stats.get(u"err_flow_overflow", 0) - l7_data += f"client_err_flow_overflow={c_err_flow_overflow}, " + l7_data += f"client_err_flow_overflow={c_err_flow_overflow}; " # Server s_act_flows = server_stats[u"m_active_flows"] s_est_flows = server_stats[u"m_est_flows"] s_traffic_duration = server_stats.get(u"m_traffic_duration", 0) - l7_data += f"server_active_flows={s_act_flows}, " - l7_data += f"server_established_flows={s_est_flows}, " - l7_data += f"server_traffic_duration={s_traffic_duration}, " + l7_data += f"server_active_flows={s_act_flows}; " + l7_data += f"server_established_flows={s_est_flows}; " + l7_data += f"server_traffic_duration={s_traffic_duration}; " # Possible errors # Too many packets in NIC rx queue s_err_rx_throttled = server_stats.get(u"err_rx_throttled", 0) - l7_data += f"client_err_rx_throttled={s_err_rx_throttled}, " + l7_data += f"client_err_rx_throttled={s_err_rx_throttled}; " if u"udp" in profile_file: # Client # Established connections c_udp_connects = client_stats.get(u"udps_connects", 0) - l7_data += f"client_udp_connects={c_udp_connects}, " + l7_data += f"client_udp_connects={c_udp_connects}; " # Closed connections c_udp_closed = client_stats.get(u"udps_closed", 0) - l7_data += f"client_udp_closed={c_udp_closed}, " + l7_data += f"client_udp_closed={c_udp_closed}; " # Sent bytes c_udp_sndbyte = client_stats.get(u"udps_sndbyte", 0) - l7_data += f"client_udp_tx_bytes={c_udp_sndbyte}, " + l7_data += f"client_udp_tx_bytes={c_udp_sndbyte}; " # Sent packets c_udp_sndpkt = client_stats.get(u"udps_sndpkt", 0) - l7_data += f"client_udp_tx_packets={c_udp_sndpkt}, " + l7_data += f"client_udp_tx_packets={c_udp_sndpkt}; " # Received bytes c_udp_rcvbyte = client_stats.get(u"udps_rcvbyte", 0) - l7_data += f"client_udp_rx_bytes={c_udp_rcvbyte}, " + l7_data += f"client_udp_rx_bytes={c_udp_rcvbyte}; " # Received packets c_udp_rcvpkt = client_stats.get(u"udps_rcvpkt", 0) - l7_data += f"client_udp_rx_packets={c_udp_rcvpkt}, " + l7_data += f"client_udp_rx_packets={c_udp_rcvpkt}; " # Keep alive drops c_udp_keepdrops = client_stats.get(u"udps_keepdrops", 0) - l7_data += f"client_udp_keep_drops={c_udp_keepdrops}, " + l7_data += f"client_udp_keep_drops={c_udp_keepdrops}; " + # Client without flow + c_err_cwf = client_stats.get(u"err_cwf", 0) + l7_data += f"client_err_cwf={c_err_cwf}; " # Server # Accepted connections s_udp_accepts = server_stats.get(u"udps_accepts", 0) - l7_data += f"server_udp_accepts={s_udp_accepts}, " + l7_data += f"server_udp_accepts={s_udp_accepts}; " # Closed connections s_udp_closed = server_stats.get(u"udps_closed", 0) - l7_data += f"server_udp_closed={s_udp_closed}, " + l7_data += f"server_udp_closed={s_udp_closed}; " # Sent bytes s_udp_sndbyte = server_stats.get(u"udps_sndbyte", 0) - l7_data += f"server_udp_tx_bytes={s_udp_sndbyte}, " + l7_data += f"server_udp_tx_bytes={s_udp_sndbyte}; " # Sent packets s_udp_sndpkt = server_stats.get(u"udps_sndpkt", 0) - l7_data += f"server_udp_tx_packets={s_udp_sndpkt}, " + l7_data += f"server_udp_tx_packets={s_udp_sndpkt}; " # Received bytes s_udp_rcvbyte = server_stats.get(u"udps_rcvbyte", 0) - l7_data += f"server_udp_rx_bytes={s_udp_rcvbyte}, " + l7_data += f"server_udp_rx_bytes={s_udp_rcvbyte}; " # Received packets s_udp_rcvpkt = server_stats.get(u"udps_rcvpkt", 0) - l7_data += f"server_udp_rx_packets={s_udp_rcvpkt}, " + l7_data += f"server_udp_rx_packets={s_udp_rcvpkt}; " elif u"tcp" in profile_file: # Client - # Initiated connections - c_tcp_connatt = client_stats.get(u"tcps_connattempt", 0) - l7_data += f"client_tcp_connect_inits={c_tcp_connatt}, " + # Connection attempts + c_tcp_connattempt = client_stats.get(u"tcps_connattempt", 0) + l7_data += f"client_tcp_connattempt={c_tcp_connattempt}; " # Established connections c_tcp_connects = client_stats.get(u"tcps_connects", 0) - l7_data += f"client_tcp_connects={c_tcp_connects}, " + l7_data += f"client_tcp_connects={c_tcp_connects}; " # Closed connections c_tcp_closed = client_stats.get(u"tcps_closed", 0) - l7_data += f"client_tcp_closed={c_tcp_closed}, " + l7_data += f"client_tcp_closed={c_tcp_closed}; " # Send bytes c_tcp_sndbyte = client_stats.get(u"tcps_sndbyte", 0) - l7_data += f"client_tcp_tx_bytes={c_tcp_sndbyte}, " + l7_data += f"client_tcp_tx_bytes={c_tcp_sndbyte}; " # Received bytes c_tcp_rcvbyte = client_stats.get(u"tcps_rcvbyte", 0) - l7_data += f"client_tcp_rx_bytes={c_tcp_rcvbyte}, " + l7_data += f"client_tcp_rx_bytes={c_tcp_rcvbyte}; " # Server # Accepted connections s_tcp_accepts = server_stats.get(u"tcps_accepts", 0) - l7_data += f"server_tcp_accepts={s_tcp_accepts}, " + l7_data += f"server_tcp_accepts={s_tcp_accepts}; " # Established connections s_tcp_connects = server_stats.get(u"tcps_connects", 0) - l7_data += f"server_tcp_connects={s_tcp_connects}, " + l7_data += f"server_tcp_connects={s_tcp_connects}; " # Closed connections s_tcp_closed = server_stats.get(u"tcps_closed", 0) - l7_data += f"server_tcp_closed={s_tcp_closed}, " + l7_data += f"server_tcp_closed={s_tcp_closed}; " # Sent bytes s_tcp_sndbyte = server_stats.get(u"tcps_sndbyte", 0) - l7_data += f"server_tcp_tx_bytes={s_tcp_sndbyte}, " + l7_data += f"server_tcp_tx_bytes={s_tcp_sndbyte}; " # Received bytes s_tcp_rcvbyte = server_stats.get(u"tcps_rcvbyte", 0) - l7_data += f"server_tcp_rx_bytes={s_tcp_rcvbyte}, " + l7_data += f"server_tcp_rx_bytes={s_tcp_rcvbyte}; " else: total_sent = stats[port_0][u"opackets"] - total_rcvd = stats[port_1][u"ipackets"] + total_received = stats[port_1][u"ipackets"] print(f"packets lost from {port_0} --> {port_1}: {lost_a} pkts") if traffic_directions > 1: @@ -383,14 +374,17 @@ def simple_burst( client.clear_profile() client.disconnect() print( - f"trex_start_time={trex_start_time}, " - f"cps={mult!r}, total_received={total_rcvd}, " - f"total_sent={total_sent}, frame_loss={lost_a + lost_b}, " - f"approximated_duration={approximated_duration}, " - f"latency_stream_0(usec)={lat_a}, " - f"latency_stream_1(usec)={lat_b}, " - f"latency_hist_stream_0={lat_a_hist}, " - f"latency_hist_stream_1={lat_b_hist}, " + f"multiplier={multiplier!r}; " + f"total_received={total_received}; " + f"total_sent={total_sent}; " + f"frame_loss={lost_a + lost_b}; " + f"approximated_duration={approximated_duration}; " + f"latency_stream_0(usec)={lat_a}; " + f"latency_stream_1(usec)={lat_b}; " + f"latency_hist_stream_0={lat_a_hist}; " + f"latency_hist_stream_1={lat_b_hist}; " + f"client_sent={client_sent}; " + f"client_received={client_received}; " f"{l7_data}" ) @@ -408,21 +402,17 @@ def main(): ) parser.add_argument( u"-d", u"--duration", required=True, type=float, - help=u"Duration of traffic run." + help=u"Duration of the whole traffic run, including overheads." ) parser.add_argument( u"-s", u"--frame_size", required=True, help=u"Size of a Frame without padding and IPG." ) parser.add_argument( - u"-m", u"--mult", required=True, type=int, + u"-m", u"--multiplier", required=True, type=float, help=u"Multiplier of profile CPS." ) parser.add_argument( - u"-w", u"--warmup_time", type=float, default=5.0, - help=u"Traffic warm-up time in seconds, 0 = disable." - ) - parser.add_argument( u"--port_0", required=True, type=int, help=u"Port 0 on the traffic generator." ) @@ -451,10 +441,15 @@ def main(): framesize = args.frame_size simple_burst( - profile_file=args.profile, duration=args.duration, framesize=framesize, - mult=args.mult, warmup_time=args.warmup_time, port_0=args.port_0, - port_1=args.port_1, latency=args.latency, async_start=args.async_start, - traffic_directions=args.traffic_directions + profile_file=args.profile, + duration=args.duration, + framesize=framesize, + multiplier=args.multiplier, + port_0=args.port_0, + port_1=args.port_1, + latency=args.latency, + async_start=args.async_start, + traffic_directions=args.traffic_directions, ) diff --git a/GPL/tools/trex/trex_astf_stop.py b/GPL/tools/trex/trex_astf_stop.py index 655bdf1a97..d9784e661a 100644 --- a/GPL/tools/trex/trex_astf_stop.py +++ b/GPL/tools/trex/trex_astf_stop.py @@ -92,12 +92,15 @@ def main(): total_rcvd, total_sent = rx_0 + rx_1, tx_0 + tx_1 total_lost = total_sent - total_rcvd - # TODO: Add latency. print( - f"cps='unknown', total_received={total_rcvd}, total_sent={total_sent}, " - f"frame_loss={total_lost}, " - f"latency_stream_0(usec)=-1/-1/-1, latency_stream_1(usec)=-1/-1/-1, " - u"latency_hist_stream_0={}, latency_hist_stream_1={}, " + f"cps='unknown'; " + f"total_received={total_rcvd}; " + f"total_sent={total_sent}; " + f"frame_loss={total_lost}; " + f"latency_stream_0(usec)=-1/-1/-1; " + f"latency_stream_1(usec)=-1/-1/-1; " + f"latency_hist_stream_0={}; " + f"latency_hist_stream_1={}; " ) diff --git a/GPL/tools/trex/trex_stl_profile.py b/GPL/tools/trex/trex_stl_profile.py index ac09b8dda1..ea001b58b6 100644 --- a/GPL/tools/trex/trex_stl_profile.py +++ b/GPL/tools/trex/trex_stl_profile.py @@ -60,8 +60,17 @@ def fmt_latency(lat_min, lat_avg, lat_max, hdrh): def simple_burst( - profile_file, duration, framesize, rate, warmup_time, port_0, port_1, - latency, async_start=False, traffic_directions=2, force=False): + profile_file, + duration, + framesize, + rate, + port_0, + port_1, + latency, + async_start=False, + traffic_directions=2, + force=False, + ): """Send traffic and measure packet loss and latency. Procedure: @@ -83,7 +92,6 @@ def simple_burst( :param framesize: Frame size. :param duration: Duration of traffic run in seconds (-1=infinite). :param rate: Traffic rate [percentage, pps, bps]. - :param warmup_time: Traffic warm-up time in seconds, 0 = disable. :param port_0: Port 0 on the traffic generator. :param port_1: Port 1 on the traffic generator. :param latency: With latency stats. @@ -94,7 +102,6 @@ def simple_burst( :type framesize: int or str :type duration: float :type rate: str - :type warmup_time: float :type port_0: int :type port_1: int :type latency: bool @@ -105,8 +112,7 @@ def simple_burst( client = None total_rcvd = 0 total_sent = 0 - approximated_duration = 0 - approximated_rate = 0 + approximated_duration = 0.0 lost_a = 0 lost_b = 0 lat_a = u"-1/-1/-1/" @@ -162,40 +168,6 @@ def simple_burst( ports = [port_0] if traffic_directions > 1: ports.append(port_1) - # Warm-up phase: - if warmup_time > 0: - # Clear the stats before injecting: - client.clear_stats() - - # Choose rate and start traffic: - client.start( - ports=ports, mult=rate, duration=warmup_time, force=force, - core_mask=STLClient.CORE_MASK_PIN - ) - - # Block until done: - time_start = time.monotonic() - client.wait_on_traffic(ports=ports, timeout=warmup_time+30) - time_stop = time.monotonic() - approximated_duration = time_stop - time_start - - if client.get_warnings(): - for warning in client.get_warnings(): - print(warning) - - # Read the stats after the test: - stats = client.get_stats() - - print(u"##### Warmup statistics #####") - print(json.dumps(stats, indent=4, separators=(u",", u": "))) - - lost_a = stats[port_0][u"opackets"] - stats[port_1][u"ipackets"] - if traffic_directions > 1: - lost_b = stats[port_1][u"opackets"] - stats[port_0][u"ipackets"] - - print(f"\npackets lost from {port_0} --> {port_1}: {lost_a} pkts") - if traffic_directions > 1: - print(f"packets lost from {port_1} --> {port_0}: {lost_b} pkts") # Clear the stats before injecting: client.clear_stats() @@ -204,8 +176,11 @@ def simple_burst( # Choose rate and start traffic: client.start( - ports=ports, mult=rate, duration=duration, force=force, - core_mask=STLClient.CORE_MASK_PIN + ports=ports, + mult=rate, + duration=duration, + force=force, + core_mask=STLClient.CORE_MASK_PIN, ) if async_start: @@ -254,10 +229,6 @@ def simple_burst( else: total_sent = stats[port_0][u"opackets"] total_rcvd = stats[port_1][u"ipackets"] - try: - approximated_rate = total_sent / approximated_duration - except ZeroDivisionError: - pass print(f"\npackets lost from {port_0} --> {port_1}: {lost_a} pkts") if traffic_directions > 1: @@ -275,13 +246,14 @@ def simple_burst( if client: client.disconnect() print( - f"rate={rate!r}, total_received={total_rcvd}, " - f"total_sent={total_sent}, frame_loss={lost_a + lost_b}, " - f"target_duration={duration!r}, " - f"approximated_duration={approximated_duration!r}, " - f"approximated_rate={approximated_rate}, " - f"latency_stream_0(usec)={lat_a}, " - f"latency_stream_1(usec)={lat_b}, " + f"rate={rate!r}; " + f"total_received={total_rcvd}; " + f"total_sent={total_sent}; " + f"frame_loss={lost_a + lost_b}; " + f"target_duration={duration!r}; " + f"approximated_duration={approximated_duration!r}; " + f"latency_stream_0(usec)={lat_a}; " + f"latency_stream_1(usec)={lat_b}; " ) @@ -309,10 +281,6 @@ def main(): help=u"Traffic rate with included units (pps)." ) parser.add_argument( - u"-w", u"--warmup_time", type=float, default=5.0, - help=u"Traffic warm-up time in seconds, 0 = disable." - ) - parser.add_argument( u"--port_0", required=True, type=int, help=u"Port 0 on the traffic generator." ) @@ -345,10 +313,16 @@ def main(): framesize = args.frame_size simple_burst( - profile_file=args.profile, duration=args.duration, framesize=framesize, - rate=args.rate, warmup_time=args.warmup_time, port_0=args.port_0, - port_1=args.port_1, latency=args.latency, async_start=args.async_start, - traffic_directions=args.traffic_directions, force=args.force + profile_file=args.profile, + duration=args.duration, + framesize=framesize, + rate=args.rate, + port_0=args.port_0, + port_1=args.port_1, + latency=args.latency, + async_start=args.async_start, + traffic_directions=args.traffic_directions, + force=args.force, ) diff --git a/GPL/tools/trex/trex_stl_stop.py b/GPL/tools/trex/trex_stl_stop.py index dcdae7c10a..f07479da8a 100644 --- a/GPL/tools/trex/trex_stl_stop.py +++ b/GPL/tools/trex/trex_stl_stop.py @@ -91,13 +91,16 @@ def main(): total_rcvd, total_sent = rx_0 + rx_1, tx_0 + tx_1 total_lost = total_sent - total_rcvd - # TODO: Add latency. print( - f"rate='unknown', total_received={total_rcvd}, " - f"total_sent={total_sent}, frame_loss={total_lost}, " - f"target_duration='manual', approximated_duration='manual', " - f"approximated_rate='unknown', " - f"latency_stream_0(usec)=-1/-1/-1, latency_stream_1(usec)=-1/-1/-1" + f"rate='unknown'; " + f"total_received={total_rcvd}; " + f"total_sent={total_sent}; " + f"frame_loss={total_lost}; " + f"target_duration='manual'; " + f"approximated_duration='manual'; " + f"approximated_rate='unknown'; " + f"latency_stream_0(usec)=-1/-1/-1; " + f"latency_stream_1(usec)=-1/-1/-1; " ) diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h-pps.py new file mode 100644 index 0000000000..0c22573a09 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h-pps.py @@ -0,0 +1,117 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. + +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / TCP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.3.255 + - Destination IP address range: 20.0.0.0 - 20.0.3.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.3.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.3.255" + + # Headers length; not used in this profile, just for the record of + # header length for TCP packet with 0B payload + self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options + self.data_size = 11111 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates, None + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + # client commands + prog_c = ASTFProgram() + prog_c.connect() + prog_c.send(u"1" * self.data_size) + prog_c.recv(self.data_size) + + # server commands + prog_s = ASTFProgram() + prog_s.accept() + prog_c.recv(self.data_size) + prog_c.send(u"1" * self.data_size) + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=64512, # TODO: set via input parameter + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h.py index 809a954a30..a86355b365 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h.py @@ -25,6 +25,9 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. """ from trex.astf.api import * @@ -49,9 +52,6 @@ class TrafficProfile(TrafficProfileBaseClass): # header length for TCP packet with 0B payload self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options - # Delay for keeping tcp sessions active - self.delay = 2000000 # delay 2s (2,000,000 usec) - def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -68,8 +68,6 @@ class TrafficProfile(TrafficProfileBaseClass): prog_c.connect() # receive syn-ack (0B sent in tcp syn-ack packet) and send ack prog_c.recv(0) - # wait defined time, then send fin-ack - prog_c.delay(self.delay) # server commands prog_s = ASTFProgram() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h-pps.py new file mode 100644 index 0000000000..c73de7b9c7 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h-pps.py @@ -0,0 +1,117 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. + +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / TCP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.63.255 + - Destination IP address range: 20.0.0.0 - 20.0.63.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.63.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.63.255" + + # Headers length; not used in this profile, just for the record of + # header length for TCP packet with 0B payload + self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options + self.data_size = 11111 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates, None + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + # client commands + prog_c = ASTFProgram() + prog_c.connect() + prog_c.send(u"1" * self.data_size) + prog_c.recv(self.data_size) + + # server commands + prog_s = ASTFProgram() + prog_s.accept() + prog_c.recv(self.data_size) + prog_c.send(u"1" * self.data_size) + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=1032192, # TODO: set via input parameter + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h.py index 0d7f9a5974..4899726fc2 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h.py @@ -25,6 +25,9 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. """ from trex.astf.api import * @@ -49,9 +52,6 @@ class TrafficProfile(TrafficProfileBaseClass): # header length for TCP packet with 0B payload self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options - # Delay for keeping tcp sessions active - self.delay = 2000000 # delay 2s (2,000,000 usec) - def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -68,8 +68,6 @@ class TrafficProfile(TrafficProfileBaseClass): prog_c.connect() # receive syn-ack (0B sent in tcp syn-ack packet) and send ack prog_c.recv(0) - # wait defined time, then send fin-ack - prog_c.delay(self.delay) # server commands prog_s = ASTFProgram() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h-pps.py new file mode 100644 index 0000000000..007b3668ac --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h-pps.py @@ -0,0 +1,117 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. + +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / TCP + - Direction 0 --> 1: + - Source IP address range: 172.16.0.0 - 172.19.255.255 + - Destination IP address range: 20.16.0.0 - 20.19.255.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"172.16.0.0" + self.p1_src_end_ip = u"172.19.255.255" + self.p1_dst_start_ip = u"20.16.0.0" + self.p1_dst_end_ip = u"20.19.255.255" + + # Headers length; not used in this profile, just for the record of + # header length for TCP packet with 0B payload + self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options + self.data_size = 11111 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates, None + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + # client commands + prog_c = ASTFProgram() + prog_c.connect() + prog_c.send(u"1" * self.data_size) + prog_c.recv(self.data_size) + + # server commands + prog_s = ASTFProgram() + prog_s.accept() + prog_c.recv(self.data_size) + prog_c.send(u"1" * self.data_size) + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=16515072, # TODO: set via input parameter + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h.py index 6f533844e0..d52d293c92 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h.py @@ -25,6 +25,9 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. """ from trex.astf.api import * @@ -49,9 +52,6 @@ class TrafficProfile(TrafficProfileBaseClass): # header length for TCP packet with 0B payload self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options - # Delay for keeping tcp sessions active - self.delay = 2000000 # delay 2s (2,000,000 usec) - def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -68,8 +68,6 @@ class TrafficProfile(TrafficProfileBaseClass): prog_c.connect() # receive syn-ack (0B sent in tcp syn-ack packet) and send ack prog_c.recv(0) - # wait defined time, then send fin-ack - prog_c.delay(self.delay) # server commands prog_s = ASTFProgram() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h-pps.py new file mode 100644 index 0000000000..dc2b612057 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h-pps.py @@ -0,0 +1,117 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. + +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / TCP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.15.255 + - Destination IP address range: 20.0.0.0 - 20.0.15.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.15.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.15.255" + + # Headers length; not used in this profile, just for the record of + # header length for TCP packet with 0B payload + self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options + self.data_size = 11111 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates, None + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + # client commands + prog_c = ASTFProgram() + prog_c.connect() + prog_c.send(u"1" * self.data_size) + prog_c.recv(self.data_size) + + # server commands + prog_s = ASTFProgram() + prog_s.accept() + prog_c.recv(self.data_size) + prog_c.send(u"1" * self.data_size) + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=258048, # TODO: set via input parameter + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h.py index acfc5e109a..4ff89a8acb 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h.py @@ -25,6 +25,9 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. """ from trex.astf.api import * @@ -49,9 +52,6 @@ class TrafficProfile(TrafficProfileBaseClass): # header length for TCP packet with 0B payload self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options - # Delay for keeping tcp sessions active - self.delay = 2000000 # delay 2s (2,000,000 usec) - def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -68,8 +68,6 @@ class TrafficProfile(TrafficProfileBaseClass): prog_c.connect() # receive syn-ack (0B sent in tcp syn-ack packet) and send ack prog_c.recv(0) - # wait defined time, then send fin-ack - prog_c.delay(self.delay) # server commands prog_s = ASTFProgram() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h-pps.py new file mode 100644 index 0000000000..8ba3be5b69 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h-pps.py @@ -0,0 +1,117 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. + +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / TCP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.255.255 + - Destination IP address range: 20.0.0.0 - 20.0.255.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.255.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.255.255" + + # Headers length; not used in this profile, just for the record of + # header length for TCP packet with 0B payload + self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options + self.data_size = 11111 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates, None + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + # client commands + prog_c = ASTFProgram() + prog_c.connect() + prog_c.send(u"1" * self.data_size) + prog_c.recv(self.data_size) + + # server commands + prog_s = ASTFProgram() + prog_s.accept() + prog_c.recv(self.data_size) + prog_c.send(u"1" * self.data_size) + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=4128768, # TODO: set via input parameter + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h.py index 7d2f5b6265..e5786f4f05 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h.py @@ -25,6 +25,9 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up and tears down TCP session. +No delays, no data transfer. """ from trex.astf.api import * @@ -49,9 +52,6 @@ class TrafficProfile(TrafficProfileBaseClass): # header length for TCP packet with 0B payload self.headers_size = 58 # 14B l2 + 20B ipv4 + 24B tcp incl. 4B options - # Delay for keeping tcp sessions active - self.delay = 2000000 # delay 2s (2,000,000 usec) - def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -68,8 +68,6 @@ class TrafficProfile(TrafficProfileBaseClass): prog_c.connect() # receive syn-ack (0B sent in tcp syn-ack packet) and send ack prog_c.recv(0) - # wait defined time, then send fin-ack - prog_c.delay(self.delay) # server commands prog_s = ASTFProgram() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h-pps.py new file mode 100644 index 0000000000..3de855442e --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h-pps.py @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / UDP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.3.255 + - Destination IP address range: 20.0.0.0 - 20.0.3.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self, **kwargs): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.3.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.3.255" + + self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B UDP + + self.udp_data = u"" + + self.n_data = 32 # TODO: set via input parameter + self.m_delay = 1200000 # delay 1200s (1,200,000 ms) + self.u_delay = 1000 * self.m_delay # delay 1200s (1,200,000,000 us) + self.limit = 64512 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + if self.framesize == 64: + self.udp_data += self._gen_padding(self.headers_size, 72) + if self.framesize == 1518: + self.udp_data += self._gen_padding(self.headers_size, 1514) + + # Client program. + prog_c = ASTFProgram(stream=False) + prog_c.set_keepalive_msg(self.m_delay) + prog_c.send_msg(self.udp_data) + # No delay, PPS tests combine connect and data send (no data receive). + prog_c.set_var(u"var1", self.n_data) + prog_c.set_label(u"a:") + prog_c.send_msg(self.udp_data) + prog_c.jmp_nz(u"var1", u"a:") + # We should read the server response, + # but no reason to overload client workers even more. + + # Server program. + prog_s = ASTFProgram(stream=False) + prog_s.set_keepalive_msg(self.m_delay) + # If server closes too soon, new instances are started + # leading in too much replies. To prevent that, we need to recv all. + prog_s.recv_msg(1 + self.n_data) + # In packet loss scenarios, some instances never get here. + # This maybe increases server traffic duration, + # but no other way if we want to avoid + # TRex creating a second instance of the same server. + prog_s.send_msg(self.udp_data) + prog_s.set_var(u"var2", self.n_data) + prog_s.set_label(u"b:") + prog_s.send_msg(self.udp_data) + prog_s.jmp_nz(u"var2", u"b:") + # VPP never duplicates packets, + # so it is safe to close the server instance now. + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=self.limit, + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py index 6bf0d53d1f..dbe97cc440 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py @@ -25,6 +25,10 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up UDP session. +No delays, no data transfer. +Keepalive mechanism cannot be disabled, so it is at least set to long waits. """ from trex.astf.api import * @@ -54,7 +58,7 @@ class TrafficProfile(TrafficProfileBaseClass): self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -70,28 +74,20 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) # receive RES message prog_c.recv_msg(1) - prog_c.delay(self.udp_keepalive * 1000) # delay is defined in usec - # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # receive REQ message prog_s.recv_msg(1) # send RES message prog_s.send_msg(self.udp_res) - prog_s.delay(self.udp_keepalive * 1000) # delay is defined in usec - # ip generators ip_gen_c = ASTFIPGenDist( ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h-pps.py new file mode 100644 index 0000000000..856f5b28a3 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h-pps.py @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / UDP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.63.255 + - Destination IP address range: 20.0.0.0 - 20.0.63.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self, **kwargs): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.63.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.63.255" + + self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B UDP + + self.udp_data = u"" + + self.n_data = 32 # TODO: set via input parameter + self.m_delay = 1200000 # delay 1200s (1,200,000 ms) + self.u_delay = 1000 * self.m_delay # delay 1200s (1,200,000,000 us) + self.limit = 1032192 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + if self.framesize == 64: + self.udp_data += self._gen_padding(self.headers_size, 72) + if self.framesize == 1518: + self.udp_data += self._gen_padding(self.headers_size, 1514) + + # Client program. + prog_c = ASTFProgram(stream=False) + prog_c.set_keepalive_msg(self.m_delay) + prog_c.send_msg(self.udp_data) + # No delay, PPS tests combine connect and data send (no data receive). + prog_c.set_var(u"var1", self.n_data) + prog_c.set_label(u"a:") + prog_c.send_msg(self.udp_data) + prog_c.jmp_nz(u"var1", u"a:") + # We should read the server response, + # but no reason to overload client workers even more. + + # Server program. + prog_s = ASTFProgram(stream=False) + prog_s.set_keepalive_msg(self.m_delay) + # If server closes too soon, new instances are started + # leading in too much replies. To prevent that, we need to recv all. + prog_s.recv_msg(1 + self.n_data) + # In packet loss scenarios, some instances never get here. + # This maybe increases server traffic duration, + # but no other way if we want to avoid + # TRex creating a second instance of the same server. + prog_s.send_msg(self.udp_data) + prog_s.set_var(u"var2", self.n_data) + prog_s.set_label(u"b:") + prog_s.send_msg(self.udp_data) + prog_s.jmp_nz(u"var2", u"b:") + # VPP never duplicates packets, + # so it is safe to close the server instance now. + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=self.limit, + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py index 9237831aa5..7acebaaeaf 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py @@ -25,6 +25,10 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up UDP session. +No delays, no data transfer. +Keepalive mechanism cannot be disabled, so it is at least set to long waits. """ from trex.astf.api import * @@ -54,7 +58,7 @@ class TrafficProfile(TrafficProfileBaseClass): self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -70,28 +74,20 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) # receive RES message prog_c.recv_msg(1) - prog_c.delay(self.udp_keepalive * 1000) # delay is defined in usec - # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # receive REQ message prog_s.recv_msg(1) # send RES message prog_s.send_msg(self.udp_res) - prog_s.delay(self.udp_keepalive * 1000) # delay is defined in usec - # ip generators ip_gen_c = ASTFIPGenDist( ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h-pps.py new file mode 100644 index 0000000000..f6f7fcfe3d --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h-pps.py @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / UDP + - Direction 0 --> 1: + - Source IP address range: 172.16.0.0 - 172.19.255.255 + - Destination IP address range: 20.16.0.0 - 20.19.255.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self, **kwargs): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"172.16.0.0" + self.p1_src_end_ip = u"172.19.255.255" + self.p1_dst_start_ip = u"20.16.0.0" + self.p1_dst_end_ip = u"20.19.255.255" + + self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B UDP + + self.udp_data = u"" + + self.n_data = 32 # TODO: set via input parameter + self.m_delay = 1200000 # delay 1200s (1,200,000 ms) + self.u_delay = 1000 * self.m_delay # delay 1200s (1,200,000,000 us) + self.limit = 16515072 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + if self.framesize == 64: + self.udp_data += self._gen_padding(self.headers_size, 72) + if self.framesize == 1518: + self.udp_data += self._gen_padding(self.headers_size, 1514) + + # Client program. + prog_c = ASTFProgram(stream=False) + prog_c.set_keepalive_msg(self.m_delay) + prog_c.send_msg(self.udp_data) + # No delay, PPS tests combine connect and data send (no data receive). + prog_c.set_var(u"var1", self.n_data) + prog_c.set_label(u"a:") + prog_c.send_msg(self.udp_data) + prog_c.jmp_nz(u"var1", u"a:") + # We should read the server response, + # but no reason to overload client workers even more. + + # Server program. + prog_s = ASTFProgram(stream=False) + prog_s.set_keepalive_msg(self.m_delay) + # If server closes too soon, new instances are started + # leading in too much replies. To prevent that, we need to recv all. + prog_s.recv_msg(1 + self.n_data) + # In packet loss scenarios, some instances never get here. + # This maybe increases server traffic duration, + # but no other way if we want to avoid + # TRex creating a second instance of the same server. + prog_s.send_msg(self.udp_data) + prog_s.set_var(u"var2", self.n_data) + prog_s.set_label(u"b:") + prog_s.send_msg(self.udp_data) + prog_s.jmp_nz(u"var2", u"b:") + # VPP never duplicates packets, + # so it is safe to close the server instance now. + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=self.limit, + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py index 728eba8a04..e8796ec166 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py @@ -25,6 +25,10 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up UDP session. +No delays, no data transfer. +Keepalive mechanism cannot be disabled, so it is at least set to long waits. """ from trex.astf.api import * @@ -54,7 +58,7 @@ class TrafficProfile(TrafficProfileBaseClass): self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -70,28 +74,20 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) # receive RES message prog_c.recv_msg(1) - prog_c.delay(self.udp_keepalive * 1000) # delay is defined in usec - # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # receive REQ message prog_s.recv_msg(1) # send RES message prog_s.send_msg(self.udp_res) - prog_s.delay(self.udp_keepalive * 1000) # delay is defined in usec - # ip generators ip_gen_c = ASTFIPGenDist( ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h-pps.py new file mode 100644 index 0000000000..cd295b1164 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h-pps.py @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / UDP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.15.255 + - Destination IP address range: 20.0.0.0 - 20.0.15.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self, **kwargs): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.15.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.15.255" + + self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B UDP + + self.udp_data = u"" + + self.n_data = 32 # TODO: set via input parameter + self.m_delay = 1200000 # delay 1200s (1,200,000 ms) + self.u_delay = 1000 * self.m_delay # delay 1200s (1,200,000,000 us) + self.limit = 258048 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + if self.framesize == 64: + self.udp_data += self._gen_padding(self.headers_size, 72) + if self.framesize == 1518: + self.udp_data += self._gen_padding(self.headers_size, 1514) + + # Client program. + prog_c = ASTFProgram(stream=False) + prog_c.set_keepalive_msg(self.m_delay) + prog_c.send_msg(self.udp_data) + # No delay, PPS tests combine connect and data send (no data receive). + prog_c.set_var(u"var1", self.n_data) + prog_c.set_label(u"a:") + prog_c.send_msg(self.udp_data) + prog_c.jmp_nz(u"var1", u"a:") + # We should read the server response, + # but no reason to overload client workers even more. + + # Server program. + prog_s = ASTFProgram(stream=False) + prog_s.set_keepalive_msg(self.m_delay) + # If server closes too soon, new instances are started + # leading in too much replies. To prevent that, we need to recv all. + prog_s.recv_msg(1 + self.n_data) + # In packet loss scenarios, some instances never get here. + # This maybe increases server traffic duration, + # but no other way if we want to avoid + # TRex creating a second instance of the same server. + prog_s.send_msg(self.udp_data) + prog_s.set_var(u"var2", self.n_data) + prog_s.set_label(u"b:") + prog_s.send_msg(self.udp_data) + prog_s.jmp_nz(u"var2", u"b:") + # VPP never duplicates packets, + # so it is safe to close the server instance now. + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=self.limit, + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py index 0807175d36..da367b4ca4 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py @@ -25,6 +25,10 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up UDP session. +No delays, no data transfer. +Keepalive mechanism cannot be disabled, so it is at least set to long waits. """ from trex.astf.api import * @@ -54,7 +58,7 @@ class TrafficProfile(TrafficProfileBaseClass): self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -70,28 +74,20 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) # receive RES message prog_c.recv_msg(1) - prog_c.delay(self.udp_keepalive * 1000) # delay is defined in usec - # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # receive REQ message prog_s.recv_msg(1) # send RES message prog_s.send_msg(self.udp_res) - prog_s.delay(self.udp_keepalive * 1000) # delay is defined in usec - # ip generators ip_gen_c = ASTFIPGenDist( ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h-pps.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h-pps.py new file mode 100644 index 0000000000..f6aaebcf30 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h-pps.py @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Traffic profile for T-rex advanced stateful (astf) traffic generator. +Traffic profile: + - Two streams sent in directions 0 --> 1 (client -> server, requests) and + 1 --> 0 (server -> client, responses) at the same time. + - Packet: ETH / IP / UDP + - Direction 0 --> 1: + - Source IP address range: 192.168.0.0 - 192.168.255.255 + - Destination IP address range: 20.0.0.0 - 20.0.255.255 + - Direction 1 --> 0: + - Source IP address range: destination IP address from packet received + on port 1 + - Destination IP address range: source IP address from packet received + on port 1 +""" + +from trex.astf.api import * +from profile_trex_astf_base_class import TrafficProfileBaseClass + + +class TrafficProfile(TrafficProfileBaseClass): + """Traffic profile.""" + + def __init__(self, **kwargs): + """Initialization and setting of profile parameters.""" + + super(TrafficProfileBaseClass, self).__init__() + + # IPs used in packet headers. + self.p1_src_start_ip = u"192.168.0.0" + self.p1_src_end_ip = u"192.168.255.255" + self.p1_dst_start_ip = u"20.0.0.0" + self.p1_dst_end_ip = u"20.0.255.255" + + self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B UDP + + self.udp_data = u"" + + self.n_data = 32 # TODO: set via input parameter + self.m_delay = 1200000 # delay 1200s (1,200,000 ms) + self.u_delay = 1000 * self.m_delay # delay 1200s (1,200,000,000 us) + self.limit = 4128768 + + def define_profile(self): + """Define profile to be used by advanced stateful traffic generator. + + This method MUST return: + + return ip_gen, templates + + :returns: IP generator and profile templates for ASTFProfile(). + :rtype: tuple + """ + if self.framesize == 64: + self.udp_data += self._gen_padding(self.headers_size, 72) + if self.framesize == 1518: + self.udp_data += self._gen_padding(self.headers_size, 1514) + + # Client program. + prog_c = ASTFProgram(stream=False) + prog_c.set_keepalive_msg(self.m_delay) + prog_c.send_msg(self.udp_data) + # No delay, PPS tests combine connect and data send (no data receive). + prog_c.set_var(u"var1", self.n_data) + prog_c.set_label(u"a:") + prog_c.send_msg(self.udp_data) + prog_c.jmp_nz(u"var1", u"a:") + # We should read the server response, + # but no reason to overload client workers even more. + + # Server program. + prog_s = ASTFProgram(stream=False) + prog_s.set_keepalive_msg(self.m_delay) + # If server closes too soon, new instances are started + # leading in too much replies. To prevent that, we need to recv all. + prog_s.recv_msg(1 + self.n_data) + # In packet loss scenarios, some instances never get here. + # This maybe increases server traffic duration, + # but no other way if we want to avoid + # TRex creating a second instance of the same server. + prog_s.send_msg(self.udp_data) + prog_s.set_var(u"var2", self.n_data) + prog_s.set_label(u"b:") + prog_s.send_msg(self.udp_data) + prog_s.jmp_nz(u"var2", u"b:") + # VPP never duplicates packets, + # so it is safe to close the server instance now. + + # ip generators + ip_gen_c = ASTFIPGenDist( + ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], + distribution=u"seq" + ) + ip_gen_s = ASTFIPGenDist( + ip_range=[self.p1_dst_start_ip, self.p1_dst_end_ip], + distribution=u"seq" + ) + ip_gen = ASTFIPGen( + glob=ASTFIPGenGlobal(ip_offset=u"0.0.0.1"), + dist_client=ip_gen_c, + dist_server=ip_gen_s + ) + + # server association + s_assoc = ASTFAssociation(rules=ASTFAssociationRule(port=8080)) + + # template + temp_c = ASTFTCPClientTemplate( + program=prog_c, + ip_gen=ip_gen, + limit=self.limit, + port=8080 + ) + temp_s = ASTFTCPServerTemplate(program=prog_s, assoc=s_assoc) + template = ASTFTemplate(client_template=temp_c, server_template=temp_s) + + return ip_gen, template, None + + +def register(): + """Register this traffic profile to T-Rex. + + Do not change this function. + + :return: Traffic Profiles. + :rtype: Object + """ + return TrafficProfile() diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py index 85eaff005c..9aba56a3e4 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py @@ -25,6 +25,10 @@ Traffic profile: on port 1 - Destination IP address range: source IP address from packet received on port 1 + +This is a profile for CPS tests, it only sets up UDP session. +No delays, no data transfer. +Keepalive mechanism cannot be disabled, so it is at least set to long waits. """ from trex.astf.api import * @@ -54,7 +58,7 @@ class TrafficProfile(TrafficProfileBaseClass): self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + self.udp_keepalive = 2000*1000*100 # 200000s (200,000,000 msec) def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -70,28 +74,20 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) # receive RES message prog_c.recv_msg(1) - prog_c.delay(self.udp_keepalive * 1000) # delay is defined in usec - # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange prog_c.set_keepalive_msg(self.udp_keepalive) # receive REQ message prog_s.recv_msg(1) # send RES message prog_s.send_msg(self.udp_res) - prog_s.delay(self.udp_keepalive * 1000) # delay is defined in usec - # ip generators ip_gen_c = ASTFIPGenDist( ip_range=[self.p1_src_start_ip, self.p1_src_end_ip], diff --git a/docs/tag_documentation.rst b/docs/tag_documentation.rst index 36550d4f5c..ee709d0f44 100644 --- a/docs/tag_documentation.rst +++ b/docs/tag_documentation.rst @@ -189,6 +189,36 @@ Scaling Tags Traffic stream with 100 000 unique flows (100 IPs/users x 1000 UDP ports) in one direction. +.. topic:: HOSTS_1024 + + Stateless or stateful traffic stream with 1024 client source IP4 addresses, + usually with 63 flow differing in source port number. Could be UDP or TCP. + If NAT is used, the clients are inside. Outside IP range can differ. + +.. topic:: HOSTS_4096 + + Stateless or stateful traffic stream with 4096 client source IP4 addresses, + usually with 63 flow differing in source port number. Could be UDP or TCP. + If NAT is used, the clients are inside. Outside IP range can differ. + +.. topic:: HOSTS_16384 + + Stateless or stateful traffic stream with 16384 client source IP4 addresses, + usually with 63 flow differing in source port number. Could be UDP or TCP. + If NAT is used, the clients are inside. Outside IP range can differ. + +.. topic:: HOSTS_65536 + + Stateless or stateful traffic stream with 65536 client source IP4 addresses, + usually with 63 flow differing in source port number. Could be UDP or TCP. + If NAT is used, the clients are inside. Outside IP range can differ. + +.. topic:: HOSTS_262144 + + Stateless or stateful traffic stream with 262144 client source IP4 addresses + usually with 63 flow differing in source port number. Could be UDP or TCP. + If NAT is used, the clients are inside. Outside IP range can differ. + Test Category Tags ------------------ @@ -278,11 +308,12 @@ Test Type Tags .. topic:: BASE Baseline test cases, no encapsulation, no feature(s) configured in tests. + No scaling whatsoever, beyond minimum needed for RSS. .. topic:: IP4BASE IPv4 baseline test cases, no encapsulation, no feature(s) configured in - tests. + tests. Minimal number of routes. Other quantities may be scaled. .. topic:: IP6BASE @@ -306,7 +337,8 @@ Test Type Tags .. topic:: SCALE - Scale test cases. + Scale test cases. Other tags specify which quantities are scaled. + Also applies if scaling is set on TG only (e.g. DUT works as IP4BASE). .. topic:: ENCAP @@ -316,21 +348,56 @@ Test Type Tags At least one feature is configured in test cases. Use also feature tag(s). +.. topic:: UDP + + Tests which use any kind of UDP traffic (STL or ASTF profile). + .. topic:: TCP - Tests which use TCP. + Tests which use any kind of TCP traffic (STL or ASTF profile). + +.. + TODO: Should we define tags STL and ASTF? + +.. topic:: UDP_UDIR + + Tests which use unidirectional UDP traffic (STL profile only). + +.. topic:: UDP_BIDIR + + Tests which use bidirectional UDP traffic (STL profile only). + +.. topic:: UDP_CPS + + Tests which measure connections per second on minimal UDP pseudoconnections. + This implies ASTF traffic profile is used. + This tag selects specific output processing in PAL. .. topic:: TCP_CPS - Performance tests which measure connections per second using http requests. + Tests which measure connections per second on empty TCP connections. + This implies ASTF traffic profile is used. + This tag selects specific output processing in PAL. + +.. topic:: UDP_PPS -.. topic:: TCP_RPS + Tests which measure packets per second on lightweight UDP transactions. + This implies ASTF traffic profile is used. + This tag selects specific output processing in PAL. - Performance tests which measure requests per second using http requests. +.. topic:: TCP_PPS + + Tests which measure packets per second on lightweight TCP transactions. + This implies ASTF traffic profile is used. + This tag selects specific output processing in PAL. .. topic:: HTTP - Tests which use HTTP. + Tests which use traffic formed of valid HTTP requests (and responses). + +.. + TODO: Add HTTP tag to the current hoststack tests. + TODO: Document other tags already used by hoststack tests. .. topic:: NF_DENSITY @@ -867,23 +934,3 @@ Multi-Threading Tags 8 worker threads each pinned to a separate logical core within 4 dedicated physical cores. 4 receive queues per interface. Main thread pinned to core 1. - -Honeycomb Tags --------------- - -.. topic:: HC_FUNC - - Honeycomb functional test cases. - -.. topic:: HC_NSH - - Honeycomb NSH test cases. - -.. topic:: HC_PERSIST - - Honeycomb persistence test cases. - -.. topic:: HC_REST_ONLY - - (Exclusion tag) Honeycomb test cases that cannot be run in Netconf mode - using ODL client for Restfconf -> Netconf translation. diff --git a/resources/api/vpp/supported_crcs.yaml b/resources/api/vpp/supported_crcs.yaml index c3eb03226b..7e73a1fcca 100644 --- a/resources/api/vpp/supported_crcs.yaml +++ b/resources/api/vpp/supported_crcs.yaml @@ -88,6 +88,7 @@ det44_plugin_enable_disable: '0xfc4b5d73' # perf det44_plugin_enable_disable_reply: '0xe8d4e804' # perf det44_session_dump: '0xe45a3af7' # perf teardown + # TODO: Which test to run to verify det44_* messages? # dhcp_proxy_dump / details # honeycomb gbp_bridge_domain_add: '0x8454bfdf' # dev gbp_bridge_domain_add_reply: '0xe8d4e804' # dev @@ -208,8 +209,7 @@ nat_show_config_reply: '0x7903ef06' # dev teardown nat_worker_details: '0x84bf06fc' # dev teardown nat_worker_dump: '0x51077d14' # dev teardown - # 6x^ tc01-64B-1c-ethip4udp-snat44det-h1-p1-s1-mrr - # ^ nat44NOTscaleNOTsrc_user_1 + # TODO: Which test to run to verify nat* messages? nsim_configure: '0x16ed400f' # perf nsim_configure_reply: '0xe8d4e804' # perf nsim_output_feature_enable_disable: '0x3865946c' # perf diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py index 3775d98377..faf861d89d 100644 --- a/resources/libraries/python/Constants.py +++ b/resources/libraries/python/Constants.py @@ -232,6 +232,9 @@ class Constants: # Duration of one trial in MRR test. PERF_TRIAL_DURATION = get_float_from_env(u"PERF_TRIAL_DURATION", 1.0) + # Whether to use latency streams in main search trials. + PERF_USE_LATENCY = get_pessimistic_bool_from_env(u"PERF_USE_LATENCY") + # Duration of one latency-specific trial in NDRPDR test. PERF_TRIAL_LATENCY_DURATION = get_float_from_env( u"PERF_TRIAL_LATENCY_DURATION", 5.0) diff --git a/resources/libraries/python/MLRsearch/AbstractMeasurer.py b/resources/libraries/python/MLRsearch/AbstractMeasurer.py index 622b8fdba6..82116f2e43 100644 --- a/resources/libraries/python/MLRsearch/AbstractMeasurer.py +++ b/resources/libraries/python/MLRsearch/AbstractMeasurer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -24,7 +24,7 @@ class AbstractMeasurer(metaclass=ABCMeta): """Perform trial measurement and return the result. :param duration: Trial duration [s]. - :param transmit_rate: Target transmit rate [pps]. + :param transmit_rate: Target transmit rate [tps]. :type duration: float :type transmit_rate: float :returns: Structure containing the result of the measurement. diff --git a/resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py b/resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py index f4f2d3f096..f2bf04e1b1 100644 --- a/resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py +++ b/resources/libraries/python/MLRsearch/AbstractSearchAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -30,16 +30,19 @@ class AbstractSearchAlgorithm(metaclass=ABCMeta): @abstractmethod def narrow_down_ndr_and_pdr( - self, fail_rate, line_rate, packet_loss_ratio): + self, min_rate, max_rate, packet_loss_ratio): """Perform measurements to narrow down intervals, return them. This will be renamed when custom loss ratio lists are supported. - :param fail_rate: Minimal target transmit rate [pps]. - :param line_rate: Maximal target transmit rate [pps]. + :param min_rate: Minimal target transmit rate [tps]. + Usually, tests are set to fail if search reaches this or below. + :param max_rate: Maximal target transmit rate [tps]. + Usually computed from line rate and various other limits, + to prevent failures or duration stretching in Traffic Generator. :param packet_loss_ratio: Fraction of packets lost, for PDR [1]. - :type fail_rate: float - :type line_rate: float + :type min_rate: float + :type max_rate: float :type packet_loss_ratio: float :returns: Structure containing narrowed down intervals and their measurements. diff --git a/resources/libraries/python/MLRsearch/MultipleLossRatioSearch.py b/resources/libraries/python/MLRsearch/MultipleLossRatioSearch.py index 2db65ef755..87dc784cbc 100644 --- a/resources/libraries/python/MLRsearch/MultipleLossRatioSearch.py +++ b/resources/libraries/python/MLRsearch/MultipleLossRatioSearch.py @@ -157,7 +157,7 @@ class MultipleLossRatioSearch(AbstractSearchAlgorithm): :returns: The relative width of double logarithmic size. :rtype: float """ - return 1.999 * relative_width - relative_width * relative_width + return 1.99999 * relative_width - relative_width * relative_width # The number should be 2.0, but we want to avoid rounding errors, # and ensure half of double is not larger than the original value. @@ -255,52 +255,50 @@ class MultipleLossRatioSearch(AbstractSearchAlgorithm): 1.0 - MultipleLossRatioSearch.half_relative_width(relative_width) ) - def narrow_down_ndr_and_pdr( - self, minimum_transmit_rate, maximum_transmit_rate, - packet_loss_ratio): + def narrow_down_ndr_and_pdr(self, min_rate, max_rate, packet_loss_ratio): """Perform initial phase, create state object, proceed with next phases. - :param minimum_transmit_rate: Minimal target transmit rate [pps]. - :param maximum_transmit_rate: Maximal target transmit rate [pps]. + :param min_rate: Minimal target transmit rate [tps]. + :param max_rate: Maximal target transmit rate [tps]. :param packet_loss_ratio: Fraction of packets lost, for PDR [1]. - :type minimum_transmit_rate: float - :type maximum_transmit_rate: float + :type min_rate: float + :type max_rate: float :type packet_loss_ratio: float :returns: Structure containing narrowed down intervals and their measurements. :rtype: NdrPdrResult.NdrPdrResult :raises RuntimeError: If total duration is larger than timeout. """ - minimum_transmit_rate = float(minimum_transmit_rate) - maximum_transmit_rate = float(maximum_transmit_rate) + minimum_transmit_rate = float(min_rate) + maximum_transmit_rate = float(max_rate) packet_loss_ratio = float(packet_loss_ratio) - line_measurement = self.measurer.measure( + max_measurement = self.measurer.measure( self.initial_trial_duration, maximum_transmit_rate) initial_width_goal = self.final_relative_width for _ in range(self.number_of_intermediate_phases): initial_width_goal = self.double_relative_width(initial_width_goal) max_lo = maximum_transmit_rate * (1.0 - initial_width_goal) - mrr = max( - minimum_transmit_rate, min(max_lo, line_measurement.receive_rate) - ) + mrr = max(minimum_transmit_rate, min( + max_lo, max_measurement.relative_receive_rate + )) mrr_measurement = self.measurer.measure( self.initial_trial_duration, mrr ) # Attempt to get narrower width. if mrr_measurement.loss_fraction > 0.0: max2_lo = mrr * (1.0 - initial_width_goal) - mrr2 = min(max2_lo, mrr_measurement.receive_rate) + mrr2 = min(max2_lo, mrr_measurement.relative_receive_rate) else: mrr2 = mrr / (1.0 - initial_width_goal) if minimum_transmit_rate < mrr2 < maximum_transmit_rate: - line_measurement = mrr_measurement + max_measurement = mrr_measurement mrr_measurement = self.measurer.measure( self.initial_trial_duration, mrr2) if mrr2 > mrr: - line_measurement, mrr_measurement = \ - (mrr_measurement, line_measurement) + max_measurement, mrr_measurement = \ + (mrr_measurement, max_measurement) starting_interval = ReceiveRateInterval( - mrr_measurement, line_measurement) + mrr_measurement, max_measurement) starting_result = NdrPdrResult(starting_interval, starting_interval) state = self.ProgressState( starting_result, self.number_of_intermediate_phases, diff --git a/resources/libraries/python/MLRsearch/ReceiveRateMeasurement.py b/resources/libraries/python/MLRsearch/ReceiveRateMeasurement.py index 31a6f8202e..c732e66026 100644 --- a/resources/libraries/python/MLRsearch/ReceiveRateMeasurement.py +++ b/resources/libraries/python/MLRsearch/ReceiveRateMeasurement.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -17,18 +17,39 @@ class ReceiveRateMeasurement: """Structure defining the result of single Rr measurement.""" - def __init__(self, duration, target_tr, transmit_count, loss_count): + def __init__( + self, duration, target_tr, transmit_count, loss_count, + approximated_duration=0.0, partial_transmit_count=0): """Constructor, normalize primary and compute secondary quantities. + If approximated_duration is nonzero, it is stored. + If approximated_duration is zero, duration value is stored. + Either way, additional secondary quantities are computed + from the store value. + + If there is zero transmit_count, fractions are set to zero. + + In some cases, traffic generator does not attempt all the needed + transactions. In that case, nonzero partial_transmit_count + holds (an estimate of) count of the actually attempted transactions. + This is used to populate some secondary quantities. + + TODO: Use None instead of zero? + :param duration: Measurement duration [s]. :param target_tr: Target transmit rate [pps]. If bidirectional traffic is measured, this is bidirectional rate. :param transmit_count: Number of packets transmitted [1]. :param loss_count: Number of packets transmitted but not received [1]. + :param approximated_duration: Estimate of the actual time of the trial. + :param partial_transmit_count: Estimate count of actually attempted + transactions. :type duration: float :type target_tr: float :type transmit_count: int :type loss_count: int + :type approximated_duration: float + :type partial_transmit_count: int """ self.duration = float(duration) self.target_tr = float(target_tr) @@ -38,8 +59,41 @@ class ReceiveRateMeasurement: self.transmit_rate = transmit_count / self.duration self.loss_rate = loss_count / self.duration self.receive_rate = self.receive_count / self.duration - self.loss_fraction = float(self.loss_count) / self.transmit_count - # TODO: Do we want to store also the real time (duration + overhead)? + self.loss_fraction = ( + float(self.loss_count) / self.transmit_count + if self.transmit_count > 0 else 1.0 + ) + self.receive_fraction = ( + float(self.receive_count) / self.transmit_count + if self.transmit_count > 0 else 0.0 + ) + self.approximated_duration = ( + float(approximated_duration) if approximated_duration + else self.duration + ) + self.approximated_receive_rate = ( + self.receive_count / self.approximated_duration + if self.approximated_duration > 0.0 else 0.0 + ) + # If the traffic generator is unreliable and sends less packets, + # the absolute receive rate might be too low for next target. + self.partial_transmit_count = ( + int(partial_transmit_count) if partial_transmit_count + else self.transmit_count + ) + self.partial_receive_fraction = ( + float(self.receive_count) / self.partial_transmit_count + if self.partial_transmit_count > 0 else 0.0 + ) + self.partial_receive_rate = ( + self.target_tr * self.partial_receive_fraction + ) + # We use relative packet ratios in order to support cases + # where target_tr is in transactions per second, + # but there are multiple packets per transaction. + self.relative_receive_rate = ( + self.target_tr * self.receive_count / self.transmit_count + ) def __str__(self): """Return string reporting input and loss fraction.""" @@ -51,4 +105,6 @@ class ReceiveRateMeasurement: return f"ReceiveRateMeasurement(duration={self.duration!r}," \ f"target_tr={self.target_tr!r}," \ f"transmit_count={self.transmit_count!r}," \ - f"loss_count={self.loss_count!r})" + f"loss_count={self.loss_count!r}," \ + f"approximated_duration={self.approximated_duration!r}," \ + f"partial_transmit_count={self.partial_transmit_count!r})" diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py index 620e14aea1..36f9da3994 100644 --- a/resources/libraries/python/NATUtil.py +++ b/resources/libraries/python/NATUtil.py @@ -96,6 +96,10 @@ class NATUtil: flag=u"NAT_IS_NONE"): """Set NAT44 address range. + The return value is a callable (zero argument Python function) + which can be used to reset NAT state, so repeated trial measurements + hit the same slow path. + :param node: DUT node. :param start_ip: IP range start. :param end_ip: IP range end. @@ -106,6 +110,8 @@ class NATUtil: :type end_ip: str :type vrf_id: int :type flag: str + :returns: Resetter of the NAT state. + :rtype: Callable[[], None] """ cmd = u"nat44_add_del_address_range" err_msg = f"Failed to set NAT44 address range on host {node[u'host']}" @@ -120,6 +126,18 @@ class NATUtil: with PapiSocketExecutor(node) as papi_exec: papi_exec.add(cmd, **args_in).get_reply(err_msg) + # A closure, accessing the variables above. + def resetter(): + """Delete and re-add the NAT range setting.""" + with PapiSocketExecutor(node) as papi_exec: + args_in[u"is_add"] = False + papi_exec.add(cmd, **args_in) + args_in[u"is_add"] = True + papi_exec.add(cmd, **args_in) + papi_exec.get_replies(err_msg) + + return resetter + @staticmethod def show_nat_config(node): """Show the NAT configuration. @@ -279,6 +297,10 @@ class NATUtil: def set_det44_mapping(node, ip_in, subnet_in, ip_out, subnet_out): """Set DET44 mapping. + The return value is a callable (zero argument Python function) + which can be used to reset NAT state, so repeated trial measurements + hit the same slow path. + :param node: DUT node. :param ip_in: Inside IP. :param subnet_in: Inside IP subnet. @@ -303,6 +325,18 @@ class NATUtil: with PapiSocketExecutor(node) as papi_exec: papi_exec.add(cmd, **args_in).get_reply(err_msg) + # A closure, accessing the variables above. + def resetter(): + """Delete and re-add the deterministic NAT mapping.""" + with PapiSocketExecutor(node) as papi_exec: + args_in[u"is_add"] = False + papi_exec.add(cmd, **args_in) + args_in[u"is_add"] = True + papi_exec.add(cmd, **args_in) + papi_exec.get_replies(err_msg) + + return resetter + @staticmethod def get_det44_mapping(node): """Get DET44 mapping data. @@ -325,14 +359,12 @@ class NATUtil: def get_det44_sessions_number(node): """Get number of established DET44 sessions from actual DET44 mapping data. - :param node: DUT node. :type node: dict :returns: Number of established DET44 sessions. :rtype: int """ det44_data = NATUtil.get_det44_mapping(node) - return det44_data.get(u"ses_num", 0) @staticmethod diff --git a/resources/libraries/python/PLRsearch/PLRsearch.py b/resources/libraries/python/PLRsearch/PLRsearch.py index ec58fbd10f..226b482d76 100644 --- a/resources/libraries/python/PLRsearch/PLRsearch.py +++ b/resources/libraries/python/PLRsearch/PLRsearch.py @@ -54,7 +54,7 @@ class PLRsearch: def __init__( self, measurer, trial_duration_per_trial, packet_loss_ratio_target, - trial_number_offset=0, timeout=1800.0, trace_enabled=False): + trial_number_offset=0, timeout=7200.0, trace_enabled=False): """Store rate measurer and additional parameters. The measurer must never report negative loss count. @@ -205,7 +205,7 @@ class PLRsearch: if (trial_number - self.trial_number_offset) <= 1: next_load = max_rate elif (trial_number - self.trial_number_offset) <= 3: - next_load = (measurement.receive_rate / ( + next_load = (measurement.relative_receive_rate / ( 1.0 - self.packet_loss_ratio_target)) else: next_load = (avg1 + avg2) / 2.0 @@ -439,7 +439,7 @@ class PLRsearch: :param lfit_func: Fitting function, typically lfit_spread or lfit_erf. :param trial_result_list: List of trial measurement results. :param mrr: The mrr parameter for the fitting function. - :param spread: The spread parameter for the fittinmg function. + :param spread: The spread parameter for the fitting function. :type trace: function (str, object) -> None :type lfit_func: Function from 3 floats to float. :type trial_result_list: list of MLRsearch.ReceiveRateMeasurement @@ -455,20 +455,21 @@ class PLRsearch: trace(u"for tr", result.target_tr) trace(u"lc", result.loss_count) trace(u"d", result.duration) - log_avg_loss_per_second = lfit_func( + # _rel_ values use units of target_tr (transactions per second). + log_avg_rel_loss_per_second = lfit_func( trace, result.target_tr, mrr, spread ) - log_avg_loss_per_trial = ( - log_avg_loss_per_second + math.log(result.duration) + # _abs_ values use units of loss count (maybe packets). + # There can be multiple packets per transaction. + log_avg_abs_loss_per_trial = log_avg_rel_loss_per_second + math.log( + result.transmit_count / result.target_tr ) - # Poisson probability computation works nice for logarithms. - log_trial_likelihood = ( - result.loss_count * log_avg_loss_per_trial - - math.exp(log_avg_loss_per_trial) - ) - log_trial_likelihood -= math.lgamma(1 + result.loss_count) + # Geometric probability computation for logarithms. + log_trial_likelihood = log_plus(0.0, -log_avg_abs_loss_per_trial) + log_trial_likelihood *= -result.loss_count + log_trial_likelihood -= log_plus(0.0, +log_avg_abs_loss_per_trial) log_likelihood += log_trial_likelihood - trace(u"avg_loss_per_trial", math.exp(log_avg_loss_per_trial)) + trace(u"avg_loss_per_trial", math.exp(log_avg_abs_loss_per_trial)) trace(u"log_trial_likelihood", log_trial_likelihood) return log_likelihood diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index 12c5271873..adc95bf252 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -67,7 +67,7 @@ class TGDropRateSearchImpl(DropRateSearch): def measure_loss( self, rate, frame_size, loss_acceptance, loss_acceptance_type, - traffic_profile, skip_warmup=False): + traffic_profile): """Runs the traffic and evaluate the measured results. :param rate: Offered traffic load. @@ -76,13 +76,11 @@ class TGDropRateSearchImpl(DropRateSearch): :param loss_acceptance_type: Type of permitted loss. :param traffic_profile: Module name as a traffic profile identifier. See GPL/traffic_profiles/trex for implemented modules. - :param skip_warmup: Start TRex without warmup traffic if true. :type rate: float :type frame_size: str :type loss_acceptance: float :type loss_acceptance_type: LossAcceptanceType :type traffic_profile: str - :type skip_warmup: bool :returns: Drop threshold exceeded? (True/False) :rtype: bool :raises NotImplementedError: If TG is not supported. @@ -96,15 +94,9 @@ class TGDropRateSearchImpl(DropRateSearch): subtype = check_subtype(tg_instance.node) if subtype == NodeSubTypeTG.TREX: unit_rate = str(rate) + self.get_rate_type_str() - if skip_warmup: - tg_instance.trex_stl_start_remote_exec( - self.get_duration(), unit_rate, frame_size, traffic_profile, - warmup_time=0.0 - ) - else: - tg_instance.trex_stl_start_remote_exec( - self.get_duration(), unit_rate, frame_size, traffic_profile - ) + tg_instance.trex_stl_start_remote_exec( + self.get_duration(), unit_rate, frame_size, traffic_profile + ) loss = tg_instance.get_loss() sent = tg_instance.get_sent() if self.loss_acceptance_type_is_percentage(): @@ -145,6 +137,8 @@ class TrafficGenerator(AbstractMeasurer): ROBOT_LIBRARY_SCOPE = u"TEST SUITE" def __init__(self): + # TODO: Separate into few dataclasses/dicts. + # Pylint dislikes large unstructured state, and it is right. self._node = None self._mode = None # TG interface order mapping @@ -160,14 +154,23 @@ class TrafficGenerator(AbstractMeasurer): self._l7_data = None # Measurement input fields, needed for async stop result. self._start_time = None + self._stop_time = None self._rate = None + self._target_duration = None + self._duration = None # Other input parameters, not knowable from measure() signature. self.frame_size = None self.traffic_profile = None - self.warmup_time = None self.traffic_directions = None self.negative_loss = None self.use_latency = None + self.ppta = None + self.resetter = None + self.transaction_scale = None + self.transaction_duration = None + self.sleep_till_duration = None + self.transaction_type = None + self.duration_limit = None # Transient data needed for async measurements. self._xstats = (None, None) # TODO: Rename "xstats" to something opaque, so T-Rex is not privileged? @@ -454,108 +457,6 @@ class TrafficGenerator(AbstractMeasurer): message=u"T-Rex kill failed!" ) - def _parse_traffic_results(self, stdout): - """Parse stdout of scripts into fields of self. - - Block of code to reuse, by sync start, or stop after async. - - :param stdout: Text containing the standard output. - :type stdout: str - """ - subtype = check_subtype(self._node) - if subtype == NodeSubTypeTG.TREX: - # Last line from console output - line = stdout.splitlines()[-1] - results = line.split(u",") - if results[-1] in (u" ", u""): - results.pop(-1) - self._result = dict() - for result in results: - key, value = result.split(u"=", maxsplit=1) - self._result[key.strip()] = value - logger.info(f"TrafficGen results:\n{self._result}") - self._received = self._result.get(u"total_received") - self._sent = self._result.get(u"total_sent") - self._loss = self._result.get(u"frame_loss") - self._approximated_duration = \ - self._result.get(u"approximated_duration") - self._approximated_rate = self._result.get(u"approximated_rate") - self._latency = list() - self._latency.append(self._result.get(u"latency_stream_0(usec)")) - self._latency.append(self._result.get(u"latency_stream_1(usec)")) - if self._mode == TrexMode.ASTF: - self._l7_data = dict() - self._l7_data[u"client"] = dict() - self._l7_data[u"client"][u"active_flows"] = \ - self._result.get(u"client_active_flows") - self._l7_data[u"client"][u"established_flows"] = \ - self._result.get(u"client_established_flows") - self._l7_data[u"client"][u"err_rx_throttled"] = \ - self._result.get(u"client_err_rx_throttled") - self._l7_data[u"client"][u"err_c_nf_throttled"] = \ - self._result.get(u"client_err_nf_throttled") - self._l7_data[u"client"][u"err_flow_overflow"] = \ - self._result.get(u"client_err_flow_overflow") - self._l7_data[u"server"] = dict() - self._l7_data[u"server"][u"active_flows"] = \ - self._result.get(u"server_active_flows") - self._l7_data[u"server"][u"established_flows"] = \ - self._result.get(u"server_established_flows") - self._l7_data[u"server"][u"err_rx_throttled"] = \ - self._result.get(u"client_err_rx_throttled") - if u"udp" in self.traffic_profile: - self._l7_data[u"client"][u"udp"] = dict() - self._l7_data[u"client"][u"udp"][u"established_flows"] = \ - self._result.get(u"client_udp_connects") - self._l7_data[u"client"][u"udp"][u"closed_flows"] = \ - self._result.get(u"client_udp_closed") - self._l7_data[u"client"][u"udp"][u"tx_bytes"] = \ - self._result.get(u"client_udp_tx_bytes") - self._l7_data[u"client"][u"udp"][u"rx_bytes"] = \ - self._result.get(u"client_udp_rx_bytes") - self._l7_data[u"client"][u"udp"][u"tx_packets"] = \ - self._result.get(u"client_udp_tx_packets") - self._l7_data[u"client"][u"udp"][u"rx_packets"] = \ - self._result.get(u"client_udp_rx_packets") - self._l7_data[u"client"][u"udp"][u"keep_drops"] = \ - self._result.get(u"client_udp_keep_drops") - self._l7_data[u"server"][u"udp"] = dict() - self._l7_data[u"server"][u"udp"][u"accepted_flows"] = \ - self._result.get(u"server_udp_accepts") - self._l7_data[u"server"][u"udp"][u"closed_flows"] = \ - self._result.get(u"server_udp_closed") - self._l7_data[u"server"][u"udp"][u"tx_bytes"] = \ - self._result.get(u"server_udp_tx_bytes") - self._l7_data[u"server"][u"udp"][u"rx_bytes"] = \ - self._result.get(u"server_udp_rx_bytes") - self._l7_data[u"server"][u"udp"][u"tx_packets"] = \ - self._result.get(u"server_udp_tx_packets") - self._l7_data[u"server"][u"udp"][u"rx_packets"] = \ - self._result.get(u"server_udp_rx_packets") - elif u"tcp" in self.traffic_profile: - self._l7_data[u"client"][u"tcp"] = dict() - self._l7_data[u"client"][u"tcp"][u"initiated_flows"] = \ - self._result.get(u"client_tcp_connect_inits") - self._l7_data[u"client"][u"tcp"][u"established_flows"] = \ - self._result.get(u"client_tcp_connects") - self._l7_data[u"client"][u"tcp"][u"closed_flows"] = \ - self._result.get(u"client_tcp_closed") - self._l7_data[u"client"][u"tcp"][u"tx_bytes"] = \ - self._result.get(u"client_tcp_tx_bytes") - self._l7_data[u"client"][u"tcp"][u"rx_bytes"] = \ - self._result.get(u"client_tcp_rx_bytes") - self._l7_data[u"server"][u"tcp"] = dict() - self._l7_data[u"server"][u"tcp"][u"accepted_flows"] = \ - self._result.get(u"server_tcp_accepts") - self._l7_data[u"server"][u"tcp"][u"established_flows"] = \ - self._result.get(u"server_tcp_connects") - self._l7_data[u"server"][u"tcp"][u"closed_flows"] = \ - self._result.get(u"server_tcp_closed") - self._l7_data[u"server"][u"tcp"][u"tx_bytes"] = \ - self._result.get(u"server_tcp_tx_bytes") - self._l7_data[u"server"][u"tcp"][u"rx_bytes"] = \ - self._result.get(u"server_tcp_rx_bytes") - def trex_astf_stop_remote_exec(self, node): """Execute T-Rex ASTF script on remote node over ssh to stop running traffic. @@ -612,59 +513,77 @@ class TrafficGenerator(AbstractMeasurer): :raises ValueError: If TG traffic profile is not supported. """ subtype = check_subtype(self._node) - if subtype == NodeSubTypeTG.TREX: - if u"trex-astf" in self.traffic_profile: - self.trex_astf_stop_remote_exec(self._node) - elif u"trex-stl" in self.traffic_profile: - self.trex_stl_stop_remote_exec(self._node) - else: - raise ValueError(u"Unsupported T-Rex traffic profile!") + if subtype != NodeSubTypeTG.TREX: + raise ValueError(f"Unsupported TG subtype: {subtype!r}") + if u"trex-astf" in self.traffic_profile: + self.trex_astf_stop_remote_exec(self._node) + elif u"trex-stl" in self.traffic_profile: + self.trex_stl_stop_remote_exec(self._node) + else: + raise ValueError(u"Unsupported T-Rex traffic profile!") + self._stop_time = time.monotonic() return self.get_measurement_result() def trex_astf_start_remote_exec( - self, duration, mult, frame_size, traffic_profile, async_call=False, - latency=True, warmup_time=5.0, traffic_directions=2, tx_port=0, - rx_port=1): + self, duration, multiplier, async_call=False): """Execute T-Rex ASTF script on remote node over ssh to start running traffic. In sync mode, measurement results are stored internally. In async mode, initial data including xstats are stored internally. - :param duration: Time expresed in seconds for how long to send traffic. - :param mult: Traffic rate expressed with units (pps, %) - :param frame_size: L2 frame size to send (without padding and IPG). - :param traffic_profile: Module name as a traffic profile identifier. - See GPL/traffic_profiles/trex for implemented modules. + This method contains the logic to compute duration as maximum time + if transaction_scale is nonzero. + The transaction_scale argument defines (limits) how many transactions + will be started in total. As that amount of transaction can take + considerable time (sometimes due to explicit delays in the profile), + the real time a trial needs to finish is computed here. For now, + in that case the duration argument is ignored, assuming it comes + from ASTF-unaware search algorithm. The overall time a single + transaction needs is given in parameter transaction_duration, + it includes both explicit delays and implicit time it takes + to transfer data (or whatever the transaction does). + + Currently it is observed TRex does not start the ASTF traffic + immediately, an ad-hoc constant is added to the computed duration + to compensate for that. + + If transaction_scale is zero, duration is not recomputed. + It is assumed the subsequent result parsing gets the real duration + if the traffic stops sooner for any reason. + + Currently, it is assumed traffic profile defines a single transaction. + To avoid heavy logic here, the input rate is expected to be in + transactions per second, as that directly translates to TRex multiplier, + (assuming the profile does not override the default cps value of one). + + :param duration: Time expressed in seconds for how long to send traffic. + :param multiplier: Traffic rate in transactions per second. :param async_call: If enabled then don't wait for all incoming traffic. - :param latency: With latency measurement. - :param warmup_time: Warmup time period. - :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. - Default: 2 - :param tx_port: Traffic generator transmit port for first flow. - Default: 0 - :param rx_port: Traffic generator receive port for first flow. - Default: 1 :type duration: float - :type mult: int - :type frame_size: str - :type traffic_profile: str + :type multiplier: int :type async_call: bool - :type latency: bool - :type warmup_time: float - :type traffic_directions: int - :type tx_port: int - :type rx_port: int :raises RuntimeError: In case of T-Rex driver issue. """ self.check_mode(TrexMode.ASTF) - p_0, p_1 = (rx_port, tx_port) if self._ifaces_reordered \ - else (tx_port, rx_port) + p_0, p_1 = (1, 0) if self._ifaces_reordered else (0, 1) if not isinstance(duration, (float, int)): duration = float(duration) - if not isinstance(warmup_time, (float, int)): - warmup_time = float(warmup_time) + + # Duration logic. + computed_duration = duration + if duration > 0.0: + if self.transaction_scale: + computed_duration = self.transaction_scale / multiplier + # Log the computed duration, + # so we can compare with what telemetry suggests + # the real duration was. + logger.debug(f"Expected duration {computed_duration}") + computed_duration += 0.1115 + # Else keep -1. + if self.duration_limit: + computed_duration = min(computed_duration, self.duration_limit) command_line = OptionString().add(u"python3") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/tools/trex" @@ -672,31 +591,31 @@ class TrafficGenerator(AbstractMeasurer): command_line.change_prefix(u"--") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/traffic_profiles/trex" command_line.add_with_value( - u"profile", f"'{dirname}/{traffic_profile}.py'" + u"profile", f"'{dirname}/{self.traffic_profile}.py'" ) - command_line.add_with_value(u"duration", f"{duration!r}") - command_line.add_with_value(u"frame_size", frame_size) - command_line.add_with_value(u"mult", int(mult)) - command_line.add_with_value(u"warmup_time", f"{warmup_time!r}") + command_line.add_with_value(u"duration", f"{computed_duration!r}") + command_line.add_with_value(u"frame_size", self.frame_size) + command_line.add_with_value(u"multiplier", multiplier) command_line.add_with_value(u"port_0", p_0) command_line.add_with_value(u"port_1", p_1) - command_line.add_with_value(u"traffic_directions", traffic_directions) + command_line.add_with_value( + u"traffic_directions", self.traffic_directions + ) command_line.add_if(u"async_start", async_call) - command_line.add_if(u"latency", latency) + command_line.add_if(u"latency", self.use_latency) command_line.add_if(u"force", Constants.TREX_SEND_FORCE) + self._start_time = time.monotonic() + self._rate = multiplier stdout, _ = exec_cmd_no_error( - self._node, command_line, - timeout=int(duration) + 600 if u"tcp" in self.traffic_profile - else 60, + self._node, command_line, timeout=computed_duration + 10.0, message=u"T-Rex ASTF runtime error!" ) - self.traffic_directions = traffic_directions if async_call: # no result - self._start_time = time.time() - self._rate = float(mult) + self._target_duration = None + self._duration = None self._received = None self._sent = None self._loss = None @@ -706,24 +625,28 @@ class TrafficGenerator(AbstractMeasurer): self._l7_data[u"client"] = dict() self._l7_data[u"client"][u"active_flows"] = None self._l7_data[u"client"][u"established_flows"] = None + self._l7_data[u"client"][u"traffic_duration"] = None self._l7_data[u"server"] = dict() self._l7_data[u"server"][u"active_flows"] = None self._l7_data[u"server"][u"established_flows"] = None + self._l7_data[u"server"][u"traffic_duration"] = None if u"udp" in self.traffic_profile: self._l7_data[u"client"][u"udp"] = dict() - self._l7_data[u"client"][u"udp"][u"established_flows"] = None + self._l7_data[u"client"][u"udp"][u"connects"] = None self._l7_data[u"client"][u"udp"][u"closed_flows"] = None + self._l7_data[u"client"][u"udp"][u"err_cwf"] = None self._l7_data[u"server"][u"udp"] = dict() self._l7_data[u"server"][u"udp"][u"accepted_flows"] = None self._l7_data[u"server"][u"udp"][u"closed_flows"] = None elif u"tcp" in self.traffic_profile: self._l7_data[u"client"][u"tcp"] = dict() self._l7_data[u"client"][u"tcp"][u"initiated_flows"] = None - self._l7_data[u"client"][u"tcp"][u"established_flows"] = None + self._l7_data[u"client"][u"tcp"][u"connects"] = None self._l7_data[u"client"][u"tcp"][u"closed_flows"] = None + self._l7_data[u"client"][u"tcp"][u"connattempt"] = None self._l7_data[u"server"][u"tcp"] = dict() self._l7_data[u"server"][u"tcp"][u"accepted_flows"] = None - self._l7_data[u"server"][u"tcp"][u"established_flows"] = None + self._l7_data[u"server"][u"tcp"][u"connects"] = None self._l7_data[u"server"][u"tcp"][u"closed_flows"] = None else: logger.warn(u"Unsupported T-Rex ASTF traffic profile!") @@ -736,53 +659,36 @@ class TrafficGenerator(AbstractMeasurer): break self._xstats = tuple(xstats) else: + self._target_duration = duration + self._duration = computed_duration self._parse_traffic_results(stdout) - self._start_time = None - self._rate = None - def trex_stl_start_remote_exec( - self, duration, rate, frame_size, traffic_profile, async_call=False, - latency=False, warmup_time=5.0, traffic_directions=2, tx_port=0, - rx_port=1): + def trex_stl_start_remote_exec(self, duration, rate, async_call=False): """Execute T-Rex STL script on remote node over ssh to start running traffic. In sync mode, measurement results are stored internally. In async mode, initial data including xstats are stored internally. + Mode-unaware code (e.g. in search algorithms) works with transactions. + To keep the logic simple, multiplier is set to that value. + As bidirectional traffic profiles send packets in both directions, + they are treated as transactions with two packets (one per direction). + :param duration: Time expressed in seconds for how long to send traffic. - :param rate: Traffic rate expressed with units (pps, %) - :param frame_size: L2 frame size to send (without padding and IPG). - :param traffic_profile: Module name as a traffic profile identifier. - See GPL/traffic_profiles/trex for implemented modules. + :param rate: Traffic rate in transactions per second. :param async_call: If enabled then don't wait for all incoming traffic. - :param latency: With latency measurement. - :param warmup_time: Warmup time period. - :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. - Default: 2 - :param tx_port: Traffic generator transmit port for first flow. - Default: 0 - :param rx_port: Traffic generator receive port for first flow. - Default: 1 :type duration: float :type rate: str - :type frame_size: str - :type traffic_profile: str :type async_call: bool - :type latency: bool - :type warmup_time: float - :type traffic_directions: int - :type tx_port: int - :type rx_port: int :raises RuntimeError: In case of T-Rex driver issue. """ self.check_mode(TrexMode.STL) - p_0, p_1 = (rx_port, tx_port) if self._ifaces_reordered \ - else (tx_port, rx_port) + p_0, p_1 = (1, 0) if self._ifaces_reordered else (0, 1) if not isinstance(duration, (float, int)): duration = float(duration) - if not isinstance(warmup_time, (float, int)): - warmup_time = float(warmup_time) + if self.duration_limit: + duration = min(duration, self.duration_limit) command_line = OptionString().add(u"python3") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/tools/trex" @@ -790,29 +696,32 @@ class TrafficGenerator(AbstractMeasurer): command_line.change_prefix(u"--") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/traffic_profiles/trex" command_line.add_with_value( - u"profile", f"'{dirname}/{traffic_profile}.py'" + u"profile", f"'{dirname}/{self.traffic_profile}.py'" ) command_line.add_with_value(u"duration", f"{duration!r}") - command_line.add_with_value(u"frame_size", frame_size) + command_line.add_with_value(u"frame_size", self.frame_size) command_line.add_with_value(u"rate", f"{rate!r}") - command_line.add_with_value(u"warmup_time", f"{warmup_time!r}") command_line.add_with_value(u"port_0", p_0) command_line.add_with_value(u"port_1", p_1) - command_line.add_with_value(u"traffic_directions", traffic_directions) + command_line.add_with_value( + u"traffic_directions", self.traffic_directions + ) command_line.add_if(u"async_start", async_call) - command_line.add_if(u"latency", latency) + command_line.add_if(u"latency", self.use_latency) command_line.add_if(u"force", Constants.TREX_SEND_FORCE) + # TODO: This is ugly. Handle parsing better. + self._start_time = time.monotonic() + self._rate = float(rate[:-3]) if u"pps" in rate else float(rate) stdout, _ = exec_cmd_no_error( self._node, command_line, timeout=int(duration) + 60, message=u"T-Rex STL runtime error" ) - self.traffic_directions = traffic_directions if async_call: # no result - self._start_time = time.time() - self._rate = float(rate[:-3]) if u"pps" in rate else float(rate) + self._target_duration = None + self._duration = None self._received = None self._sent = None self._loss = None @@ -828,14 +737,25 @@ class TrafficGenerator(AbstractMeasurer): break self._xstats = tuple(xstats) else: + self._target_duration = duration + self._duration = duration self._parse_traffic_results(stdout) - self._start_time = None - self._rate = None def send_traffic_on_tg( - self, duration, rate, frame_size, traffic_profile, warmup_time=5, - async_call=False, latency=False, traffic_directions=2, tx_port=0, - rx_port=1): + self, + duration, + rate, + frame_size, + traffic_profile, + async_call=False, + ppta=1, + traffic_directions=2, + transaction_duration=0.0, + transaction_scale=0, + transaction_type=u"packet", + duration_limit=0.0, + use_latency=False, + ): """Send traffic from all configured interfaces on TG. In async mode, xstats is stored internally, @@ -843,61 +763,102 @@ class TrafficGenerator(AbstractMeasurer): In both modes, stdout is returned, but _parse_traffic_results only works in sync output. - Note that bidirectional traffic also contains flows - transmitted from rx_port and received in tx_port. - But some tests use asymmetric traffic, so those arguments are relevant. - - Also note that traffic generator uses DPDK driver which might + Note that traffic generator uses DPDK driver which might reorder port numbers based on wiring and PCI numbering. This method handles that, so argument values are invariant, but you can see swapped valued in debug logs. + When transaction_scale is specified, the duration value is ignored + and the needed time is computed. For cases where this results in + to too long measurement (e.g. teardown trial with small rate), + duration_limit is applied (of non-zero), so the trial is stopped sooner. + + Bidirectional STL profiles are treated as transactions with two packets. + :param duration: Duration of test traffic generation in seconds. - :param rate: Traffic rate. - - T-Rex stateless mode => Offered load per interface in pps, - - T-Rex advanced stateful mode => multiplier of profile CPS. + :param rate: Traffic rate in transactions per second. :param frame_size: Frame size (L2) in Bytes. :param traffic_profile: Module name as a traffic profile identifier. See GPL/traffic_profiles/trex for implemented modules. - :param warmup_time: Warmup phase in seconds. :param async_call: Async mode. - :param latency: With latency measurement. + :param ppta: Packets per transaction, aggregated over directions. + Needed for udp_pps which does not have a good transaction counter, + so we need to compute expected number of packets. + Default: 1. :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. Default: 2 - :param tx_port: Traffic generator transmit port for first flow. - Default: 0 - :param rx_port: Traffic generator receive port for first flow. - Default: 1 + :param transaction_duration: Total expected time to close transaction. + :param transaction_scale: Number of transactions to perform. + 0 (default) means unlimited. + :param transaction_type: An identifier specifying which counters + and formulas to use when computing attempted and failed + transactions. Default: "packet". + :param duration_limit: Zero or maximum limit for computed (or given) + duration. + :param use_latency: Whether to measure latency during the trial. + Default: False. :type duration: float :type rate: float :type frame_size: str :type traffic_profile: str - :type warmup_time: float :type async_call: bool - :type latency: bool + :type ppta: int :type traffic_directions: int - :type tx_port: int - :type rx_port: int + :type transaction_duration: float + :type transaction_scale: int + :type transaction_type: str + :type duration_limit: float + :type use_latency: bool + :returns: TG results. + :rtype: str + :raises ValueError: If TG traffic profile is not supported. + """ + self.set_rate_provider_defaults( + frame_size=frame_size, + traffic_profile=traffic_profile, + ppta=ppta, + traffic_directions=traffic_directions, + transaction_duration=transaction_duration, + transaction_scale=transaction_scale, + transaction_type=transaction_type, + duration_limit=duration_limit, + use_latency=use_latency, + ) + self._send_traffic_on_tg_internal(duration, rate, async_call) + + def _send_traffic_on_tg_internal(self, duration, rate, async_call=False): + """Send traffic from all configured interfaces on TG. + + This is an internal function, it assumes set_rate_provider_defaults + has been called to remember most values. + The reason why need to remember various values is that + the traffic can be asynchronous, and parsing needs those values. + The reason why this is is a separate function from the one + which calls set_rate_provider_defaults is that some search algorithms + need to specify their own values, and we do not want the measure call + to overwrite them with defaults. + + :param duration: Duration of test traffic generation in seconds. + :param rate: Traffic rate in transactions per second. + :param async_call: Async mode. + :type duration: float + :type rate: float + :type async_call: bool :returns: TG results. :rtype: str :raises ValueError: If TG traffic profile is not supported. """ subtype = check_subtype(self._node) if subtype == NodeSubTypeTG.TREX: - if self.traffic_profile != str(traffic_profile): - self.traffic_profile = str(traffic_profile) if u"trex-astf" in self.traffic_profile: self.trex_astf_start_remote_exec( - duration, int(rate), frame_size, self.traffic_profile, - async_call, latency, warmup_time, traffic_directions, - tx_port, rx_port + duration, float(rate), async_call ) elif u"trex-stl" in self.traffic_profile: unit_rate_str = str(rate) + u"pps" + # TODO: Suport transaction_scale et al? self.trex_stl_start_remote_exec( - duration, unit_rate_str, frame_size, self.traffic_profile, - async_call, latency, warmup_time, traffic_directions, - tx_port, rx_port + duration, unit_rate_str, async_call ) else: raise ValueError(u"Unsupported T-Rex traffic profile!") @@ -918,6 +879,8 @@ class TrafficGenerator(AbstractMeasurer): def fail_if_no_traffic_forwarded(self): """Fail if no traffic forwarded. + TODO: Check number of passed transactions instead. + :returns: nothing :raises Exception: If no traffic forwarded. """ @@ -952,74 +915,234 @@ class TrafficGenerator(AbstractMeasurer): f"Traffic loss {loss} above loss acceptance: {loss_acceptance}" ) - def set_rate_provider_defaults( - self, frame_size, traffic_profile, warmup_time=0.0, - traffic_directions=2, negative_loss=True, latency=False): - """Store values accessed by measure(). + def _parse_traffic_results(self, stdout): + """Parse stdout of scripts into fields of self. - :param frame_size: Frame size identifier or value [B]. - :param traffic_profile: Module name as a traffic profile identifier. - See GPL/traffic_profiles/trex for implemented modules. - :param warmup_time: Traffic duration before measurement starts [s]. - :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. - Default: 2 - :param negative_loss: If false, negative loss is reported as zero loss. - :param latency: Whether to measure latency during the trial. - Default: False. - :type frame_size: str or int - :type traffic_profile: str - :type warmup_time: float - :type traffic_directions: int - :type negative_loss: bool - :type latency: bool + Block of code to reuse, by sync start, or stop after async. + + :param stdout: Text containing the standard output. + :type stdout: str """ - self.frame_size = frame_size - self.traffic_profile = str(traffic_profile) - self.warmup_time = float(warmup_time) - self.traffic_directions = traffic_directions - self.negative_loss = negative_loss - self.use_latency = latency + subtype = check_subtype(self._node) + if subtype == NodeSubTypeTG.TREX: + # Last line from console output + line = stdout.splitlines()[-1] + results = line.split(u";") + if results[-1] in (u" ", u""): + results.pop(-1) + self._result = dict() + for result in results: + key, value = result.split(u"=", maxsplit=1) + self._result[key.strip()] = value + logger.info(f"TrafficGen results:\n{self._result}") + self._received = int(self._result.get(u"total_received"), 0) + self._sent = int(self._result.get(u"total_sent", 0)) + self._loss = int(self._result.get(u"frame_loss", 0)) + self._approximated_duration = \ + self._result.get(u"approximated_duration", 0.0) + if u"manual" not in str(self._approximated_duration): + self._approximated_duration = float(self._approximated_duration) + self._latency = list() + self._latency.append(self._result.get(u"latency_stream_0(usec)")) + self._latency.append(self._result.get(u"latency_stream_1(usec)")) + if self._mode == TrexMode.ASTF: + self._l7_data = dict() + self._l7_data[u"client"] = dict() + self._l7_data[u"client"][u"sent"] = \ + int(self._result.get(u"client_sent", 0)) + self._l7_data[u"client"][u"received"] = \ + int(self._result.get(u"client_received", 0)) + self._l7_data[u"client"][u"active_flows"] = \ + int(self._result.get(u"client_active_flows", 0)) + self._l7_data[u"client"][u"established_flows"] = \ + int(self._result.get(u"client_established_flows", 0)) + self._l7_data[u"client"][u"traffic_duration"] = \ + float(self._result.get(u"client_traffic_duration", 0.0)) + self._l7_data[u"client"][u"err_rx_throttled"] = \ + int(self._result.get(u"client_err_rx_throttled", 0)) + self._l7_data[u"client"][u"err_c_nf_throttled"] = \ + int(self._result.get(u"client_err_nf_throttled", 0)) + self._l7_data[u"client"][u"err_flow_overflow"] = \ + int(self._result.get(u"client_err_flow_overflow", 0)) + self._l7_data[u"server"] = dict() + self._l7_data[u"server"][u"active_flows"] = \ + int(self._result.get(u"server_active_flows", 0)) + self._l7_data[u"server"][u"established_flows"] = \ + int(self._result.get(u"server_established_flows", 0)) + self._l7_data[u"server"][u"traffic_duration"] = \ + float(self._result.get(u"server_traffic_duration", 0.0)) + self._l7_data[u"server"][u"err_rx_throttled"] = \ + int(self._result.get(u"client_err_rx_throttled", 0)) + if u"udp" in self.traffic_profile: + self._l7_data[u"client"][u"udp"] = dict() + self._l7_data[u"client"][u"udp"][u"connects"] = \ + int(self._result.get(u"client_udp_connects", 0)) + self._l7_data[u"client"][u"udp"][u"closed_flows"] = \ + int(self._result.get(u"client_udp_closed", 0)) + self._l7_data[u"client"][u"udp"][u"tx_bytes"] = \ + int(self._result.get(u"client_udp_tx_bytes", 0)) + self._l7_data[u"client"][u"udp"][u"rx_bytes"] = \ + int(self._result.get(u"client_udp_rx_bytes", 0)) + self._l7_data[u"client"][u"udp"][u"tx_packets"] = \ + int(self._result.get(u"client_udp_tx_packets", 0)) + self._l7_data[u"client"][u"udp"][u"rx_packets"] = \ + int(self._result.get(u"client_udp_rx_packets", 0)) + self._l7_data[u"client"][u"udp"][u"keep_drops"] = \ + int(self._result.get(u"client_udp_keep_drops", 0)) + self._l7_data[u"client"][u"udp"][u"err_cwf"] = \ + int(self._result.get(u"client_err_cwf", 0)) + self._l7_data[u"server"][u"udp"] = dict() + self._l7_data[u"server"][u"udp"][u"accepted_flows"] = \ + int(self._result.get(u"server_udp_accepts", 0)) + self._l7_data[u"server"][u"udp"][u"closed_flows"] = \ + int(self._result.get(u"server_udp_closed", 0)) + self._l7_data[u"server"][u"udp"][u"tx_bytes"] = \ + int(self._result.get(u"server_udp_tx_bytes", 0)) + self._l7_data[u"server"][u"udp"][u"rx_bytes"] = \ + int(self._result.get(u"server_udp_rx_bytes", 0)) + self._l7_data[u"server"][u"udp"][u"tx_packets"] = \ + int(self._result.get(u"server_udp_tx_packets", 0)) + self._l7_data[u"server"][u"udp"][u"rx_packets"] = \ + int(self._result.get(u"server_udp_rx_packets", 0)) + elif u"tcp" in self.traffic_profile: + self._l7_data[u"client"][u"tcp"] = dict() + self._l7_data[u"client"][u"tcp"][u"initiated_flows"] = \ + int(self._result.get(u"client_tcp_connect_inits", 0)) + self._l7_data[u"client"][u"tcp"][u"connects"] = \ + int(self._result.get(u"client_tcp_connects", 0)) + self._l7_data[u"client"][u"tcp"][u"closed_flows"] = \ + int(self._result.get(u"client_tcp_closed", 0)) + self._l7_data[u"client"][u"tcp"][u"connattempt"] = \ + int(self._result.get(u"client_tcp_connattempt", 0)) + self._l7_data[u"client"][u"tcp"][u"tx_bytes"] = \ + int(self._result.get(u"client_tcp_tx_bytes", 0)) + self._l7_data[u"client"][u"tcp"][u"rx_bytes"] = \ + int(self._result.get(u"client_tcp_rx_bytes", 0)) + self._l7_data[u"server"][u"tcp"] = dict() + self._l7_data[u"server"][u"tcp"][u"accepted_flows"] = \ + int(self._result.get(u"server_tcp_accepts", 0)) + self._l7_data[u"server"][u"tcp"][u"connects"] = \ + int(self._result.get(u"server_tcp_connects", 0)) + self._l7_data[u"server"][u"tcp"][u"closed_flows"] = \ + int(self._result.get(u"server_tcp_closed", 0)) + self._l7_data[u"server"][u"tcp"][u"tx_bytes"] = \ + int(self._result.get(u"server_tcp_tx_bytes", 0)) + self._l7_data[u"server"][u"tcp"][u"rx_bytes"] = \ + int(self._result.get(u"server_tcp_rx_bytes", 0)) - def get_measurement_result(self, duration=None, transmit_rate=None): + def get_measurement_result(self): """Return the result of last measurement as ReceiveRateMeasurement. Separate function, as measurements can end either by time or by explicit call, this is the common block at the end. + The target_tr field of ReceiveRateMeasurement is in + transactions per second. Transmit count and loss count units + depend on the transaction type. Usually they are in transactions + per second, or aggregate packets per second. + TODO: Fail on running or already reported measurement. - :param duration: Measurement duration [s] if known beforehand. - For explicitly stopped measurement it is estimated. - :param transmit_rate: Target aggregate transmit rate [pps]. - If not given, computed assuming it was bidirectional. - :type duration: float or NoneType - :type transmit_rate: float or NoneType :returns: Structure containing the result of the measurement. :rtype: ReceiveRateMeasurement """ - if duration is None: - duration = time.time() - self._start_time - self._start_time = None - if transmit_rate is None: - transmit_rate = self._rate * self.traffic_directions - transmit_count = int(self.get_sent()) - loss_count = int(self.get_loss()) - if loss_count < 0 and not self.negative_loss: - loss_count = 0 + try: + # Client duration seems to include a setup period + # where TRex does not send any packets yet. + # Server duration does not include it. + server_data = self._l7_data[u"server"] + approximated_duration = float(server_data[u"traffic_duration"]) + except (KeyError, AttributeError, ValueError, TypeError): + approximated_duration = None + try: + if not approximated_duration: + approximated_duration = float(self._approximated_duration) + except ValueError: # "manual" + approximated_duration = None + if not approximated_duration: + if self._duration and self._duration > 0: + # Known recomputed or target duration. + approximated_duration = self._duration + else: + # It was an explicit stop. + if not self._stop_time: + raise RuntimeError(u"Unable to determine duration.") + approximated_duration = self._stop_time - self._start_time + target_duration = self._target_duration + if not target_duration: + target_duration = approximated_duration + transmit_rate = self._rate + if self.transaction_type == u"packet": + partial_attempt_count = self._sent + expected_attempt_count = self._sent + fail_count = self._loss + elif self.transaction_type == u"udp_cps": + if not self.transaction_scale: + raise RuntimeError(u"Add support for no-limit udp_cps.") + partial_attempt_count = self._l7_data[u"client"][u"sent"] + # We do not care whether TG is slow, it should have attempted all. + expected_attempt_count = self.transaction_scale + pass_count = self._l7_data[u"client"][u"received"] + fail_count = expected_attempt_count - pass_count + elif self.transaction_type == u"tcp_cps": + if not self.transaction_scale: + raise RuntimeError(u"Add support for no-limit tcp_cps.") + ctca = self._l7_data[u"client"][u"tcp"][u"connattempt"] + partial_attempt_count = ctca + # We do not care whether TG is slow, it should have attempted all. + expected_attempt_count = self.transaction_scale + # TODO: Is there a better packet-based counter? + pass_count = self._l7_data[u"server"][u"tcp"][u"connects"] + fail_count = expected_attempt_count - pass_count + elif self.transaction_type == u"udp_pps": + if not self.transaction_scale: + raise RuntimeError(u"Add support for no-limit udp_pps.") + partial_attempt_count = self._sent + expected_attempt_count = self.transaction_scale * self.ppta + fail_count = self._loss + (expected_attempt_count - self._sent) + elif self.transaction_type == u"tcp_pps": + if not self.transaction_scale: + raise RuntimeError(u"Add support for no-limit tcp_pps.") + partial_attempt_count = self._sent + expected_attempt_count = self.transaction_scale * self.ppta + # One loss-like scenario happens when TRex receives all packets + # on L2 level, but is not fast enough to process them all + # at L7 level, which leads to retransmissions. + # Those manifest as opackets larger than expected. + # A simple workaround is to add absolute difference. + # Probability of retransmissions exactly cancelling + # packets unsent due to duration stretching is quite low. + fail_count = self._loss + abs(expected_attempt_count - self._sent) + else: + raise RuntimeError(f"Unknown parsing {self.transaction_type!r}") + if fail_count < 0 and not self.negative_loss: + fail_count = 0 measurement = ReceiveRateMeasurement( - duration, transmit_rate, transmit_count, loss_count + duration=target_duration, + target_tr=transmit_rate, + transmit_count=expected_attempt_count, + loss_count=fail_count, + approximated_duration=approximated_duration, + partial_transmit_count=partial_attempt_count, ) measurement.latency = self.get_latency_int() return measurement def measure(self, duration, transmit_rate): - """Run trial measurement, parse and return aggregate results. + """Run trial measurement, parse and return results. - Aggregate means sum over traffic directions. + The input rate is for transactions. Stateles bidirectional traffic + is understood as sequence of (asynchronous) transactions, + two packets each. + + The result units depend on test type, generally + the count either transactions or packets (aggregated over directions). + + Optionally, this method sleeps if measurement finished before + the time specified as duration. :param duration: Trial duration [s]. - :param transmit_rate: Target aggregate transmit rate [pps] / Connections - per second (CPS) for UDP/TCP flows. + :param transmit_rate: Target rate in transactions per second. :type duration: float :type transmit_rate: float :returns: Structure containing the result of the measurement. @@ -1029,18 +1152,93 @@ class TrafficGenerator(AbstractMeasurer): :raises NotImplementedError: If TG is not supported. """ duration = float(duration) - # TG needs target Tr per stream, but reports aggregate Tx and Dx. - unit_rate_int = transmit_rate / float(self.traffic_directions) - self.send_traffic_on_tg( - duration, - unit_rate_int, - self.frame_size, - self.traffic_profile, - warmup_time=self.warmup_time, - latency=self.use_latency, - traffic_directions=self.traffic_directions + time_start = time.monotonic() + time_stop = time_start + duration + if self.resetter: + self.resetter() + self._send_traffic_on_tg_internal( + duration=duration, + rate=transmit_rate, + async_call=False, ) - return self.get_measurement_result(duration, transmit_rate) + result = self.get_measurement_result() + logger.debug(f"trial measurement result: {result!r}") + # In PLRsearch, computation needs the specified time to complete. + if self.sleep_till_duration: + sleeptime = time_stop - time.monotonic() + if sleeptime > 0.0: + # TODO: Sometimes we have time to do additional trials here, + # adapt PLRsearch to accept all the results. + time.sleep(sleeptime) + return result + + def set_rate_provider_defaults( + self, + frame_size, + traffic_profile, + ppta=1, + resetter=None, + traffic_directions=2, + transaction_duration=0.0, + transaction_scale=0, + transaction_type=u"packet", + duration_limit=0.0, + negative_loss=True, + sleep_till_duration=False, + use_latency=False, + ): + """Store values accessed by measure(). + + :param frame_size: Frame size identifier or value [B]. + :param traffic_profile: Module name as a traffic profile identifier. + See GPL/traffic_profiles/trex for implemented modules. + :param ppta: Packets per transaction, aggregated over directions. + Needed for udp_pps which does not have a good transaction counter, + so we need to compute expected number of packets. + Default: 1. + :param resetter: Callable to reset DUT state for repeated trials. + :param traffic_directions: Traffic from packet counting point of view + is bi- (2) or uni- (1) directional. + Default: 2 + :param transaction_duration: Total expected time to close transaction. + :param transaction_scale: Number of transactions to perform. + 0 (default) means unlimited. + :param transaction_type: An identifier specifying which counters + and formulas to use when computing attempted and failed + transactions. Default: "packet". + TODO: Does this also specify parsing for the measured duration? + :param duration_limit: Zero or maximum limit for computed (or given) + duration. + :param negative_loss: If false, negative loss is reported as zero loss. + :param sleep_till_duration: If true and measurement returned faster, + sleep until it matches duration. Needed for PLRsearch. + :param use_latency: Whether to measure latency during the trial. + Default: False. + :type frame_size: str or int + :type traffic_profile: str + :type ppta: int + :type resetter: Optional[Callable[[], None]] + :type traffic_directions: int + :type transaction_duration: float + :type transaction_scale: int + :type transaction_type: str + :type duration_limit: float + :type negative_loss: bool + :type sleep_till_duration: bool + :type use_latency: bool + """ + self.frame_size = frame_size + self.traffic_profile = str(traffic_profile) + self.resetter = resetter + self.ppta = ppta + self.traffic_directions = int(traffic_directions) + self.transaction_duration = float(transaction_duration) + self.transaction_scale = int(transaction_scale) + self.transaction_type = str(transaction_type) + self.duration_limit = float(duration_limit) + self.negative_loss = bool(negative_loss) + self.sleep_till_duration = bool(sleep_till_duration) + self.use_latency = bool(use_latency) class OptimizedSearch: @@ -1052,20 +1250,38 @@ class OptimizedSearch: @staticmethod def perform_optimized_ndrpdr_search( - frame_size, traffic_profile, minimum_transmit_rate, - maximum_transmit_rate, packet_loss_ratio=0.005, - final_relative_width=0.005, final_trial_duration=30.0, - initial_trial_duration=1.0, number_of_intermediate_phases=2, - timeout=720.0, doublings=1, traffic_directions=2, latency=False): + frame_size, + traffic_profile, + minimum_transmit_rate, + maximum_transmit_rate, + packet_loss_ratio=0.005, + final_relative_width=0.005, + final_trial_duration=30.0, + initial_trial_duration=1.0, + number_of_intermediate_phases=2, + timeout=720.0, + doublings=1, + ppta=1, + resetter=None, + traffic_directions=2, + transaction_duration=0.0, + transaction_scale=0, + transaction_type=u"packet", + use_latency=False, + ): """Setup initialized TG, perform optimized search, return intervals. + If transaction_scale is nonzero, all non-init trial durations + are set to 2.0 (as they do not affect the real trial duration) + and zero intermediate phases are used. + The initial phase still uses 1.0 seconds, to force remeasurement. + That makes initial phase act as a warmup. + :param frame_size: Frame size identifier or value [B]. :param traffic_profile: Module name as a traffic profile identifier. See GPL/traffic_profiles/trex for implemented modules. - :param minimum_transmit_rate: Minimal uni-directional - target transmit rate [pps]. - :param maximum_transmit_rate: Maximal uni-directional - target transmit rate [pps]. + :param minimum_transmit_rate: Minimal load in transactions per second. + :param maximum_transmit_rate: Maximal load in transactions per second. :param packet_loss_ratio: Fraction of packets lost, for PDR [1]. :param final_relative_width: Final lower bound transmit rate cannot be more distant that this multiple of upper bound [1]. @@ -1079,9 +1295,20 @@ class OptimizedSearch: :param doublings: How many doublings to do in external search step. Default 1 is suitable for fairly stable tests, less stable tests might get better overal duration with 2 or more. + :param ppta: Packets per transaction, aggregated over directions. + Needed for udp_pps which does not have a good transaction counter, + so we need to compute expected number of packets. + Default: 1. + :param resetter: Callable to reset DUT state for repeated trials. :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. Default: 2 - :param latency: Whether to measure latency during the trial. + :param transaction_duration: Total expected time to close transaction. + :param transaction_scale: Number of transactions to perform. + 0 (default) means unlimited. + :param transaction_type: An identifier specifying which counters + and formulas to use when computing attempted and failed + transactions. Default: "packet". + :param use_latency: Whether to measure latency during the trial. Default: False. :type frame_size: str or int :type traffic_profile: str @@ -1094,53 +1321,85 @@ class OptimizedSearch: :type number_of_intermediate_phases: int :type timeout: float :type doublings: int + :type ppta: int + :type resetter: Optional[Callable[[], None]] :type traffic_directions: int - :type latency: bool + :type transaction_duration: float + :type transaction_scale: int + :type transaction_type: str + :type use_latency: bool :returns: Structure containing narrowed down NDR and PDR intervals and their measurements. :rtype: NdrPdrResult :raises RuntimeError: If total duration is larger than timeout. """ - minimum_transmit_rate *= traffic_directions - maximum_transmit_rate *= traffic_directions # we need instance of TrafficGenerator instantiated by Robot Framework # to be able to use trex_stl-*() tg_instance = BuiltIn().get_library_instance( u"resources.libraries.python.TrafficGenerator" ) + # Overrides for fixed transaction amount. + # TODO: Move to robot code? We have two call sites, so this saves space, + # even though this is surprising for log readers. + if transaction_scale: + initial_trial_duration = 1.0 + final_trial_duration = 2.0 + number_of_intermediate_phases = 0 + timeout = 3600.0 tg_instance.set_rate_provider_defaults( - frame_size, - traffic_profile, + frame_size=frame_size, + traffic_profile=traffic_profile, + sleep_till_duration=False, + ppta=ppta, + resetter=resetter, traffic_directions=traffic_directions, - latency=latency + transaction_duration=transaction_duration, + transaction_scale=transaction_scale, + transaction_type=transaction_type, + use_latency=use_latency, ) algorithm = MultipleLossRatioSearch( - measurer=tg_instance, final_trial_duration=final_trial_duration, + measurer=tg_instance, + final_trial_duration=final_trial_duration, final_relative_width=final_relative_width, number_of_intermediate_phases=number_of_intermediate_phases, - initial_trial_duration=initial_trial_duration, timeout=timeout, - doublings=doublings + initial_trial_duration=initial_trial_duration, + timeout=timeout, + doublings=doublings, ) result = algorithm.narrow_down_ndr_and_pdr( - minimum_transmit_rate, maximum_transmit_rate, packet_loss_ratio + min_rate=minimum_transmit_rate, + max_rate=maximum_transmit_rate, + packet_loss_ratio=packet_loss_ratio, ) return result @staticmethod def perform_soak_search( - frame_size, traffic_profile, minimum_transmit_rate, - maximum_transmit_rate, plr_target=1e-7, tdpt=0.1, - initial_count=50, timeout=1800.0, trace_enabled=False, - traffic_directions=2, latency=False): + frame_size, + traffic_profile, + minimum_transmit_rate, + maximum_transmit_rate, + plr_target=1e-7, + tdpt=0.1, + initial_count=50, + timeout=7200.0, + ppta=1, + resetter=None, + trace_enabled=False, + traffic_directions=2, + transaction_duration=0.0, + transaction_scale=0, + transaction_type=u"packet", + use_latency=False, + ): """Setup initialized TG, perform soak search, return avg and stdev. :param frame_size: Frame size identifier or value [B]. :param traffic_profile: Module name as a traffic profile identifier. See GPL/traffic_profiles/trex for implemented modules. - :param minimum_transmit_rate: Minimal uni-directional - target transmit rate [pps]. - :param maximum_transmit_rate: Maximal uni-directional - target transmit rate [pps]. + :param minimum_transmit_rate: Minimal load in transactions per second. + :param maximum_transmit_rate: Maximal load in transactions per second. :param plr_target: Fraction of packets lost to achieve [1]. :param tdpt: Trial duration per trial. The algorithm linearly increases trial duration with trial number, @@ -1150,10 +1409,24 @@ class OptimizedSearch: This is needed because initial "search" phase of integrator takes significant time even without any trial results. :param timeout: The search will stop after this overall time [s]. + :param ppta: Packets per transaction, aggregated over directions. + Needed for udp_pps which does not have a good transaction counter, + so we need to compute expected number of packets. + Default: 1. + :param resetter: Callable to reset DUT state for repeated trials. :param trace_enabled: True if trace enabled else False. + This is very verbose tracing on numeric computations, + do not use in production. + Default: False :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. Default: 2 - :param latency: Whether to measure latency during the trial. + :param transaction_duration: Total expected time to close transaction. + :param transaction_scale: Number of transactions to perform. + 0 (default) means unlimited. + :param transaction_type: An identifier specifying which counters + and formulas to use when computing attempted and failed + transactions. Default: "packet". + :param use_latency: Whether to measure latency during the trial. Default: False. :type frame_size: str or int :type traffic_profile: str @@ -1162,29 +1435,48 @@ class OptimizedSearch: :type plr_target: float :type initial_count: int :type timeout: float + :type ppta: int + :type resetter: Optional[Callable[[], None]] :type trace_enabled: bool :type traffic_directions: int - :type latency: bool + :type transaction_duration: float + :type transaction_scale: int + :type transaction_type: str + :type use_latency: bool :returns: Average and stdev of estimated aggregate rate giving PLR. :rtype: 2-tuple of float """ - minimum_transmit_rate *= traffic_directions - maximum_transmit_rate *= traffic_directions tg_instance = BuiltIn().get_library_instance( u"resources.libraries.python.TrafficGenerator" ) + # Overrides for fixed transaction amount. + # TODO: Move to robot code? We have a single call site + # but MLRsearch has two and we want the two to be used similarly. + if transaction_scale: + timeout = 7200.0 tg_instance.set_rate_provider_defaults( - frame_size, - traffic_profile, - traffic_directions=traffic_directions, + frame_size=frame_size, + traffic_profile=traffic_profile, negative_loss=False, - latency=latency + sleep_till_duration=True, + ppta=ppta, + resetter=resetter, + traffic_directions=traffic_directions, + transaction_duration=transaction_duration, + transaction_scale=transaction_scale, + transaction_type=transaction_type, + use_latency=use_latency, ) algorithm = PLRsearch( - measurer=tg_instance, trial_duration_per_trial=tdpt, + measurer=tg_instance, + trial_duration_per_trial=tdpt, packet_loss_ratio_target=plr_target, - trial_number_offset=initial_count, timeout=timeout, - trace_enabled=trace_enabled + trial_number_offset=initial_count, + timeout=timeout, + trace_enabled=trace_enabled, + ) + result = algorithm.search( + min_rate=minimum_transmit_rate, + max_rate=maximum_transmit_rate, ) - result = algorithm.search(minimum_transmit_rate, maximum_transmit_rate) return result diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py index e6474e566d..76501d6ad0 100644 --- a/resources/libraries/python/autogen/Regenerator.py +++ b/resources/libraries/python/autogen/Regenerator.py @@ -160,6 +160,9 @@ def add_default_testcases(testcase, iface, suite_id, file_out, tc_kwargs_list): emit = False if kwargs[u"frame_size"] not in MIN_FRAME_SIZE_VALUES: emit = False + if u"-cps-" in suite_id or u"-pps-" in suite_id: + if kwargs[u"frame_size"] not in MIN_FRAME_SIZE_VALUES: + emit = False if emit: file_out.write(testcase.generate(**kwargs)) diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot index e80e1e1c85..0ebb58c2a0 100644 --- a/resources/libraries/robot/ip/nat.robot +++ b/resources/libraries/robot/ip/nat.robot @@ -40,10 +40,20 @@ | Initialize NAT44 endpoint-dependent mode in circular topology | | [Documentation] | Initialization of NAT44 endpoint-dependent mode on DUT1 | | +| | ... | This keyword also sets a test variable \${resetter} +| | ... | to hold a callable which resets VPP state. +| | ... | Keywords performing search will call it to get consistent trials. +| | ... | Tests which do not wish to reset NAT state should use ramp-up, +| | ... | so the resetter is not set if \${ramp_up_duration} variable +| | ... | is (defined and) nonzero. +| | | | Configure inside and outside interfaces | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0] -| | Set NAT44 Address Range +| | ${resetter} = | Set NAT44 Address Range | | ... | ${dut1} | ${out_net} | ${out_net_end} +| | ${ramp_up_duration} = | Get Ramp Up Duration +| | Return From Keyword If | ${ramp_up_duration} +| | Set Test Variable | \${resetter} # TODO: Remove when 'ip4.Initialize IPv4 forwarding in circular topology' KW # adapted to use IP values from variables @@ -181,6 +191,13 @@ | Configure deterministic mode for NAT44 | | [Documentation] | Set deterministic behaviour of NAT44 (DET44). | | +| | ... | This keyword also sets a test variable \${resetter} +| | ... | to hold a callable which resets VPP state. +| | ... | Keywords performing search will call it to get consistent trials. +| | ... | Tests which do not wish to reset NAT state should use ramp-up, +| | ... | so the resetter is not set if \${ramp_up_duration} variable +| | ... | is (defined and) nonzero. +| | | | ... | *Arguments:* | | ... | - node - DUT node to set deterministic mode for NAT44 on. | | ... | Type: dictionary @@ -196,8 +213,11 @@ | | | | [Arguments] | ${node} | ${ip_in} | ${subnet_in} | ${ip_out} | ${subnet_out} | | -| | Set DET44 Mapping +| | ${resetter} = | Set DET44 Mapping | | ... | ${node} | ${ip_in} | ${subnet_in} | ${ip_out} | ${subnet_out} +| | ${ramp_up_duration} = | Get Ramp Up Duration +| | Return From Keyword If | ${ramp_up_duration} +| | Set Test Variable | \${resetter} | Initialize NAT44 deterministic mode in circular topology | | [Documentation] | Initialization of NAT44 deterministic mode (DET44) diff --git a/resources/libraries/robot/performance/performance_actions.robot b/resources/libraries/robot/performance/performance_actions.robot new file mode 100644 index 0000000000..2cf954a5b3 --- /dev/null +++ b/resources/libraries/robot/performance/performance_actions.robot @@ -0,0 +1,92 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Variables | resources/libraries/python/Constants.py +| Resource | resources/libraries/robot/performance/performance_utils.robot +| +| Documentation +| ... | Performance suite keywords - Actions related to performance tests. + +*** Keywords *** +| Additional Statistics Action For bash-perf-stat +| | [Documentation] +| | ... | Additional Statistics Action for bash command "perf stat". +| | +| | Run Keyword If | ${extended_debug}==${True} +| | ... | Perf Stat On All DUTs | ${nodes} | cpu_list=${cpu_alloc_str} + +| Additional Statistics Action For clear-show-runtime-with-traffic +| | [Documentation] +| | ... | Additional Statistics Action for clear and show runtime counters with +| | ... | running traffic. +| | +| | ... | See documentation of the called keyword for required test variables. +| | +| | Clear and show runtime counters with running traffic + +| Additional Statistics Action For noop +| | [Documentation] +| | ... | Additional Statistics Action for no operation. +| | +| | No operation + +| Additional Statistics Action For vpp-clear-runtime +| | [Documentation] +| | ... | Additional Statistics Action for clear VPP runtime. +| | +| | VPP Clear Runtime On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-clear-stats +| | [Documentation] +| | ... | Additional Statistics Action for clear VPP statistics. +| | +| | Clear Statistics On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-enable-elog +| | [Documentation] +| | ... | Additional Statistics Action for enable VPP elog trace. +| | +| | VPP Enable Elog Traces On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-enable-packettrace +| | [Documentation] +| | ... | Additional Statistics Action for enable VPP packet trace. +| | +| | Run Keyword If | ${extended_debug}==${True} +| | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False} + +| Additional Statistics Action For vpp-show-elog +| | [Documentation] +| | ... | Additional Statistics Action for show VPP elog trace. +| | +| | Show Event Logger On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-show-packettrace +| | [Documentation] +| | ... | Additional Statistics Action for show VPP packet trace. +| | +| | Run Keyword If | ${extended_debug}==${True} +| | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100} + +| Additional Statistics Action For vpp-show-runtime +| | [Documentation] +| | ... | Additional Statistics Action for show VPP runtime. +| | +| | VPP Show Runtime On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-show-stats +| | [Documentation] +| | ... | Additional Statistics Action for show VPP statistics. +| | +| | Show Statistics On All DUTs | ${nodes} diff --git a/resources/libraries/robot/performance/performance_display.robot b/resources/libraries/robot/performance/performance_display.robot new file mode 100644 index 0000000000..e8dfdbbfbd --- /dev/null +++ b/resources/libraries/robot/performance/performance_display.robot @@ -0,0 +1,240 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Documentation +| ... | Performance suite keywords - Displaying results as test messages. +| ... | This includes checks to fail test. + +*** Keywords *** +| Check NDRPDR interval validity +| | [Documentation] +| | ... | Extract loss ratio of lower bound of the interval. +| | ... | Fail if it does not reach the allowed value. +| | +| | ... | *Arguments:* +| | ... | - interval - Measured interval. Type: ReceiveRateInterval +| | ... | - packet_loss_ratio - Accepted loss (0.0 for NDR). Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Check NDRPDR interval validity \| \${result.pdr_interval} \ +| | ... | \| \${0.005} \| +| | +| | [Arguments] | ${interval} | ${packet_loss_ratio}=${0.0} +| | +| | ${lower_bound} = | Set Variable | ${interval.measured_low} +| | ${lower_bound_lf} = | Set Variable | ${lower_bound.loss_fraction} +| | Return From Keyword If | ${lower_bound_lf} <= ${packet_loss_ratio} +| | Set Test Variable | \${rate_for_teardown} | ${lower_bound_lf} +| | ${message}= | Catenate | SEPARATOR=${SPACE} +| | ... | Minimal rate loss fraction ${lower_bound_lf} +| | ... | does not reach target ${packet_loss_ratio}. +| | ${message_zero} = | Set Variable | Zero packets forwarded! +| | ${message_other} = | Set Variable | ${lower_bound.loss_count} packets lost. +| | ${message} = | Set Variable If | ${lower_bound_lf} >= 1.0 +| | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other} +| | Fail | ${message} + +| Display Reconfig Test Message +| | [Documentation] +| | ... | Display the number of packets lost (bidirectionally) +| | ... | due to reconfiguration under traffic. +| | +| | ... | *Arguments:* +| | ... | - result - Result of bidirectional measurtement. +| | ... | Type: ReceiveRateMeasurement +| | +| | ... | *Example:* +| | +| | ... | \| Display Reconfig Test Message \| \${result} \| +| | +| | [Arguments] | ${result} +| | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${packet_rate} = | Evaluate | ${result.target_tr} * ${ppta} +| | ${packet_loss} = | Set Variable | ${result.loss_count} +| | ${time_loss} = | Evaluate | ${packet_loss} / ${packet_rate} +| | Set Test Message | Packets lost due to reconfig: ${packet_loss} +| | Set Test Message | ${\n}Implied time lost: ${time_loss} | append=yes + +| Display result of NDRPDR search +| | [Documentation] +| | ... | Display result of NDR+PDR search, both quantities, both bounds, +| | ... | aggregate in units given by trasaction type, e.g. by default +| | ... | in packet per seconds and Gbps total bandwidth +| | ... | (for initial packet size). +| | ... | +| | ... | The bound to display is encoded as target rate, it is assumed +| | ... | it is in transactions per second. Bidirectional traffic +| | ... | transaction is understood as having 2 packets, for this purpose. +| | ... | +| | ... | Througput is calculated as: +| | ... | Sum of measured rate over streams +| | ... | Bandwidth is calculated as: +| | ... | (Throughput * (L2 Frame Size + IPG) * 8) +| | ... | If the results contain latency data, display them for lower bounds. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - frame_size_num - L2 Frame Size [B]. Type: integer or float +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". +| | ... | *Arguments:* +| | ... | - result - Measured result data. Aggregate rate, tps or pps. +| | ... | Type: NdrPdrResult +| | +| | ... | *Example:* +| | +| | ... | \| Display result of NDRPDR search \| \${result} \| +| | +| | [Arguments] | ${result} +| | +| | Display single bound | NDR_LOWER +| | ... | ${result.ndr_interval.measured_low.target_tr} +| | ... | ${result.ndr_interval.measured_low.latency} +| | Display single bound | NDR_UPPER +| | ... | ${result.ndr_interval.measured_high.target_tr} +| | Display single bound | PDR_LOWER +| | ... | ${result.pdr_interval.measured_low.target_tr} +| | ... | ${result.pdr_interval.measured_low.latency} +| | Display single bound | PDR_UPPER +| | ... | ${result.pdr_interval.measured_high.target_tr} + +| Display result of soak search +| | [Documentation] +| | ... | Display result of soak search, avg+-stdev, as upper/lower bounds. +| | ... | See Display single bound for units used. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". +| | ... | *Arguments:* +| | ... | - avg - Estimated average critical load [pps]. Type: float +| | ... | - stdev - Standard deviation of critical load [pps]. Type: float +| | +| | ... | *Returns:* +| | ... | - Lower and upper bound of critical load [pps]. Type: 2-tuple of float +| | +| | ... | *Example:* +| | +| | ... | \| Display result of soak search \| \${100000} \| \${100} \| +| | +| | [Arguments] | ${avg} | ${stdev} +| | +| | ${avg} = | Convert To Number | ${avg} +| | ${stdev} = | Convert To Number | ${stdev} +| | ${lower} = | Evaluate | ${avg} - ${stdev} +| | ${upper} = | Evaluate | ${avg} + ${stdev} +| | Display single bound | PLRsearch lower bound | ${lower} +| | Display single bound | PLRsearch upper bound | ${upper} +| | Return From Keyword | ${lower} | ${upper} + +| Display single bound +| | [Documentation] +| | ... | Compute and display one bound of NDR+PDR (or soak) search result. +| | ... | If the latency string is present, it is displayed as well. +| | ... | +| | ... | The bound to display is given as target transfer rate, it is assumed +| | ... | it is in transactions per second. Bidirectional traffic +| | ... | transaction is understood as having 2 packets, for this purpose. +| | ... | +| | ... | Pps values are aggregate in packet per seconds, +| | ... | and Gbps total bandwidth (for initial packet size). +| | ... | +| | ... | Througput is calculated as: +| | ... | Sum of measured rate over streams +| | ... | Bandwidth is calculated as: +| | ... | (Throughput * (L2 Frame Size + IPG) * 8) +| | ... | If the results contain latency data, display them for lower bounds. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". +| | ... | *Arguments:* +| | ... | - text - Flavor text describing which bound is this. Type: string +| | ... | - tps - Transaction rate [tps]. Type: float +| | ... | - latency - Latency data to display if non-empty. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \ +| | ... | \| latency=\${EMPTY} \| +| | +| | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY} +| | +| | ${transaction_type} = | Get Transaction Type +| | Run Keyword And Return If | """_cps""" in """${transaction_type}""" +| | ... | Display single cps bound | ${text} | ${tps} | ${latency} +| | Display single pps bound | ${text} | ${tps} | ${latency} + +| Display single cps bound +| | [Documentation] +| | ... | Display one bound of NDR+PDR search for CPS tests. +| | ... | The bounds are expressed as transactions per second. +| | ... | If the latency string is present, it is displayed as well. +| | +| | ... | *Arguments:* +| | ... | - text - Flavor text describing which bound is this. Type: string +| | ... | - tps - Transaction rate [tps]. Type: float +| | ... | - latency - Latency data to display if non-empty. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Display single cps bound \| NDR lower bound \| \${12345.67} \ +| | ... | \| latency=\${EMPTY} \| +| | +| | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY} +| | +| | Set Test Message | ${\n}${text}: ${tps} CPS | append=yes +| | Return From Keyword If | not """${latency}""" +| | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} +| | ... | append=yes + +| Display single pps bound +| | [Documentation] +| | ... | Display one pps bound of NDR+PDR search, +| | ... | aggregate in packet per seconds and Gbps total bandwidth +| | ... | (for initial packet size). +| | ... | +| | ... | The bound to display is given as target transfer rate, it is assumed +| | ... | it is in transactions per second. Bidirectional traffic +| | ... | transaction is understood as having 2 packets, for this purpose. +| | ... | +| | ... | Througput is calculated as: +| | ... | Sum of measured rates over streams +| | ... | Bandwidth is calculated as: +| | ... | (Throughput * (L2 Frame Size + IPG) * 8) +| | ... | If the latency string is present, it is displayed as well. +| | +| | ... | *Arguments:* +| | ... | - text - Flavor text describing which bound is this. Type: string +| | ... | - tps - Transaction rate [tps]. Type: float +| | ... | - latency - Latency data to display if non-empty. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Display single pps bound \| NDR lower bound \| \${12345.67} \ +| | ... | \| latency=\${EMPTY} \| +| | +| | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY} +| | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${pps} = | Evaluate | ${tps} * ${ppta} +| | ${bandwidth} = | Evaluate | ${pps} * (${avg_frame_size}+20)*8 / 1e9 +| | Set Test Message | ${\n}${text}: ${pps} pps, | append=yes +| | Set Test Message | ${bandwidth} Gbps (initial) | append=yes +| | Return From Keyword If | not """${latency}""" +| | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} +| | ... | append=yes diff --git a/resources/libraries/robot/performance/performance_limits.robot b/resources/libraries/robot/performance/performance_limits.robot deleted file mode 100644 index 332ed9368b..0000000000 --- a/resources/libraries/robot/performance/performance_limits.robot +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Documentation | Performance suite keywords - Handling NIC and TG limits. -| Library | Collections -| Variables | ${CURDIR}/../../python/Constants.py - -*** Keywords *** -| Get Average Frame Size -| | [Documentation] -| | ... | Framesize can be either integer in case of a single packet -| | ... | in stream, or set of packets in case of IMIX type or simmilar. -| | -| | ... | *Arguments:* -| | ... | - frame_size - Framesize. Type: integer or string -| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer -| | -| | ... | *Returns:* -| | ... | Average frame size including overhead. Type: float -| | -| | ... | *Example:* -| | -| | ... | \| Get Average Frame Size \| IMIX_v4_1 \| -| | -| | [Arguments] | ${frame_size} | ${overhead}=${0} -| | -| | ${frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' -| | ... | Set Variable | ${353.83333} -| | ... | ELSE -| | ... | Convert To Number | ${frame_size} -| | ${avg_frame_size} = | Evaluate | ${frame_size} + ${overhead} -| | Return From Keyword | ${avg_frame_size} - -| Get Maximum Frame Size -| | [Documentation] -| | ... | Framesize can be either integer in case of a single packet -| | ... | in stream, or set of packets in case of IMIX type or simmilar. -| | -| | ... | *Arguments:* -| | ... | - frame_size - Framesize. Type: integer or string -| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer -| | -| | ... | *Returns:* -| | ... | Maximum frame size including overhead. Type: float -| | -| | ... | *Example:* -| | -| | ... | \| Get Maximum Frame Size \| IMIX_v4_1 \| -| | -| | [Arguments] | ${frame_size} | ${overhead}=${0} -| | -| | ${frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' -| | ... | Set Variable | ${1518} -| | ... | ELSE -| | ... | Convert To Number | ${frame_size} -| | ${max_frame_size} = | Evaluate | ${frame_size} + ${overhead} -| | Return From Keyword | ${max_frame_size} - -| Set Max Rate And Jumbo -| | [Documentation] -| | ... | Input framesize can be either integer in case of a single packet -| | ... | in stream, or IMIX string defining mix of packets. -| | ... | For jumbo frames detection, the maximal packet size is relevant. -| | ... | For maximal transmit rate, the average packet size is relevant. -| | ... | In both cases, encapsulation overhead (if any) has effect. -| | ... | The maximal rate is computed from NIC name. -| | ... | The implementation works by mapping from exact -| | ... | whitelisted NIC names. -| | ... | The mapping is hardcoded in nic_limits.yaml -| | ... | TODO: Make the mapping from NIC names case insensistive. -| | -| | ... | TODO: Make pps limit also definable per NIC. -| | -| | ... | This keyword computes maximal unidirectional transmit rate -| | ... | and jumbo boolean (some suites need that for configuration decisions). -| | ... | To streamline suite autogeneration, both input and output values -| | ... | are communicated as test (or broader scope) variables, -| | ... | instead of explicit arguments and return values. -| | -| | ... | *Test (or broader scope) variables read:* -| | ... | - nic_name - Name of bottleneck NIC. Type: string -| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or -| | ... | string -| | -| | ... | *Test variables set:* -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. -| | ... | Type: float -| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be -| | ... | enabled. Type: boolean -| | -| | ... | *Example:* -| | -| | ... | \| Set Test Variable \| \${frame_size} \| IMIX_v4_1 \| -| | ... | \| Set Max Rate And Jumbo \| -| | -| | # Negative overhead is possible, if DUT-DUT traffic is less encapsulated -| | # than TG-DUT traffic. -| | # TODO: Re-check overhead values in suites with both traffics encapsulated. -| | # TODO: Improve layered setup to detect encap/decap and update overhead. -| | ${overhead} = | Set Variable If | ${overhead} >= 0 | ${overhead} | ${0} -| | ${pps_limit} = | Get From Dictionary -| | ... | ${NIC_NAME_TO_PPS_LIMIT} | ${nic_name} -| | ${bps_limit} = | Get From Dictionary -| | ... | ${NIC_NAME_TO_BPS_LIMIT} | ${nic_name} -| | # swo := size_with_overhead -| | ${avg_swo} = | Get Average Frame Size | ${frame_size} | ${overhead} -| | ${rate} = | Evaluate | ${bps_limit} / ((${avg_swo} + 20.0) * 8) -| | ${max_rate} = | Set Variable If | ${rate} > ${pps_limit} -| | ... | ${pps_limit} | ${rate} -| | Set Test Variable | \${max_rate} -| | Set Jumbo - -| Set Jumbo -| | [Documentation] -| | ... | For jumbo frames detection, the maximal packet size is relevant, -| | ... | encapsulation overhead (if any) has effect. -| | -| | ... | This keyword computes jumbo boolean (some suites need that for -| | ... | configuration decisions). -| | ... | To streamline suite autogeneration, both input and output values -| | ... | are communicated as test (or broader scope) variables, -| | ... | instead of explicit arguments and return values. -| | -| | ... | *Test (or broader scope) variables read:* -| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or -| | ... | string -| | -| | ... | *Test variables set:* -| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be -| | ... | enabled. Type: boolean -| | -| | ... | *Example:* -| | -| | ... | \| Set Jumnbo \| -| | -| | ${overhead} = | Set Variable If | ${overhead} >= 0 | ${overhead} | ${0} -| | ${max_swo} = | Get Maximum Frame Size | ${frame_size} | ${overhead} -| | ${jumbo} = | Set Variable If | ${max_swo} < 1522 -| | ... | ${False} | ${True} -| | Set Test Variable | \${jumbo} diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index b9c4dc08d1..ffafd40854 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -22,16 +22,116 @@ | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl | Library | resources.libraries.python.Trace | Variables | resources/libraries/python/Constants.py +| Resource | resources/libraries/robot/performance/performance_actions.robot +| Resource | resources/libraries/robot/performance/performance_display.robot +| Resource | resources/libraries/robot/performance/performance_vars.robot | | Documentation | ... | Performance suite keywords - utilities to find and verify NDR and PDR. +| ... | See performance_vars.robot for values accessed via there. -*** Variables *** -| ${trial_duration}= | ${PERF_TRIAL_DURATION} -| ${trial_multiplicity}= | ${PERF_TRIAL_MULTIPLICITY} -| ${extended_debug}= | ${EXTENDED_DEBUG} +# Library/suite scope variables are maybe defined in performance_vars.robot. *** Keywords *** +| Clear and show runtime counters with running traffic +| | [Documentation] +| | ... | Start traffic at specified rate then clear runtime counters on all +| | ... | DUTs. Wait for specified amount of time and capture runtime counters +| | ... | on all DUTs. Finally stop traffic. +| | +| | ... | TODO: Support resetter if this is not the first trial-ish action? +| | +| | ... | *Example:* +| | +| | ... | \| Clear and show runtime counters with running traffic \| +| | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${runtime_duration} = | Get Runtime Duration +| | ${runtime_rate} = | Get Runtime Rate +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | # Duration of -1 means we will stop traffic manually. +| | Send traffic on tg +| | ... | duration=${-1} +| | ... | rate=${runtime_rate} +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | async_call=${True} +| | ... | ppta=${ppta} +| | ... | use_latency=${use_latency} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | duration_limit=${0.0} +| | FOR | ${action} | IN | @{pre_run_stats} +| | | Run Keyword | Additional Statistics Action For ${action} +| | END +| | Sleep | ${runtime_duration} +| | FOR | ${action} | IN | @{post_run_stats} +| | | Run Keyword | Additional Statistics Action For ${action} +| | END +| | Stop traffic on tg + +| Find critical load using PLRsearch +| | [Documentation] +| | ... | Find boundaries for troughput (of hardcoded target loss ratio) +| | ... | using PLRsearch algorithm. +| | ... | Display results as formatted test message. +| | ... | Fail if computed lower bound is 110% of the minimal rate or less. +| | ... | Input rates are understood as uni-directional, +| | ... | reported result contains aggregate rates. +| | ... | Currently, the min_rate value is hardcoded to match test teardowns. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Find critical load using PLR search \| +| | +| | # Get values via performance_vars. +| | ${max_rate} = | Get Max Rate +| | ${min_rate} = | Get Min Rate +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${resetter} = | Get Resetter +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | ${average} | ${stdev} = | Perform soak search +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | minimum_transmit_rate=${min_rate} +| | ... | maximum_transmit_rate=${max_rate} +| | ... | plr_target=${1e-7} +| | ... | tdpt=${0.1} +| | ... | initial_count=${50} +| | ... | ppta=${ppta} +| | ... | resetter=${resetter} +| | ... | timeout=${1800.0} +| | ... | trace_enabled=${False} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=${use_latency} +| | ${lower} | ${upper} = | Display result of soak search +| | ... | ${average} | ${stdev} +| | Set Test Variable | \${rate for teardown} | ${lower} +| | Should Not Be True | 1.1 * ${min_rate} > ${lower} +| | ... | Lower bound ${lower} too small for unidirectional minimum ${min_rate}. + | Find NDR and PDR intervals using optimized search | | [Documentation] | | ... | Find boundaries for RFC2544 compatible NDR and PDR values @@ -41,386 +141,243 @@ | | ... | Input rates are understood as uni-directional, | | ... | reported result contains aggregate rates. | | ... | Additional latency measurements are performed for smaller loads, -| | ... | their results are also displayed. +| | ... | even if latency stream is disabled in search. Their results +| | ... | are also displayed. | | ... | Finally, two measurements for runtime stats are done (not displayed). | | ... | Currently, the min_rate value is hardcoded to 90kpps, | | ... | allowing measurement at 10% of the discovered rate | | ... | without breaking latency streams. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. | | | | ... | *Test (or broader scope) variables read:* | | ... | - traffic_profile - Name of module defining traffc for measurements. | | ... | Type: string | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or | | ... | string -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | - max_rate - Calculated maximal transmit rate [tps]. | | ... | Type: float -| | -| | ... | *Arguments:* -| | ... | - packet_loss_ratio - Accepted loss during search. Type: float -| | ... | - final_relative_width - Maximal width multiple of upper. Type: float -| | ... | - final_trial_duration - Duration of final trials [s]. Type: float -| | ... | - initial_trial_duration - Duration of initial trials [s]. Type: float -| | ... | - intermediate phases - Number of intermediate phases [1]. -| | ... | Type: integer -| | ... | - timeout - Fail if search duration is longer [s]. Type: float -| | ... | - doublings - How many doublings to do when expanding [1]. -| | ... | Type: integer -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: integer -| | ... | - latency_duration - Duration for latency-specific trials. Type: float -| | ... | - latency - False to disable latency measurement; default value: True. -| | ... | Type: boolean +| | ... | - resetter - Callable to reset DUT state before each trial. +| | ... | - transaction_scale - Number of ASTF transaction (zero if unlimited). +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". +| | ... | - disable_latency - If true, skip anything related to latency. +| | ... | Useful if transaction_scale is high and TPS is low. Default: false. | | | | ... | *Example:* | | -| | ... | \| Find NDR and PDR intervals using optimized search \| \${0.005} \ -| | ... | \| \${0.005} \| \${30.0} \| \${1.0} \| \${2} \| \${600.0} \| \${2} \ -| | ... | \| \${2} \| ${5.0} \| -| | -| | [Arguments] | ${packet_loss_ratio}=${0.005} -| | ... | ${final_relative_width}=${0.005} | ${final_trial_duration}=${30.0} -| | ... | ${initial_trial_duration}=${1.0} -| | ... | ${number_of_intermediate_phases}=${2} | ${timeout}=${720.0} -| | ... | ${doublings}=${2} | ${traffic_directions}=${2} -| | ... | ${latency_duration}=${PERF_TRIAL_LATENCY_DURATION} -| | ... | ${latency}=${True} -| | -| | # Latency measurements will need more than 9000 pps. -| | ${result} = | Perform optimized ndrpdr search | ${frame_size} -| | ... | ${traffic_profile} | ${9001} | ${max_rate} -| | ... | ${packet_loss_ratio} | ${final_relative_width} -| | ... | ${final_trial_duration} | ${initial_trial_duration} -| | ... | ${number_of_intermediate_phases} | timeout=${timeout} -| | ... | doublings=${doublings} | traffic_directions=${traffic_directions} -| | ... | latency=${latency} +| | ... | \| Find NDR and PDR intervals using optimized search \| +| | +| | # Get values via performance_vars. +| | ${disable_latency} = | Get Disable Latency +| | ${max_rate} = | Get Max Rate +| | ${min_rate} = | Get Min Rate +| | # \${packet_loss_ratio} is used twice so it is worth a variable. +| | ${packet_loss_ratio} = | Get Packet Loss Ratio +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${resetter} = | Get Resetter +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | ${result} = | Perform optimized ndrpdr search +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | minimum_transmit_rate=${min_rate} +| | ... | maximum_transmit_rate=${max_rate} +| | ... | packet_loss_ratio=${packet_loss_ratio} +| | ... | final_relative_width=${0.005} +| | ... | final_trial_duration=${30.0} +| | ... | initial_trial_duration=${1.0} +| | ... | number_of_intermediate_phases=${2} +| | ... | timeout=${720.0} +| | ... | doublings=${2} +| | ... | ppta=${ppta} +| | ... | resetter=${resetter} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=${use_latency} | | Display result of NDRPDR search | ${result} | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} | | Check NDRPDR interval validity | ${result.ndr_interval} -| | ${pdr_sum}= | Set Variable | ${result.pdr_interval.measured_low.target_tr} -| | ${pdr_per_stream}= | Evaluate | ${pdr_sum} / float(${traffic_directions}) -| | ${ndr_sum}= | Set Variable | ${result.ndr_interval.measured_low.target_tr} -| | ${ndr_per_stream}= | Evaluate | ${ndr_sum} / float(${traffic_directions}) -| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream} -| | Run Keyword If | ${latency} -| | ... | Measure and show latency at specified rate | Latency at 90% PDR: -| | ... | ${latency_duration} | ${rate} | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream} -| | Run Keyword If | ${latency} -| | ... | Measure and show latency at specified rate | Latency at 50% PDR: -| | ... | ${latency_duration} | ${rate} | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.1 * ${pdr_per_stream} -| | Run Keyword If | ${latency} -| | ... | Measure and show latency at specified rate | Latency at 10% PDR: -| | ... | ${latency_duration} | ${rate} | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | Run Keyword If | ${latency} -| | ... | Measure and show latency at specified rate | Latency at 0% PDR: -| | ... | ${latency_duration} | ${0} | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | # Finally, trials with runtime and other stats. +| | ${pdr} = | Set Variable | ${result.pdr_interval.measured_low.target_tr} +| | ${ndr} = | Set Variable | ${result.ndr_interval.measured_low.target_tr} | | # We expect NDR and PDR to have different-looking stats. | | Send traffic at specified rate -| | ... | ${1.0} | ${pdr_per_stream} | ${framesize} | ${traffic_profile} -| | ... | traffic_directions=${traffic_directions} -| | Send traffic at specified rate -| | ... | ${1.0} | ${ndr_per_stream} | ${framesize} | ${traffic_profile} -| | ... | traffic_directions=${traffic_directions} +| | ... | rate=${pdr} +| | ... | trial_duration=${1.0} +| | ... | trial_multiplicity=${1} +| | ... | use_latency=${use_latency} +| | ... | duration_limit=${1.0} +| | Run Keyword If | ${ndr} != ${pdr} +| | ... | Send traffic at specified rate +| | ... | rate=${ndr} +| | ... | trial_duration=${1.0} +| | ... | trial_multiplicity=${1} +| | ... | use_latency=${use_latency} +| | ... | duration_limit=${1.0} +| | Return From Keyword If | ${disable_latency} +| | ${rate} = | Evaluate | 0.9 * ${pdr} +| | Measure and show latency at specified rate | Latency at 90% PDR: | ${rate} +| | ${rate} = | Evaluate | 0.5 * ${pdr} +| | Measure and show latency at specified rate | Latency at 50% PDR: | ${rate} +| | ${rate} = | Evaluate | 0.1 * ${pdr} +| | Measure and show latency at specified rate | Latency at 10% PDR: | ${rate} +| | Measure and show latency at specified rate | Latency at 0% PDR: | ${0.0} | Find Throughput Using MLRsearch | | [Documentation] -| | ... | Find and return lower bound PDR (zero PLR by default) +| | ... | Find and return lower bound NDR (zero PLR) | | ... | aggregate throughput using MLRsearch algorithm. | | ... | Input rates are understood as uni-directional. | | ... | Currently, the min_rate value is hardcoded to match test teardowns. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. | | | | ... | *Test (or broader scope) variables read:* | | ... | - traffic_profile - Name of module defining traffc for measurements. | | ... | Type: string | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or | | ... | string -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | - max_rate - Calculated maximal transmit rate [tps]. | | ... | Type: float -| | -| | ... | *Arguments:* -| | ... | - packet_loss_ratio - Accepted loss during search. Type: float -| | ... | - final_relative_width - Maximal width multiple of upper. Type: float -| | ... | - final_trial_duration - Duration of final trials [s]. Type: float -| | ... | - initial_trial_duration - Duration of initial trials [s]. Type: float -| | ... | - intermediate phases - Number of intermediate phases [1]. -| | ... | Type: integer -| | ... | - timeout - Fail if search duration is longer [s]. Type: float -| | ... | - doublings - How many doublings to do when expanding [1]. -| | ... | Type: integer -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: integer -| | ... | - latency - True to enable latency measurement; default value: False. -| | ... | Type: boolean +| | ... | - resetter - Callable to reset DUT state before each trial. +| | ... | - transaction_scale - Number of ASTF transaction (zero if unlimited). +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". | | | | ... | *Returns:* | | ... | - Lower bound for bi-directional throughput at given PLR. Type: float | | | | ... | *Example:* | | -| | ... | \| \${throughpt}= \| Find Throughput Using MLRsearch \| \${0} \ -| | ... | \| \${0.001} \| \${10.0}\| \${1.0} \| \${1} \| \${720.0} \| \${2} \ -| | ... | \| \${2} \| -| | -| | [Arguments] | ${packet_loss_ratio}=${0.0} -| | ... | ${final_relative_width}=${0.001} | ${final_trial_duration}=${10.0} -| | ... | ${initial_trial_duration}=${1.0} -| | ... | ${number_of_intermediate_phases}=${1} | ${timeout}=${720.0} -| | ... | ${doublings}=${2} | ${traffic_directions}=${2} | ${latency}=${False} -| | -| | ${result} = | Perform optimized ndrpdr search | ${frame_size} -| | ... | ${traffic_profile} | ${10000} | ${max_rate} -| | ... | ${packet_loss_ratio} | ${final_relative_width} -| | ... | ${final_trial_duration} | ${initial_trial_duration} -| | ... | ${number_of_intermediate_phases} | timeout=${timeout} -| | ... | doublings=${doublings} | traffic_directions=${traffic_directions} -| | ... | latency=${latency} +| | ... | \| \${throughpt}= \| Find Throughput Using MLRsearch \| +| | +| | ${max_rate} = | Get Max Rate +| | ${min_rate} = | Get Min Rate +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${resetter} = | Get Resetter +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | ${result} = | Perform optimized ndrpdr search +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | minimum_transmit_rate=${min_rate} +| | ... | maximum_transmit_rate=${max_rate} +| | ... | packet_loss_ratio=${0.0} +| | ... | final_relative_width=${0.001} +| | ... | final_trial_duration=${10.0} +| | ... | initial_trial_duration=${1.0} +| | ... | number_of_intermediate_phases=${1} +| | ... | timeout=${720} +| | ... | doublings=${2} +| | ... | ppta=${ppta} +| | ... | resetter=${resetter} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=${use_latency} | | Check NDRPDR interval validity | ${result.pdr_interval} -| | ... | ${packet_loss_ratio} +| | ... | ${0.0} | | Return From Keyword | ${result.pdr_interval.measured_low.target_tr} -| Find critical load using PLRsearch -| | [Documentation] -| | ... | Find boundaries for troughput (of given target loss ratio) -| | ... | using PLRsearch algorithm. -| | ... | Display results as formatted test message. -| | ... | Fail if computed lower bound 110% of the minimal rate or less. -| | ... | Input rates are understood as uni-directional, -| | ... | reported result contains aggregate rates. -| | ... | Currently, the min_rate value is hardcoded to match test teardowns. -| | -| | ... | *Test (or broader scope) variables read:* -| | ... | - traffic_profile - Name of module defining traffc for measurements. -| | ... | Type: string -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or -| | ... | string -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. -| | ... | Type: float -| | -| | ... | *Arguments:* -| | ... | - packet_loss_ratio - Accepted loss during search. Type: float -| | ... | - timeout - Stop when search duration is longer [s]. Type: float -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: integer -| | ... | - latency - True to enable latency measurement; default value: False. -| | ... | Type: boolean -| | -| | ... | *Example:* -| | -| | ... | \| Find critical load using PLR search \| \${1e-7} \| \${120} \ -| | ... | \| \${2} \| -| | -| | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${1800.0} -| | ... | ${traffic_directions}=${2} | ${latency}=${False} -| | -| | ${min_rate} = | Set Variable | ${10000} -| | ${average} | ${stdev} = | Perform soak search | ${frame_size} -| | ... | ${traffic_profile} | ${min_rate} | ${max_rate} -| | ... | ${packet_loss_ratio} | timeout=${timeout} -| | ... | traffic_directions=${traffic_directions} | latency=${latency} -| | ${lower} | ${upper} = | Display result of soak search -| | ... | ${average} | ${stdev} -| | Should Not Be True | 1.1 * ${traffic_directions} * ${min_rate} > ${lower} -| | ... | Lower bound ${lower} too small for unidirectional minimum ${min_rate}. - -| Display single bound -| | [Documentation] -| | ... | Display one bound of NDR+PDR search, -| | ... | in packet per seconds (total and per stream) -| | ... | and Gbps total bandwidth (for initial packet size). -| | ... | Througput is calculated as: -| | ... | Sum of measured rates over streams -| | ... | Bandwidth is calculated as: -| | ... | (Throughput * (L2 Frame Size + IPG) * 8) -| | ... | The given result should contain latency data as well. -| | -| | ... | *Arguments:* -| | ... | - text - Flavor text describing which bound is this. Type: string -| | ... | - rate_total - Total (not per stream) measured Tr [pps]. Type: float -| | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - latency - Latency data to display if non-empty. Type: string -| | -| | ... | *Example:* -| | -| | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \ -| | ... | \| \${64} \| latency=\${EMPTY} \| -| | -| | [Arguments] | ${text} | ${rate_total} | ${frame_size} | ${latency}=${EMPTY} -| | -| | ${bandwidth_total} = | Evaluate | ${rate_total} * (${frame_size}+20)*8 / 1e9 -| | Set Test Message | ${\n}${text}: ${rate_total} pps, | append=yes -| | Set Test Message | ${bandwidth_total} Gbps (initial) | append=yes -| | Return From Keyword If | not """${latency}""" -| | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} -| | ... | append=yes - -| Display Reconfig Test Message -| | [Documentation] -| | ... | Display the number of packets lost (bidirectionally) -| | ... | due to reconfiguration under traffic. -| | -| | ... | *Arguments:* -| | ... | - result - Result of bidirectional measurtement. -| | ... | Type: ReceiveRateMeasurement -| | -| | ... | *Example:* -| | -| | ... | \| Display Reconfig Test Message \| \${result} \| -| | -| | [Arguments] | ${result} -| | -| | Set Test Message | Packets lost due to reconfig: ${result.loss_count} -| | ${time_lost} = | Evaluate | ${result.loss_count} / ${result.target_tr} -| | Set Test Message | ${\n}Implied time lost: ${time_lost} | append=yes - -| Display result of NDRPDR search -| | [Documentation] -| | ... | Display result of NDR+PDR search, both quantities, both bounds, -| | ... | aggregate in packet per seconds -| | ... | and Gbps total bandwidth (for initial packet size). -| | ... | Througput is calculated as: -| | ... | Sum of measured rate over streams -| | ... | Bandwidth is calculated as: -| | ... | (Throughput * (L2 Frame Size + IPG) * 8) -| | ... | The given result should contain latency data as well. -| | -| | ... | *Test (or broader scope) variables read:* -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or -| | ... | string -| | ... | *Arguments:* -| | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult -| | -| | ... | *Example:* -| | -| | ... | \| Display result of NDRPDR search \| \${result} \| -| | -| | [Arguments] | ${result} -| | -| | ${frame_size} = | Get Average Frame Size | ${frame_size} -| | Display single bound | NDR_LOWER -| | ... | ${result.ndr_interval.measured_low.target_tr} | ${frame_size} -| | ... | ${result.ndr_interval.measured_low.latency} -| | Display single bound | NDR_UPPER -| | ... | ${result.ndr_interval.measured_high.target_tr} | ${frame_size} -| | Display single bound | PDR_LOWER -| | ... | ${result.pdr_interval.measured_low.target_tr} | ${frame_size} -| | ... | ${result.pdr_interval.measured_low.latency} -| | Display single bound | PDR_UPPER -| | ... | ${result.pdr_interval.measured_high.target_tr} | ${frame_size} - -| Display result of soak search -| | [Documentation] -| | ... | Display result of soak search, avg+-stdev, as upper/lower bounds, -| | ... | in aggregate packets per seconds -| | ... | and Gbps total bandwidth (for initial packet size). -| | ... | Througput is calculated as: -| | ... | Sum of measured rates over streams -| | ... | Bandwidth is calculated as: -| | ... | (Throughput * (L2 Frame Size + IPG) * 8) -| | -| | ... | *Test (or broader scope) variables read:* -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or -| | ... | string -| | ... | *Arguments:* -| | ... | - avg - Estimated average critical load [pps]. Type: float -| | ... | - stdev - Standard deviation of critical load [pps]. Type: float -| | -| | ... | *Returns:* -| | ... | - Lower and upper bound of critical load [pps]. Type: 2-tuple of float -| | -| | ... | *Example:* -| | -| | ... | \| Display result of soak search \| \${100000} \| \${100} \| -| | -| | [Arguments] | ${avg} | ${stdev} -| | -| | ${frame_size} = | Get Average Frame Size | ${frame_size} -| | ${avg} = | Convert To Number | ${avg} -| | ${stdev} = | Convert To Number | ${stdev} -| | ${lower} = | Evaluate | ${avg} - ${stdev} -| | ${upper} = | Evaluate | ${avg} + ${stdev} -| | Display single bound | PLRsearch lower bound | ${lower} | ${frame_size} -| | Display single bound | PLRsearch upper bound | ${upper} | ${frame_size} -| | Return From Keyword | ${lower} | ${upper} - -| Check NDRPDR interval validity +| Measure and show latency at specified rate | | [Documentation] -| | ... | Extract loss ratio of lower bound of the interval. -| | ... | Fail if it does not reach the allowed value. +| | ... | Send traffic at specified rate, single trial. +| | ... | Extract latency information and append it to text message. +| | ... | The rate argument is int, so should not include "pps". +| | ... | If the given rate is too low, a safe value is used instead. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. | | | | ... | *Arguments:* -| | ... | - interval - Measured interval. Type: ReceiveRateInterval -| | ... | - packet_loss_ratio - Accepted loss (0.0 for NDR). Type: float +| | ... | - message_prefix - Preface to test message addition. Type: string +| | ... | - rate - Rate [tps] for sending packets. +| | ... | Type: float | | | | ... | *Example:* | | -| | ... | \| Check NDRPDR interval validity \| \${result.pdr_interval} \ -| | ... | \| \${0.005} \| -| | -| | [Arguments] | ${interval} | ${packet_loss_ratio}=${0.0} -| | -| | ${lower_bound} = | Set Variable | ${interval.measured_low} -| | ${lower_bound_lf} = | Set Variable | ${lower_bound.loss_fraction} -| | Return From Keyword If | ${lower_bound_lf} <= ${packet_loss_ratio} -| | ${message}= | Catenate | SEPARATOR=${SPACE} -| | ... | Minimal rate loss fraction ${lower_bound_lf} -| | ... | does not reach target ${packet_loss_ratio}. -| | ${message_zero} = | Set Variable | Zero packets forwarded! -| | ${message_other} = | Set Variable | ${lower_bound.loss_count} packets lost. -| | ${message} = | Set Variable If | ${lower_bound_lf} >= 1.0 -| | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other} -| | Fail | ${message} +| | ... | \| Measure and show latency at specified rate \| Latency at 90% NDR \ +| | ... | \| ${10000000} \| +| | +| | [Arguments] | ${message_prefix} | ${rate} +| | +| | ${min_rate} = | Get Min Rate +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${real_rate} = | Evaluate | max(${rate}, ${min_rate}) +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | Call Resetter +| | Send traffic on tg +| | ... | duration=${PERF_TRIAL_LATENCY_DURATION} +| | ... | rate=${real_rate} +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | async_call=${False} +| | ... | duration_limit=${PERF_TRIAL_LATENCY_DURATION} +| | ... | ppta=${ppta} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=${True} +| | ${latency} = | Get Latency Int +| | Set Test Message | ${\n}${message_prefix} ${latency} | append=${True} -| Traffic should pass with maximum rate +| Send ramp-up traffic | | [Documentation] -| | ... | Send traffic at maximum rate. +| | ... | Do nothing unless positive ramp-up duration is specified. +| | ... | Else perform one trial with appropriate rate and duration. +| | ... | This is useful for tests that set DUT state via traffic. +| | ... | Rate has to bee low enough so packets are not lost, +| | ... | Duration has to be long enough to set all the state. +| | ... | The trial results are discarded. | | | | ... | *Test (or broader scope) variables read:* | | ... | - traffic_profile - Name of module defining traffic for measurements. | | ... | Type: string | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or | | ... | string -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | - ramp_up_duration - Suitable traffic duration [s]. | | ... | Type: float -| | -| | ... | *Arguments:* -| | ... | - trial_duration - Duration of single trial [s]. Type: float -| | ... | - fail_no_traffic - Whether to fail on zero receive count; -| | ... | default value: True. Type: boolean -| | ... | - trial_multiplicity - How many trials in this measurement. -| | ... | Type: integer -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic; -| | ... | default value: 2. Type: integer -| | ... | - tx_port - TX port of TG; default value: 0. Type: integer -| | ... | - rx_port - RX port of TG; default value: 1. Type: integer -| | ... | - latency - True to enable latency measurement; default value: False. -| | ... | Type: boolean +| | ... | - ramp_up_rate - Suitable transmit rate [tps]. +| | ... | Type: float +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". | | | | ... | *Example:* | | -| | ... | \| Traffic should pass with maximum rate \| \${1} \| \${False} \ -| | ... | \| \${10.0} \| \${2} \| \${0} \| \${1} \| \${True} \| -| | -| | [Arguments] | ${trial_duration}=${trial_duration} -| | ... | ${fail_no_traffic}=${True} -| | ... | ${trial_multiplicity}=${trial_multiplicity} -| | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1} -| | ... | ${latency}=${False} -| | -| | ${results}= | Send traffic at specified rate -| | ... | ${trial_duration} | ${max_rate} | ${frame_size} -| | ... | ${traffic_profile} | ${trial_multiplicity} -| | ... | ${traffic_directions} | ${tx_port} | ${rx_port} | latency=${latency} -| | Set Test Message | ${\n}Maximum Receive Rate trial results -| | Set Test Message | in packets per second: ${results} -| | ... | append=yes -| | Run Keyword If | ${fail_no_traffic} | Fail if no traffic forwarded +| | ... | \| Send ramp-up traffic \| +| | +| | ${ramp_up_duration} = | Get Ramp Up Duration +| | Run Keyword Unless | ${ramp_up_duration} > 0.0 | Return From Keyword +| | ${ramp_up_rate} = | Get Ramp Up Rate +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | Send traffic on tg +| | ... | duration=${ramp_up_duration} +| | ... | rate=${ramp_up_rate} +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | async_call=${False} +| | ... | duration_limit=${0.0} +| | ... | ppta=${ppta} +| | ... | use_latency=${use_latency} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} | Send traffic at specified rate | | [Documentation] @@ -428,178 +385,62 @@ | | ... | Then send traffic at specified rate, possibly multiple trials. | | ... | Show various DUT stats, optionally also packet trace. | | ... | Return list of measured receive rates. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. | | | | ... | *Arguments:* | | ... | - trial_duration - Duration of single trial [s]. Type: float -| | ... | - rate - Target aggregate transmit rate [pps] / Connections per second -| | ... | (CPS) for UDP/TCP flows. Type: float -| | ... | - frame_size - L2 Frame Size [B]. Type: integer or string -| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | - rate - Target transmit rate [tps]. Type: float | | ... | Type: string | | ... | - trial_multiplicity - How many trials in this measurement. -| | ... | Type: integer -| | ... | - 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 -| | ... | - extended_debug - True to enable extended debug. | | ... | Type: boolean -| | ... | - latency - True to enable latency measurement; default value: False. +| | ... | - use_latency - Use latency stream in search; default value: False. | | ... | Type: boolean +| | ... | - duration_limit - Hard limit for trial duration, overriding duration +| | ... | computed from transaction_scale. Default 0.0 means no limit. | | | | ... | *Example:* | | | | ... | \| Send traffic at specified rate \| \${1.0} \| ${4000000.0} \ -| | ... | \| \${64} \| 3-node-IPv4 \| \${10} \| \${2} \| \${0} \| \${1} \ -| | ... | \| ${False} \| ${True} \| +| | ... | \| \${10} \| ${False} \| ${1.0} \| | | -| | [Arguments] | ${trial_duration} | ${rate} | ${frame_size} -| | ... | ${traffic_profile} | ${trial_multiplicity}=${trial_multiplicity} -| | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1} -| | ... | ${extended_debug}=${extended_debug} | ${latency}=${False} -| | -| | Set Test Variable | ${extended_debug} -| | # 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} +| | [Arguments] | ${trial_duration} | ${rate} | ${trial_multiplicity} +| | ... | ${use_latency}=${False} | ${duration_limit}=${0.0} | | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | Set Test Variable | \${rate_for_teardown} | ${rate} | | FOR | ${action} | IN | @{pre_stats} | | | Run Keyword | Additional Statistics Action For ${action} | | END | | ${results} = | Create List | | FOR | ${i} | IN RANGE | ${trial_multiplicity} -| | | # The following line is skipping some default arguments, -| | | # that is why subsequent arguments have to be named. +| | | Call Resetter | | | 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} +| | | ... | duration=${trial_duration} +| | | ... | rate=${rate} +| | | ... | frame_size=${frame_size} +| | | ... | traffic_profile=${traffic_profile} +| | | ... | async_call=${False} +| | | ... | duration_limit=${duration_limit} +| | | ... | ppta=${ppta} +| | | ... | traffic_directions=${traffic_directions} +| | | ... | transaction_duration=${transaction_duration} +| | | ... | transaction_scale=${transaction_scale} +| | | ... | transaction_type=${transaction_type} +| | | ... | use_latency=${use_latency} +| | | ${result}= | Get Measurement Result +| | | # Out of several quantities for aborted traffic (duration stretching), +| | | # the approximated receive rate is the best estimate we have. +| | | Append To List | ${results} | ${result.approximated_receive_rate} | | END | | FOR | ${action} | IN | @{post_stats} | | | Run Keyword | Additional Statistics Action For ${action} | | END | | Return From Keyword | ${results} -| Measure and show latency at specified rate -| | [Documentation] -| | ... | Send traffic at specified rate, single trial. -| | ... | Extract latency information and append it to text message. -| | ... | The rate argument is int, so should not include "pps". -| | ... | If the given rate is too low, a safe value is used instead. -| | -| | ... | *Arguments:* -| | ... | - message_prefix - Preface to test message addition. Type: string -| | ... | - trial_duration - Duration of single trial [s]. Type: float -| | ... | - 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]. Type: integer or string -| | ... | - traffic_profile - Name of module defining traffic 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 -| | ... | - safe_rate - To apply if rate is below this, as latency pps is fixed. -| | ... | In pps. Type: integer. -| | -| | ... | *Example:* -| | -| | ... | \| Measure and show latency at specified rate \| Latency at 90% NDR \ -| | ... | \| \${1.0} \| ${10000000} \| \${64} \| 3-node-IPv4 \| \${2} \ -| | ... | \| \${0} \| \${1} \| ${9500} \| -| | -| | [Arguments] | ${message_prefix} | ${trial_duration} | ${rate} -| | ... | ${frame_size} | ${traffic_profile} | ${traffic_directions}=${2} -| | ... | ${tx_port}=${0} | ${rx_port}=${1} | ${safe_rate}=${9001} -| | -| | ${real_rate} = | Evaluate | max(${rate}, ${safe_rate}) -| | # The following line is skipping some default arguments, -| | # that is why subsequent arguments have to be named. -| | Send traffic on tg | ${trial_duration} | ${real_rate} | ${frame_size} -| | ... | ${traffic_profile} | warmup_time=${0} -| | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port} -| | ... | rx_port=${rx_port} | latency=${True} -| | ${latency} = | Get Latency Int -| | Set Test Message | ${\n}${message_prefix} ${latency} | append=${True} - -| Clear and show runtime counters with running traffic -| | [Documentation] -| | ... | Start traffic at specified rate then clear runtime counters on all -| | ... | DUTs. Wait for specified amount of time and capture runtime counters -| | ... | on all DUTs. Finally stop traffic -| | -| | ... | *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:* -| | -| | ... | \| Clear and show runtime counters with running traffic \| \${10} \ -| | ... | \| ${4000000.0} \| \${64} \| 3-node-IPv4 \| \${2} \| \${0} \| \${1} \| -| | -| | [Arguments] | ${duration} | ${rate} | ${frame_size} | ${traffic_profile} -| | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1} -| | -| | # Duration of -1 means we will stop traffic manually. -| | Send traffic on tg | ${-1} | ${rate} | ${frame_size} | ${traffic_profile} -| | ... | warmup_time=${0} | async_call=${True} | latency=${False} -| | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port} -| | ... | rx_port=${rx_port} -| | FOR | ${action} | IN | @{pre_run_stats} -| | | Run Keyword | Additional Statistics Action For ${action} -| | END -| | Sleep | ${duration} -| | FOR | ${action} | IN | @{post_run_stats} -| | | Run Keyword | Additional Statistics Action For ${action} -| | 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. @@ -612,27 +453,36 @@ | | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or | | ... | string | | ... | *Arguments:* -| | ... | - 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. +| | ... | - rate - Rate [tps] for sending packets. | | ... | Type: float -| | ... | - 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:* | | -| | ... | \| Start Traffic on Background \| ${4000000.0} \| \${2} \| \${0} \ -| | ... | \| \${1} \| +| | ... | \| Start Traffic on Background \| ${4000000.0} \| | | -| | [Arguments] | ${rate} | ${traffic_directions}=${2} | ${tx_port}=${0} -| | ... | ${rx_port}=${1} +| | [Arguments] | ${rate} | | +| | ${ppta} = | Get Packets Per Transaction Aggregated +| | ${traffic_directions} = | Get Traffic Directions +| | ${transaction_duration} = | Get Transaction Duration +| | ${transaction_scale} = | Get Transaction Scale +| | ${transaction_type} = | Get Transaction Type +| | ${use_latency} = | Get Use Latency +| | Call Resetter | | # Duration of -1 means we will stop traffic manually. -| | Send traffic on tg | ${-1} | ${rate} | ${frame_size} | ${traffic_profile} -| | ... | warmup_time=${0} | async_call=${True} | latency=${False} -| | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port} -| | ... | rx_port=${rx_port} +| | Send traffic on tg +| | ... | duration=${-1} +| | ... | rate=${rate} +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | async_call=${True} +| | ... | duration_limit=${0.0} +| | ... | ppta=${ppta} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=${use_latency} | Stop Running Traffic | | [Documentation] @@ -649,75 +499,41 @@ | | ${result}= | Stop traffic on tg | | Return From Keyword | ${result} -| Additional Statistics Action For vpp-clear-stats -| | [Documentation] -| | ... | Additional Statistics Action for clear VPP statistics. -| | -| | Clear Statistics On All DUTs | ${nodes} - -| Additional Statistics Action For vpp-show-stats -| | [Documentation] -| | ... | Additional Statistics Action for show VPP statistics. -| | -| | Show Statistics On All DUTs | ${nodes} - -| Additional Statistics Action For vpp-clear-runtime -| | [Documentation] -| | ... | Additional Statistics Action for clear VPP runtime. -| | -| | VPP Clear Runtime On All DUTs | ${nodes} - -| Additional Statistics Action For vpp-show-runtime -| | [Documentation] -| | ... | Additional Statistics Action for show VPP runtime. -| | -| | VPP Show Runtime On All DUTs | ${nodes} - -| Additional Statistics Action For vpp-enable-packettrace -| | [Documentation] -| | ... | Additional Statistics Action for enable VPP packet trace. -| | -| | Run Keyword If | ${extended_debug}==${True} -| | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False} - -| Additional Statistics Action For vpp-show-packettrace -| | [Documentation] -| | ... | Additional Statistics Action for show VPP packet trace. -| | -| | Run Keyword If | ${extended_debug}==${True} -| | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100} - -| Additional Statistics Action For vpp-enable-elog -| | [Documentation] -| | ... | Additional Statistics Action for enable VPP elog trace. -| | -| | VPP Enable Elog Traces On All DUTs | ${nodes} - -| Additional Statistics Action For vpp-show-elog -| | [Documentation] -| | ... | Additional Statistics Action for show VPP elog trace. -| | -| | Show Event Logger On All DUTs | ${nodes} - -| Additional Statistics Action For bash-perf-stat +| Traffic should pass with maximum rate | | [Documentation] -| | ... | Additional Statistics Action for bash command "perf stat". +| | ... | Send traffic at maximum rate. +| | ... | Call \${resetter} (if defined) to reset DUT state before each trial. +| | ... | Fail if no packets were forwarded. | | -| | Run Keyword If | ${extended_debug}==${True} -| | ... | Perf Stat On All DUTs | ${nodes} | cpu_list=${cpu_alloc_str} - -| Additional Statistics Action For clear-show-runtime-with-traffic -| | [Documentation] -| | ... | Additional Statistics Action for clear and show runtime counters with -| | ... | running traffic. +| | ... | *Test (or broader scope) variables read:* +| | ... | - traffic_profile - Name of module defining traffic for measurements. +| | ... | Type: string +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | ... | - max_rate - Calculated maximal transmit rate [tps]. +| | ... | Type: float +| | ... | - transaction_type - String identifier to determine how to count +| | ... | transactions. Default is "packet". | | -| | 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 noop -| | [Documentation] -| | ... | Additional Statistics Action for no operation. +| | ... | *Example:* | | -| | No operation +| | ... | \| Traffic should pass with maximum rate \| +| | +| | ${max_rate} = | Get Max Rate +| | ${transaction_type} = | Get Transaction Type +| | ${trial_duration} = | Get Mrr Trial Duration +| | ${trial_multiplicity} = | Get Mrr Trial Multiplicity +| | ${use_latency} = | Get Use Latency +| | # The following also sets \${rate_for_teardown} +| | ${results} = | Send traffic at specified rate +| | ... | rate=${max_rate} +| | ... | trial_duration=${trial_duration} +| | ... | trial_multiplicity=${trial_multiplicity} +| | ... | use_latency=${use_latency} +| | ... | duration_limit=${0.0} +| | ${unit} = | Set Variable If | """_cps""" in """${transaction_type}""" +| | ... | estimated connections per second | packets per second +| | Set Test Message | ${\n}Maximum Receive Rate trial results +| | Set Test Message | in ${unit}: ${results} +| | ... | append=yes +| | Fail if no traffic forwarded diff --git a/resources/libraries/robot/performance/performance_vars.robot b/resources/libraries/robot/performance/performance_vars.robot new file mode 100644 index 0000000000..130237ed82 --- /dev/null +++ b/resources/libraries/robot/performance/performance_vars.robot @@ -0,0 +1,522 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Documentation | Performance suite keywords - Handling of various values +| ... | to allow autodetection, computation and overriding by suite variables. +| Library | Collections +| Variables | ${CURDIR}/../../python/Constants.py + +*** Variables *** +| ${extended_debug}= | ${EXTENDED_DEBUG} + +*** Keywords *** +| Get Disable Latency +| | [Documentation] +| | ... | If Get Use Latency returns true, return false. +| | ... | Otherwise return value of \${disable_latency} variable, +| | ... | or \${False} if not defined. +| | +| | ... | The return value controls whether latency trials in NDRPDR tests +| | ... | are executed. For example, ASTF tests do not support latency +| | ... | measurements yet, so executing the trials just wastes time. +| | ... | Return type: bool. +| | +| | ... | *Example:* +| | +| | ... | \| \${disable_latency} = \| Get Disable Latency \| +| | +| | ${use_latency} = | Get Use Latency +| | Return From Keyword If | ${use_latency} | ${False} +| | ${disable_latency} = | Get Variable Value | \${disable_latency} | ${False} +| | Return From Keyword | ${disable_latency} + +| Get Max Rate +| | [Documentation] +| | ... | Return value of \${max_rate} variable, +| | ... | fail if it is not defined. +| | ... | Call this just before calling a Python keyword, +| | ... | as those have restricted access to Robot variables. +| | +| | ... | The return value controls the maximal unidirectional packet rate. +| | ... | The value is also usable for minimal TPS value for ASTF tests. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${max_rate} = \| Get Max Rate \| +| | +| | ${max_rate} = | Get Variable Value | \${max_rate} | ${0.0} +| | Return From Keyword If | ${max_rate} | ${max_rate} +| | Fail | \${max_rate} is not defined. Call Set Max Rate And Jumbo keyword. + +| Get Min Rate +| | [Documentation] +| | ... | Return a hardcoded value. This is an abstraction, useful in case +| | ... | we start allowing various other overrides or computations. +| | ... | Call this just before calling a Python keyword, +| | ... | as those have restricted access to Robot variables. +| | +| | ... | The return value controls the minimal unidirectional packet rate. +| | ... | The value is also usable for minimal TPS value for ASTF tests. +| | ... | The current value is the smallest one permitted +| | ... | by STL profiles with latency streams. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${min_rate} = \| Get Min Rate \| +| | +| | Return From Keyword | ${9001.0} + +| Get Mrr Trial Duration +| | [Documentation] +| | ... | Return value from Constants. This is an abstraction, useful in case +| | ... | we start allowing various other overrides or computations. +| | ... | Call this just before calling a Python keyword, +| | ... | as those have restricted access to Robot variables. +| | +| | ... | The return value controls the duration of main trial measurement +| | ... | for MRR type tests. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${mrr_trial_duration} = \| Get Mrr Trial Duration \| +| | +| | Return From Keyword | ${PERF_TRIAL_DURATION} + +| Get Mrr Trial Multiplicity +| | [Documentation] +| | ... | Return value from Constants. This is an abstraction, useful in case +| | ... | we start allowing various other overrides or computations. +| | ... | Call this just before calling a Python keyword, +| | ... | as those have restricted access to Robot variables. +| | +| | ... | The return value controls the number of main trial measurement +| | ... | for (B)MRR type tests. +| | ... | Return type: integer. +| | +| | ... | *Example:* +| | +| | ... | \| \${mrr_trial_multiplicity} = \| Get Mrr Trial Multiplicity \| +| | +| | Return From Keyword | ${PERF_TRIAL_MULTIPLICITY} + +| Get Packet Loss Ratio +| | [Documentation] +| | ... | Return a hardcoded value. This is an abstraction, useful in case +| | ... | we start allowing various other overrides or computations. +| | ... | Call this just before calling a Python keyword, +| | ... | as those have restricted access to Robot variables. +| | +| | ... | The return value controls the default packet loss ration for PDR +| | ... | in NDRPDR tests. Some other usages of MLRsearch (e.g. reconf tests) +| | ... | may use a different value. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${packet_loss_ratio} = \| Get Packet Loss Ratio \| +| | +| | Return From Keyword | ${0.005} + +| Get Packets Per Transaction Aggregated +| | [Documentation] +| | ... | Return value of \${packets_per_transaction_aggregated}; +| | ... | if not defined, assume traffic is symmetric and compute +| | ... | from unidirectional values. +| | +| | ... | The return value is used when reporting PPS values from TPS found +| | ... | by some search (e.g. NDRPDR). +| | ... | Return type: integer. +| | +| | ... | *Example:* +| | +| | ... | \| \${ppta} = \| Get Packets Per Transaction Aggregated \| +| | +| | ${ppta} = | Get Variable Value | \${packets_per_transaction_aggregated} +| | ... | ${0} +| | Return From Keyword If | "${ppta}" != "0" | ${ppta} +| | # TODO: Insert TCP computation from packet size here. +| | ${pptad} = | Get Packets Per Transaction And Direction +| | ${traffic_directions} = | Get Traffic Directions +| | # We do not support ASTF profiles with multiple transactions, yet. +| | ${ppta} = | Evaluate | ${pptad} * ${traffic_directions} +| | Return From Keyword | ${ppta} + +| Get Packets Per Transaction And Direction +| | [Documentation] +| | ... | Return value of \${packets_per_transaction_and_direction}, +| | ... | or ${1} if not defined. +| | +| | ... | The return value is used when computing max rate (TPS), +| | ... | so for asymmetric transaction use the more numerous direction. +| | ... | Return type: integer. +| | +| | ... | *Example:* +| | +| | ... | \| \${pptad} = \| Get Packets Per Transaction And Direction \| +| | +| | ${pptad} = | Get Variable Value | \${packets_per_transaction_and_direction} +| | ... | ${1} +| | Return From Keyword | ${pptad} + +| Get Ramp Up Duration +| | [Documentation] +| | ... | Return value of \${ramp_up_duration}, +| | ... | or ${0.0} if not defined. +| | +| | ... | The return value determines the required duration of ramp-up phase. +| | ... | Typically used to prepare a specific state on DUT. +| | ... | If the value is zero, ramp-up phase is skipped. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${ramp_up_duration} = \| Get Ramp Up Duration \| +| | +| | ${ramp_up_duration} = | Get Variable Value | \${ramp_up_duration} | ${0.0} +| | Return From Keyword | ${ramp_up_duration} + +| Get Ramp Up Rate +| | [Documentation] +| | ... | Return value of \${ramp_up_rate}, +| | ... | if not defined return \${max_rate}. +| | +| | ... | The return value determines the rate for ramp-up phase. +| | ... | Typically used to limit the rate when max rate +| | ... | would lose packets in the ramp up phase, thus not setting +| | ... | the DUT state correctly. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${ramp_up_rate} = \| Get Ramp Up Rate \| +| | +| | ${ramp_up_rate} = | Get Variable Value | \${ramp_up_rate} | ${0.0} +| | Return From Keyword If | ${ramp_up_rate} | ${ramp_up_rate} +| | Run Keyword And Return | Get Max Rate + +| Get Rate For Teardown +| | [Documentation] +| | ... | Return value of \${rate_for_teardown}, +| | ... | if not defined (or zero) return the min rate. +| | +| | ... | The return value determines the rate for teardown trial, +| | ... | that is executed if a perf test fails. +| | ... | The \${rate_for_teardown} is usually not defined in suite, +| | ... | but search keywords set it in places where failure can occur, +| | ... | so the trial is done at the rate interesting for the failure. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${rate_for_teardown} = \| Get Rate For Teardown \| +| | +| | ${rate_for_teardown} = | Get Variable Value | \${rate_for_teardown} | ${0.0} +| | Return From Keyword If | ${rate_for_teardown} | ${rate_for_teardown} +| | Run Keyword And Return | Get Min Rate + +| Get Resetter +| | [Documentation] +| | ... | Return value of \${resetter} variable, +| | ... | or \${None} if not defined. +| | +| | ... | If not \${None}, the returned value is callable. +| | ... | Its use is to reset DUT to initial conditions, +| | ... | for example to remove NAT sessions created in the previous trial. +| | +| | ... | *Example:* +| | +| | ... | \| \${resetter} = \| Get Resetter \| +| | +| | ${resetter} = | Get Variable Value | \${resetter} | ${None} +| | Return From Keyword | ${resetter} + +| Get Runtime Duration +| | [Documentation] +| | ... | Return value of \${runtime_duration} variable, +| | ... | if not defined return ${1.0}. +| | +| | ... | The return value controls the duration of runtime trial, +| | ... | which also acts as a warmup. Usually one second is enough, +| | ... | but some suites need longer time to set up state on DUT. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${runtime_duration} = \| Get Runtime Duration \| +| | +| | ${runtime_duration} = | Get Variable Value | \${runtime_duration} | ${1.0} +| | Return From Keyword | ${runtime_duration} + +| Get Runtime Rate +| | [Documentation] +| | ... | Return value of \${runtime_rate} variable, +| | ... | if not defined return the max rate. +| | +| | ... | The return value controls the rate (TPS unidir) of runtime trial, +| | ... | which also acts as a warmup. No plans to ever use a different rate, +| | ... | but keywords look better if access to such values is uniform. +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${runtime_rate} = \| Get Runtime Rate \| +| | +| | ${runtime_rate} = | Get Variable Value | \${runtime_rate} | ${0.0} +| | Return From Keyword If | ${runtime_rate} | ${runtime_rate} +| | Run Keyword And Return | Get Max Rate + +| Get Traffic Directions +| | [Documentation] +| | ... | Return value of \${traffic_directions}, +| | ... | or ${2} if not defined. +| | +| | ... | The return value used when parsing for measurement results. +| | ... | This needs to be known already in profile driver, +| | ... | as bidirectional parsing may fail on unidirectional traffic. +| | ... | Return type: integer. +| | +| | ... | *Example:* +| | +| | ... | \| \${traffic_directions} = \| Get Traffic Directions \| +| | +| | ${traffic_directions} = | Get Variable Value | \${traffic_directions} | ${2} +| | Return From Keyword | ${traffic_directions} + +| Get Transaction Duration +| | [Documentation] +| | ... | Return value of \${transaction_duration} variable, +| | ... | or \${0.0} if not defined. +| | +| | ... | The return value is the expected duration of single (ASTF) transaction +| | ... | if it is not negligible for overall trial duration computation. +| | ... | Most tests use very short transactions (without explicit delays), +| | ... | so the zero default works (and suite saves one line +| | ... | of Variables table). +| | ... | Return type: float. +| | +| | ... | *Example:* +| | +| | ... | \| \${transaction_duration} = \| Get Transaction Duration \| +| | +| | ${transaction_duration} = | Get Variable Value | \${transaction_duration} +| | ... | ${0.0} +| | Return From Keyword | ${transaction_duration} + +| Get Transaction Scale +| | [Documentation] +| | ... | Return value of \${transaction_scale} variable, +| | ... | or \${0} if not defined. +| | +| | ... | Zero return value means the number of transactions is not limited, +| | ... | which is true for most STL TRex profiles (transaction is a packet). +| | ... | Nonzero return value means the number of transactions is fixed, +| | ... | for example in stateful NAT scale tests. +| | ... | Return type: integer. +| | +| | ... | *Example:* +| | +| | ... | \| \${transaction_scale} = \| Get Transaction Scale \| +| | +| | ${transaction_scale} = | Get Variable Value | \${transaction_scale} | ${0} +| | Return From Keyword | ${transaction_scale} + +| Get Transaction Type +| | [Documentation] +| | ... | Return value of \${transaction_type} variable, +| | ... | or "packet" if not defined. +| | +| | ... | The return value describes the type of transaction +| | ... | the test is executed. For example "packet" means a transaction +| | ... | is just a single packet. For more sophisticated transactions, +| | ... | the logic to determine the number of passed transactions +| | ... | is different from merely counting the packets received from DUT. +| | ... | Return type: string. +| | +| | ... | *Example:* +| | +| | ... | \| \${transaction_type} = \| Get Transaction Type \| +| | +| | ${transaction_type} = | Get Variable Value | \${transaction_type} | packet +| | Return From Keyword | ${transaction_type} + +| Get Use Latency +| | [Documentation] +| | ... | Return value of \${use_latency} variable, +| | ... | if not defined return the value from Constants. +| | +| | ... | The return value controls whether latency streams are active +| | ... | during the main search. +| | ... | Return type: bool. +| | +| | ... | *Example:* +| | +| | ... | \| \${use_latency} = \| Get Use Latency \| +| | +| | ${use_latency} = | Get Variable Value | ${use_latency} | ${PERF_USE_LATENCY} +| | Return From Keyword | ${use_latency} + +| Set Jumbo +| | [Documentation] +| | ... | For jumbo frames detection, the maximal packet size is relevant, +| | ... | encapsulation overhead (if any) has effect. +| | +| | ... | This keyword computes jumbo boolean (some suites need that for +| | ... | configuration decisions). +| | ... | To streamline suite autogeneration, both input and output values +| | ... | are communicated as test (or broader scope) variables, +| | ... | instead of explicit arguments and return values. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | +| | ... | *Test variables set:* +| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be +| | ... | enabled. Type: boolean +| | +| | ... | *Example:* +| | +| | ... | \| Set Jumbo \| +| | +| | # Already called by Set Max Rate And Jumbo, but some suites (e.g. device) +| | # are calling this directly. +| | Set Numeric Frame Sizes +| | ${jumbo} = | Set Variable If | ${max_frame_size} < 1522 +| | ... | ${False} | ${True} +| | Set Test Variable | \${jumbo} + +| Set Max Rate And Jumbo +| | [Documentation] +| | ... | Input framesize can be either integer in case of a single packet +| | ... | in stream, or IMIX string defining mix of packets. +| | ... | For jumbo frames detection, the maximal packet size is relevant. +| | ... | For maximal transmit rate, the average packet size is relevant. +| | ... | In both cases, encapsulation overhead (if any) has effect. +| | ... | The maximal rate is computed from NIC name. +| | ... | The implementation works by mapping from exact +| | ... | whitelisted NIC names. +| | ... | The mapping is hardcoded in nic_limits.yaml +| | ... | TODO: Make the mapping from NIC names case insensistive. +| | +| | ... | This keyword computes maximal unidirectional transmit rate +| | ... | and jumbo boolean (some suites need that for configuration decisions). +| | ... | To streamline suite autogeneration, both input and output values +| | ... | are communicated as test (or broader scope) variables, +| | ... | instead of explicit arguments and return values. +| | +| | ... | If this keyword detects the test is interested in (unidirectional) +| | ... | transactons per second maximal rate (tps), that is returned (not pps). +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - nic_name - Name of bottleneck NIC. Type: string +| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | ... | - packets_per_transaction_and_direction - Pps-tps conversion. +| | ... | Optional, default 1. +| | +| | ... | *Test variables set:* +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | This never exceeds bandwidth on TG-DUT nor DUT-DUT links. +| | ... | Type: float +| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be +| | ... | enabled. Type: boolean +| | ... | avg_frame_size - Average frame size including overhead. Type: float +| | ... | max_frame_size - Maximal frame size including overhead. Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Set Max Rate And Jumbo \| +| | +| | # TODO: Re-check overhead values in suites with both traffics encapsulated. +| | # TODO: Improve layered setup to detect encap/decap and update overhead. +| | ${pps_limit} = | Get From Dictionary +| | ... | ${NIC_NAME_TO_PPS_LIMIT} | ${nic_name} +| | ${bps_limit} = | Get From Dictionary +| | ... | ${NIC_NAME_TO_BPS_LIMIT} | ${nic_name} +| | Set Numeric Frame Sizes +| | ${rate} = | Evaluate | ${bps_limit} / ((${avg_frame_size} + 20.0) * 8) +| | ${max_rate} = | Set Variable If | ${rate} > ${pps_limit} +| | ... | ${pps_limit} | ${rate} +| | ${pptad} = | Get Packets Per Transaction And Direction +| | ${max_rate} = | Evaluate | ${max_rate} / ${pptad} +| | Set Test Variable | \${max_rate} +| | Set Jumbo + +| Set Numeric Frame Sizes +| | [Documentation] +| | ... | Framesize can be either integer in case of a single packet +| | ... | in stream, or set of packets in case of IMIX type or simmilar. +| | ... | For jumbo decisions, we need a numeric size of the biggest packet. +| | ... | For max rate decisions, we need a numeric average packet size. +| | ... | This keyword computes both and sets them as test variables. +| | +| | ... | Each suite sets a value named \${overhead}, +| | ... | which describes by how many bytes the frames on DUT-DUT link +| | ... | are larger (due to encapsulation) than those +| | ... | on the primary TG-DUT link. But for some suites that value +| | ... | can be negaive (if TG-DUT is encapsulated more heavily). +| | ... | For calculations in this keyword, we need largest sizes +| | ... | across links, so zero is used if \${overhead} is negative. +| | +| | ... | *Test variables read:* +| | ... | - frame_size - Framesize. Type: integer or string +| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer +| | +| | ... | *Test variables set* +| | ... | avg_frame_size - Average frame size including overhead. Type: float +| | ... | max_frame_size - Maximal frame size including overhead. Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Set Numeric Frame Sizes \| +| | +| | ${max_overhead} = | Set Variable If | ${overhead} >= 0 | ${overhead} | ${0} +| | ${bare_avg_frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' +| | ... | Set Variable | ${353.83333} +| | ... | ELSE +| | ... | Convert To Number | ${frame_size} +| | ${avg_frame_size} = | Evaluate | $bare_avg_frame_size + $max_overhead +| | Set Test Variable | \${avg_frame_size} +| | ${bare_max_frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' +| | ... | Set Variable | ${1518} +| | ... | ELSE +| | ... | Convert To Number | ${frame_size} +| | ${max_frame_size} = | Evaluate | $bare_max_frame_size + $max_overhead +| | Set Test Variable | ${max_frame_size} + +| Set Rates For Policer +| | [Documentation] +| | ... | Policer tests need these values, +| | ... | currently computed from \${avg_frame_size}. +| | ... | TODO: Verify the units match and computation is correct. +| | +| | ... | *Test (or broader scope) variables read:* +| | ... | - avg_frame_size - Average L2 Frame Size [B]. Type: float +| | ... | Set by Set Max Rate And Jumbo keyword. +| | +| | ... | *Test variables set:* +| | ... | - eb - Excess burst rate for policer. Type: float +| | ... | - cb - Committed burst rate for policer. Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Set Rates For Policer \| +| | +| | Set Test Variable | \${eb} | ${avg_frame_size} +| | Set Test Variable | \${cb} | ${avg_frame_size} diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index cf6b599a29..fdc4da475e 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -58,7 +58,6 @@ | Resource | resources/libraries/robot/overlay/lisp.robot | Resource | resources/libraries/robot/overlay/lispgpe.robot | Resource | resources/libraries/robot/overlay/lisp_api.robot -| Resource | resources/libraries/robot/performance/performance_limits.robot | Resource | resources/libraries/robot/performance/performance_utils.robot | Resource | resources/libraries/robot/shared/interfaces.robot | Resource | resources/libraries/robot/shared/container.robot @@ -74,6 +73,26 @@ | ${cpu_alloc_str}= | ${0} *** Keywords *** +# TODO: Sort keywords alphabetically. + +| Call Resetter +| | [Documentation] +| | ... | Check for a presence of test variable \${resetter}. +| | ... | If it exists (and not None), call the resetter (as a Python callable). +| | ... | This is usually used to reset any state on DUT before next trial. +| | +| | ... | TODO: Move to a more specific library if needed. +| | +| | ... | *Example:* +| | +| | ... | \| Call Resetter \| +| | +| | ${resetter} = | Get Resetter +| | # See http://robotframework.org/robotframework/3.1.2/libraries/BuiltIn.html +| | # #Evaluating%20expressions for $variable (without braces) syntax. +| | # Parens are there to perform the call. +| | Run Keyword If | $resetter | Evaluate | $resetter() + | Configure crypto device on all DUTs | | [Documentation] | Verify if Crypto QAT device virtual functions are | | ... | initialized on all DUTs. If parameter force_init is set to True, then diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot index 93c4574c83..09ebd9d01e 100644 --- a/resources/libraries/robot/shared/test_teardown.robot +++ b/resources/libraries/robot/shared/test_teardown.robot @@ -64,11 +64,21 @@ | Additional Test Tear Down Action For performance | | [Documentation] | | ... | Additional teardown for tests which uses performance measurement. -| | -| | Run Keyword If Test Failed -| | ... | Send traffic at specified rate | ${1.0} | 10000 -| | ... | ${frame_size} | ${traffic_profile} | trial_multiplicity=${1} -| | ... | extended_debug=${True} +| | ... | Optionally, call \${resetter} (if defined) to reset DUT state. +| | +| | ... | TODO: Document what test variables are required or optional. +| | +| | Run Keyword If Test Passed | Return From Keyword +| | ${use_latency} = | Get Use Latency +| | ${rate_for_teardown} = | Get Rate For Teardown +| | Call Resetter +| | Set Test Variable | \${extended_debug} | ${True} +| | Send traffic at specified rate +| | ... | trial_duration=${1.0} +| | ... | rate=${rate_for_teardown} +| | ... | trial_multiplicity=${1} +| | ... | use_latency=${use_latency} +| | ... | duration_limit=${1.0} | Additional Test Tear Down Action For packet_trace | | [Documentation] diff --git a/tests/vpp/device/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-dev.robot b/tests/vpp/device/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-dev.robot index 866975cbc5..5c1122211c 100644 --- a/tests/vpp/device/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-dev.robot +++ b/tests/vpp/device/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-dev.robot @@ -64,14 +64,9 @@ | | | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | -| | ${cb}= | Get Average Frame Size | ${frame_size} -| | ${eb}= | Get Average Frame Size | ${frame_size} -| | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${cb} -| | Set Test Variable | \${eb} -| | | | Given Set Max Rate And Jumbo +| | And Set Rates For Policer | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs | with_trace=${True} diff --git a/tests/vpp/device/ip6/eth2p-ethip6-ip6base-ipolicemarkbase-dev.robot b/tests/vpp/device/ip6/eth2p-ethip6-ip6base-ipolicemarkbase-dev.robot index 02b8728f3d..688e912767 100644 --- a/tests/vpp/device/ip6/eth2p-ethip6-ip6base-ipolicemarkbase-dev.robot +++ b/tests/vpp/device/ip6/eth2p-ethip6-ip6base-ipolicemarkbase-dev.robot @@ -65,10 +65,9 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${cb} | ${frame_size} -| | Set Test Variable | \${eb} | ${frame_size} | | | | Given Set Max Rate And Jumbo +| | And Set Rates For Policer | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs | with_trace=${True} diff --git a/tests/vpp/perf/ip4/10ge2p1x710-dot1q-ip4base-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-dot1q-ip4base-ndrpdr.robot index 07c2480e2f..6a5f288d6d 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-dot1q-ip4base-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-dot1q-ip4base-ndrpdr.robot @@ -65,7 +65,7 @@ # TG subnets used by T-Rex | ${tg_if1_net}= | 10.10.10.0 | ${tg_if2_net}= | 20.20.20.0 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4src254 *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot index 5ca8c561e8..3ebc380342 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot @@ -58,7 +58,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot index fffbfd6e0d..afd4624d55 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot @@ -58,7 +58,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot index 1e5396c787..3597eab7d7 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot @@ -62,7 +62,7 @@ | ${cir}= | ${100} | ${eir}= | ${150} | ${dscp}= | AF22 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4src253 *** Keywords *** @@ -80,14 +80,10 @@ | | | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | -| | ${cb}= | Get Average Frame Size | ${frame_size} -| | ${eb}= | Get Average Frame Size | ${frame_size} -| | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${cb} -| | Set Test Variable | \${eb} | | | | Given Set Max Rate And Jumbo +| | And Set Rates For Policer | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ndrpdr.robot index 452ef5b358..992a9fd851 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4base-ndrpdr.robot @@ -57,7 +57,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot index ca83d2e2fe..1ae46ec4eb 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot @@ -58,7 +58,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${100000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot index f91928f1f3..3218c986af 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot @@ -58,7 +58,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${10000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot index 157b897c04..c2d26a9ac3 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot @@ -58,7 +58,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${1000000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100flows-ndrpdr.robot index f2f3d9ed9e..75dafd82e1 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100kflows-ndrpdr.robot index 111c841260..a6f90ee238 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-10kflows-ndrpdr.robot index 7c8763b484..45285d48fc 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100flows-ndrpdr.robot index d2221196af..4fbf64b48f 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100kflows-ndrpdr.robot index 99517b1338..74b32cf8ec 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-10kflows-ndrpdr.robot index c486f0ec03..002629e772 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl10sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100flows-ndrpdr.robot index 43d080cb07..ddd9b09cf2 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100kflows-ndrpdr.robot index f1b5d74904..386c735d81 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot index a73d7dc49f..41c1c450f7 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100flows-ndrpdr.robot index 8acd18115e..8e6bcb7bd4 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100kflows-ndrpdr.robot index 5f200c0e70..dcf6b1c964 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot index bcdc9f66e9..5a43e41b37 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100flows-ndrpdr.robot index 6da1d78a32..8c97b59742 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100kflows-ndrpdr.robot index 83a7b2bc5b..443e6c7341 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot index df6d93cd25..5a08b2bc4d 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100flows-ndrpdr.robot index dd8ec71f9f..2dc5ddeb3c 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100kflows-ndrpdr.robot index 6fa61ee687..2068b80b0a 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot index 309b22be91..838c5e1108 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100flows-ndrpdr.robot index 260b778f1c..578c93e1b8 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100kflows-ndrpdr.robot index 811a6a3707..64dc87dcdf 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-10kflows-ndrpdr.robot index 6abfb81b28..d3b65f42ec 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100flows-ndrpdr.robot index 4591c06983..4293a3182f 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100kflows-ndrpdr.robot index 2d4175a3ca..402cbd43e7 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-10kflows-ndrpdr.robot index aff7e7f3a6..1ba7cdf821 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100flows-ndrpdr.robot index d1489480d9..7bb8154fef 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100kflows-ndrpdr.robot index b639b462de..b529c4d1b4 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-10kflows-ndrpdr.robot index f7e422f8a0..16cc90306c 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100flows-ndrpdr.robot index d691960d55..afc9d49d95 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100kflows-ndrpdr.robot index 4cb6385712..d48b1db27d 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-10kflows-ndrpdr.robot index 6a81eb5317..7f461b4e3f 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl1sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100flows-ndrpdr.robot index 5d48849e00..9600a10370 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100kflows-ndrpdr.robot index 9cd248d737..c0b1442ec8 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot index 554867afef..696dc3f756 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100flows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100flows-ndrpdr.robot index 556815764a..a15049c7d1 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100flows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100flows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u10p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100kflows-ndrpdr.robot index 0512e723fd..f8d51a3aeb 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-100kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-100u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot index e7b5ce1b19..e3e3414e76 100644 --- a/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot @@ -74,7 +74,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-3n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-dot1q-ip4base-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-dot1q-ip4base-ndrpdr.robot index 0f8ad95031..c70585dbfb 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-dot1q-ip4base-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-dot1q-ip4base-ndrpdr.robot @@ -64,7 +64,7 @@ # TG subnets used by T-Rex | ${tg_if1_net}= | 10.10.10.0 | ${tg_if2_net}= | 20.20.20.0 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-dot1qip4asym-ip4src254 *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot index 0b2250c6b0..1ec02d2fc3 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-copwhtlistbase-ndrpdr.robot @@ -58,7 +58,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot index 2f6b8123cb..238913461a 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-iacldstbase-ndrpdr.robot @@ -58,7 +58,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot index 991beec6e0..5ea69a0ab4 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ipolicemarkbase-ndrpdr.robot @@ -60,7 +60,7 @@ | ${cir}= | ${100} | ${eir}= | ${150} | ${dscp}= | AF22 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4src253 *** Keywords *** @@ -78,14 +78,10 @@ | | | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | -| | ${cb}= | Get Average Frame Size | ${frame_size} -| | ${eb}= | Get Average Frame Size | ${frame_size} -| | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${cb} -| | Set Test Variable | \${eb} | | | | Given Set Max Rate And Jumbo +| | And Set Rates For Policer | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ndrpdr.robot index b244172385..6b40a2df9f 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4base-ndrpdr.robot @@ -57,7 +57,7 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4src253 *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot index f766c15186..4dbfcccba8 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-ndrpdr.robot @@ -57,7 +57,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${100000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-rnd-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-rnd-ndrpdr.robot index 79e6ae4a00..e23349edbd 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-rnd-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale200k-rnd-ndrpdr.robot @@ -58,7 +58,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${100000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst-rnd${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot index dc24444dd8..e27bedc849 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-ndrpdr.robot @@ -57,7 +57,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${10000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-rnd-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-rnd-ndrpdr.robot index 91da04bd0b..ee3c500ac2 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-rnd-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale20k-rnd-ndrpdr.robot @@ -58,7 +58,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${10000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst-rnd${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot index dcb016305b..2c9419bd5a 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-ndrpdr.robot @@ -57,7 +57,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${1000000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-rnd-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-rnd-ndrpdr.robot index 9d4baf6584..37e6297659 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-rnd-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4-ip4scale2m-rnd-ndrpdr.robot @@ -59,7 +59,7 @@ | ${osi_layer}= | L3 | ${overhead}= | ${0} | ${rts_per_flow}= | ${1000000} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4-ip4dst-rnd${rts_per_flow} *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-cps-ndrpdr.robot index e402382c20..984454c948 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | TCP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4tcp-ip4base-h1024-p63-s64512 +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_CPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h1024-p63-s64512-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,21 +26,21 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 -| ... | routing and two static IPv4 /24 route entries. DUT1 tested with -| ... | ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ | ... | of packets transmitted. NDR and PDR are discovered for different\ | ... | Ethernet L2 frame sizes using MLRsearch library.\ | ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ -| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | contain L7 flows (${cps} bi-directional TCP flows) with all packets\ | ... | containing Ethernet header, IPv4 header with TCP header and static\ | ... | payload. MAC addresses are matching MAC addresses of the TG node\ | ... | interfaces. @@ -57,12 +57,16 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-1024h -| ${cps}= | ${64512} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +84,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +93,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +101,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${22} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-1c-ethip4tcp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-2c-ethip4tcp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-4c-ethip4tcp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot new file mode 100644 index 0000000000..26bf1604ba --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h1024-p63-s64512-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${22} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-cps-ndrpdr.robot index 45ba61ef42..93adf5bfef 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | TCP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4tcp-ip4base-h16384-p63-s1032192 +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_CPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h16384-p63-s1032192-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,14 +26,14 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty TCP transactions with IPv4 routing* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 -| ... | routing and two static IPv4 /24 route entries. DUT1 tested with -| ... | ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -41,7 +41,7 @@ | ... | Ethernet L2 frame sizes using MLRsearch library.\ | ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ | ... | contain L7 flows (${cps} bi-directional TCP flows) with all packets\ -| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | containing Ethernet header, IPv4 header with TCP header and static\ | ... | payload. MAC addresses are matching MAC addresses of the TG node\ | ... | interfaces. | ... | *[Ref] Applicable standard specifications:* RFC2544. @@ -57,12 +57,16 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-16384h -| ${cps}= | ${1032192} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +84,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +93,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +101,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${18} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-1c-ethip4tcp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-2c-ethip4tcp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-4c-ethip4tcp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot new file mode 100644 index 0000000000..c0b2193157 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h16384-p63-s1032192-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${18} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-cps-ndrpdr.robot index b3d1f84c8c..5892edea9d 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | TCP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4tcp-ip4base-h262144-p63-s16515072 +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_CPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h262144-p63-s16515072-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,14 +26,14 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty TCP transactions with IPv4 routing* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 -| ... | routing and two static IPv4 /24 route entries. DUT1 tested with -| ... | ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -41,7 +41,7 @@ | ... | Ethernet L2 frame sizes using MLRsearch library.\ | ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ | ... | contain L7 flows (${cps} bi-directional TCP flows) with all packets\ -| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | containing Ethernet header, IPv4 header with TCP header and static\ | ... | payload. MAC addresses are matching MAC addresses of the TG node\ | ... | interfaces. | ... | *[Ref] Applicable standard specifications:* RFC2544. @@ -57,12 +57,16 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-262144h -| ${cps}= | ${16515072} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +84,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +93,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +101,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 172.16.0.0 | 20.16.0.0 | ${14} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-1c-ethip4tcp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-2c-ethip4tcp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-4c-ethip4tcp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot new file mode 100644 index 0000000000..554f4070e7 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h262144-p63-s16515072-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 172.16.0.0 | 20.16.0.0 | ${14} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-cps-ndrpdr.robot index 2229f90c80..96c5bc062f 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | TCP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4tcp-ip4base-h4096-p63-s258048 +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_CPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h4096-p63-s258048-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,21 +26,21 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty TCP transactions with IPv4 routing* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 -| ... | routing and two static IPv4 /24 route entries. DUT1 tested with -| ... | ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ | ... | of packets transmitted. NDR and PDR are discovered for different\ | ... | Ethernet L2 frame sizes using MLRsearch library.\ | ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ -| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | contain L7 flows (${cps} bi-directional TCP flows) with all packets\ | ... | containing Ethernet header, IPv4 header with TCP header and static\ | ... | payload. MAC addresses are matching MAC addresses of the TG node\ | ... | interfaces. @@ -57,12 +57,16 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-4096h -| ${cps}= | ${258048} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +84,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +93,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +101,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${20} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-1c-ethip4tcp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-2c-ethip4tcp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-4c-ethip4tcp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot new file mode 100644 index 0000000000..9fd4c4229e --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h4096-p63-s258048-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${20} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-cps-ndrpdr.robot index 1a51c68365..ca3d2cfc41 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | TCP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4tcp-ip4base-h65536-p63-s4128768 +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_CPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h65536-p63-s4128768-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,21 +26,21 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty TCP transactions with IPv4 routing* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 -| ... | routing and two static IPv4 /24 route entries. DUT1 tested with -| ... | ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ | ... | of packets transmitted. NDR and PDR are discovered for different\ | ... | Ethernet L2 frame sizes using MLRsearch library.\ | ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ -| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | contain L7 flows (${cps} bi-directional TCP flows) with all packets\ | ... | containing Ethernet header, IPv4 header with TCP header and static\ | ... | payload. MAC addresses are matching MAC addresses of the TG node\ | ... | interfaces. @@ -57,12 +57,16 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-65536h -| ${cps}= | ${4128768} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +84,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +93,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +101,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${16} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-1c-ethip4tcp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-2c-ethip4tcp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-4c-ethip4tcp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot new file mode 100644 index 0000000000..7327b854c8 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-ip4base-h65536-p63-s4128768-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${16} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot index 905c5526f8..34a7384d45 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP | TCP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_1024 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4tcp-nat44ed-h1024-p63-s64512-cps | @@ -29,15 +29,14 @@ | | Test Template | Local Template | -| Documentation | *Connections per second NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty TCP transactions with NAT44ED* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | one static IPv4 /18 route entries. -| ... | DUT1 is tested with ${nic_name}.\ +| ... | one static IPv4 /18 route entries.\ +| ... | DUT1 is tested with ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -85,12 +84,13 @@ | ${n_hosts}= | ${1024} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-1024h -| ${cps}= | ${64512} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +109,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +118,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +131,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr @@ -146,39 +145,3 @@ | 64B-4c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot new file mode 100644 index 0000000000..ec0260ce99 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-nat44ed-h1024-p63-s64512-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${22} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${22} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.0 +| ${out_mask}= | ${32} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot index 836f60208a..1778833fbe 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP | TCP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_16384 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4tcp-nat44ed-h16384-p63-s1032192-cps | @@ -29,15 +29,14 @@ | | Test Template | Local Template | -| Documentation | *Connections per second NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty TCP transactions with NAT44ED* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | one static IPv4 /18 route entries. -| ... | DUT1 is tested with ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and\ +| ... | one static IPv4 /18 route entries.\ +| ... | DUT1 is tested with ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -85,12 +84,13 @@ | ${n_hosts}= | ${16384} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-16384h -| ${cps}= | ${1032192} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +109,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +118,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +131,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr @@ -146,39 +145,3 @@ | 64B-4c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot new file mode 100644 index 0000000000..189a5494fe --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-nat44ed-h16384-p63-s1032192-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${18} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${18} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.15 +| ${out_mask}= | ${28} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot index 47aa07ff44..ac009da7a1 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP | TCP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_262144 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4tcp-nat44ed-h262144-p63-s16515072-cps | @@ -29,15 +29,14 @@ | | Test Template | Local Template | -| Documentation | *Connections per second NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty TCP transactions with NAT44ED* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | one static IPv4 /18 route entries. -| ... | DUT1 is tested with ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and\ +| ... | one static IPv4 /18 route entries.\ +| ... | DUT1 is tested with ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -85,12 +84,15 @@ | ${n_hosts}= | ${262144} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-262144h -| ${cps}= | ${16515072} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +111,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +120,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +133,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr @@ -146,39 +147,3 @@ | 64B-4c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot new file mode 100644 index 0000000000..172709b7e0 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-nat44ed-h262144-p63-s16515072-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.16.0.0 +| ${dest_mask}= | ${14} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 172.16.0.0 +| ${in_mask}= | ${14} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.255 +| ${out_mask}= | ${24} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${n_sessions} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot index 873ac1a30a..114069e9e6 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP | TCP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_4096 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4tcp-nat44ed-h4096-p63-s258048-cps | @@ -29,14 +29,13 @@ | | Test Template | Local Template | -| Documentation | *Connections per second NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty TCP transactions with NAT44ED* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | one static IPv4 /18 route entries. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and\ +| ... | one static IPv4 /18 route entries.\ | ... | DUT1 is tested with ${nic_name}.\ | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ @@ -85,12 +84,13 @@ | ${n_hosts}= | ${4096} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-4096h -| ${cps}= | ${258048} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +109,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +118,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +131,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr @@ -146,39 +145,3 @@ | 64B-4c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot new file mode 100644 index 0000000000..fa2545f562 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-nat44ed-h4096-p63-s258048-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${20} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${20} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.3 +| ${out_mask}= | ${30} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot index 7f98f1c9bb..e0740029c0 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | TCP | TCP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_65536 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4tcp-nat44ed-h65536-p63-s4128768-cps | @@ -29,15 +29,14 @@ | | Test Template | Local Template | -| Documentation | *Connections per second NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty TCP transactions with NAT44ED* | -| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ | ... | with single links between nodes. | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | one static IPv4 /18 route entries. -| ... | DUT1 is tested with ${nic_name}.\ +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and\ +| ... | one static IPv4 /18 route entries.\ +| ... | DUT1 is tested with ${nic_name}. | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ | ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ @@ -85,12 +84,15 @@ | ${n_hosts}= | ${65536} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4tcp-65536h -| ${cps}= | ${4128768} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${4} +| ${packets_per_transaction_aggregated}= | ${7} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h +| ${transaction_type}= | tcp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +111,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +120,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +133,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr @@ -146,39 +147,3 @@ | 64B-4c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4tcp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot new file mode 100644 index 0000000000..faa9aaae99 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | TCP | TCP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4tcp-nat44ed-h65536-p63-s4128768-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight TCP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, TCP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${16} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${16} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.63 +| ${out_mask}= | ${26} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${11} +| ${transaction_scale}= | ${n_sessions} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4tcp-${n_hosts}h-pps +| ${transaction_type}= | tcp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4tcp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-cps-ndrpdr.robot index c107d3e8f3..77d3ee210c 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-h1024-p63-s64512 +| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | IP4BASE | DRV_VFIO_PCI +| ... | UDP | UDP_CPS | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h1024-p63-s64512-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,7 +26,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty UDP transactions with IPv4 routing* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -57,12 +57,14 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-1024h -| ${cps}= | ${64512} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +82,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +91,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +99,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${22} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-1c-ethip4udp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-2c-ethip4udp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr +| 64B-4c-ethip4udp-ip4base-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot new file mode 100644 index 0000000000..d27b1bda85 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h1024-p63-s64512-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /22 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${22} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-cps-ndrpdr.robot index eec0cfcef6..74f34b64f7 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-h16384-p63-s1032192 +| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | IP4BASE | DRV_VFIO_PCI +| ... | UDP | UDP_CPS | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h16384-p63-s1032192-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,7 +26,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty UDP transactions with IPv4 routing* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -57,12 +57,14 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-16384h -| ${cps}= | ${1032192} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +82,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +91,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +99,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${18} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-1c-ethip4udp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-2c-ethip4udp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr +| 64B-4c-ethip4udp-ip4base-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot new file mode 100644 index 0000000000..3510c84f9c --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h16384-p63-s1032192-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| Documentation | *PPS on lightweight UDP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 +| ... | routing and two static IPv4 /18 route entries. DUT1 tested with +| ... | ${nic_name}.\ +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile +| ... | contains two L3 flow-groups (flow-group per direction, 253 flows per +| ... | flow-group) with all packets containing Ethernet header, IPv4 header +| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC +| ... | addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${18} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-cps-ndrpdr.robot index 64c0013955..44b7740f5c 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-h262144-p63-s16515072 +| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | IP4BASE | DRV_VFIO_PCI +| ... | UDP | UDP_CPS | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h262144-p63-s16515072-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,7 +26,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty UDP transactions with IPv4 routing* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -57,12 +57,14 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-262144h -| ${cps}= | ${16515072} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +82,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +91,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +99,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 172.16.0.0 | 20.16.0.0 | ${14} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-1c-ethip4udp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-2c-ethip4udp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr +| 64B-4c-ethip4udp-ip4base-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot new file mode 100644 index 0000000000..7a80bf07d5 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h262144-p63-s16515072-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| Documentation | *PPS on lightweight UDP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 +| ... | routing and two static IPv4 /14 route entries. DUT1 tested with +| ... | ${nic_name}.\ +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile +| ... | contains two L3 flow-groups (flow-group per direction, 253 flows per +| ... | flow-group) with all packets containing Ethernet header, IPv4 header +| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC +| ... | addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 172.16.0.0 | 20.16.0.0 | ${14} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-cps-ndrpdr.robot index 76bf239508..4226656f14 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-h4096-p63-s258048 +| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | IP4BASE | DRV_VFIO_PCI +| ... | UDP | UDP_CPS | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h4096-p63-s258048-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,7 +26,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty UDP transactions with IPv4 routing* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -57,12 +57,14 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-4096h -| ${cps}= | ${258048} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +82,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +91,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +99,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${20} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-1c-ethip4udp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-2c-ethip4udp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr +| 64B-4c-ethip4udp-ip4base-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot new file mode 100644 index 0000000000..314b6fcf48 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h4096-p63-s258048-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| Documentation | *PPS on lightweight UDP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 +| ... | routing and two static IPv4 /20 route entries. DUT1 tested with +| ... | ${nic_name}.\ +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile +| ... | contains two L3 flow-groups (flow-group per direction, 253 flows per +| ... | flow-group) with all packets containing Ethernet header, IPv4 header +| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC +| ... | addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${20} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-cps-ndrpdr.robot index 1807b880f4..301f7643b1 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-cps-ndrpdr.robot @@ -15,9 +15,9 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-h65536-p63-s4128768 +| ... | NIC_Intel-X710 | ETH | IP4FWD | SCALE | IP4BASE | DRV_VFIO_PCI +| ... | UDP | UDP_CPS | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h65536-p63-s4128768-cps | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -26,7 +26,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* +| Documentation | *CPS on empty UDP transactions with IPv4 routing* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -57,12 +57,14 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L7 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-65536h -| ${cps}= | ${4128768} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -80,7 +82,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -90,7 +91,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Apply startup configuration on all VPP DUTs @@ -98,53 +99,17 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding in circular topology | | ... | 192.168.0.0 | 20.0.0.0 | ${16} -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-1c-ethip4udp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-2c-ethip4udp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr +| 64B-4c-ethip4udp-ip4base-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot new file mode 100644 index 0000000000..480bbc38e1 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr.robot @@ -0,0 +1,116 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h65536-p63-s4128768-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance +| +| Test Template | Local Template +| +| Documentation | *PPS on lightweight UDP transactions with IPv4 routing* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 +| ... | routing and two static IPv4 /16 route entries. DUT1 tested with +| ... | ${nic_name}.\ +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile +| ... | contains two L3 flow-groups (flow-group per direction, 253 flows per +| ... | flow-group) with all packets containing Ethernet header, IPv4 header +| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC +| ... | addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${transaction_scale}= | ${${n_hosts} * ${n_ports}} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs IPv4 routing config.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding in circular topology +| | ... | 192.168.0.0 | 20.0.0.0 | ${16} +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot index 12f62d94c4..b1e4c301d1 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sf-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot index 44d3dc0a1b..c3a379fbfa 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl1sl-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot index 4189c071be..eb5c01401d 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sf-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot index 92ad87b6ab..e44edae3ba 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-iacl50sl-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot index 90877e7840..dc50eb132a 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sf-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot index 6a675f6e22..c74eb51e1c 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-oacl50sl-10kflows-ndrpdr.robot @@ -73,7 +73,7 @@ | ${port_step}= | ${1} | ${trex_stream1_subnet}= | 10.10.10.0/24 | ${trex_stream2_subnet}= | 20.20.20.0/24 -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-2n-ethip4udp-10u1000p-conc *** Keywords *** 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 6a695b8248..2081521661 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 @@ -18,7 +18,7 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | BASE | DRV_VFIO_PCI +| ... | BASE | UDP | UDP_BIDIR | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h1-p1-s1 | 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 e0268934cf..02942194e3 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 @@ -16,8 +16,8 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | SCALE | DRV_VFIO_PCI -| ... | SRC_USER_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | SCALE | HOSTS_1024 | UDP | UDP_BIDIR | DRV_VFIO_PCI +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h1024-p63-s64512 | | Suite Setup | Setup suite topology interfaces | performance 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 30ee082baa..90a1053c9e 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 @@ -16,7 +16,7 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | SRC_USER_16384 | SCALE | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | UDP | UDP_BIDIR | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h16384-p63-s1032192 | 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 62ce9b4b1c..913f8b353b 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 @@ -16,7 +16,7 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | SRC_USER_262144 | SCALE | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | UDP | UDP_BIDIR | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h262144-p63-s16515072 | @@ -79,6 +79,8 @@ | ${n_hosts}= | ${262144} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} # Ramp-up settings | ${ramp_up_rate}= | ${200000} | ${ramp_up_duration}= | ${82.8} 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 0b1d3f7865..2e11408323 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 @@ -16,7 +16,7 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | SRC_USER_4096 | SCALE | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | UDP | UDP_BIDIR | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h4096-p63-s258048 | @@ -82,7 +82,7 @@ # Ramp-up settings | ${ramp_up_rate}= | ${400000} | ${ramp_up_duration}= | ${1.6} -# Traffic profil +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p *** Keywords *** 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 041bc21839..7a5bb3f271 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 @@ -16,7 +16,7 @@ | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR | ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC -| ... | SRC_USER_65536 | SCALE | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | UDP | UDP_BIDIR | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44det-h65536-p63-s4128758 | @@ -79,6 +79,8 @@ | ${n_hosts}= | ${65536} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} # Ramp-up settings | ${ramp_up_rate}= | ${200000} | ${ramp_up_duration}= | ${23.5} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot index cfdcfac9ce..8c75a57723 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_1024 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h1024-p63-s64512-cps | @@ -29,8 +29,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty UDP transactions with NAT44ED* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -85,12 +84,11 @@ | ${n_hosts}= | ${1024} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-1024h -| ${cps}= | ${64512} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +107,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +116,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +129,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr @@ -146,39 +143,3 @@ | 64B-4c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-nat44ed-h1024-p63-s64512-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot new file mode 100644 index 0000000000..a279d4b176 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-nat44ed-h1024-p63-s64512-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${22} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${22} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.0 +| ${out_mask}= | ${32} +# Scale settings +| ${n_hosts}= | ${1024} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-nat44ed-h1024-p63-s64512-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-udir-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-udir-ndrpdr.robot index 89ba6e4c9d..0119ea1807 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-udir-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h1024-p63-s64512-udir-ndrpdr.robot @@ -15,8 +15,8 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_UDIR +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_1024 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h1024-p63-s64512-udir | @@ -86,8 +86,9 @@ # Ramp-up settings | ${ramp_up_rate}= | ${500000} | ${ramp_up_duration}= | ${1} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p-udir +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -123,7 +124,6 @@ | | Then Send ramp-up traffic | | And Verify NAT44 UDP sessions number on DUT1 node | | And Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h1024-p63-s64512-udir-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot index 7ecdf09e44..55a2077f20 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_16384 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h16384-p63-s1032192-cps | @@ -29,8 +29,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty UDP transactions with NAT44ED* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -85,12 +84,11 @@ | ${n_hosts}= | ${16384} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-16384h -| ${cps}= | ${1032192} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +107,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +116,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +129,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr @@ -146,39 +143,3 @@ | 64B-4c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-nat44ed-h16384-p63-s1032192-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot new file mode 100644 index 0000000000..547e2f5024 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_16384 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-nat44ed-h16384-p63-s1032192-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${18} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${18} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.15 +| ${out_mask}= | ${28} +# Scale settings +| ${n_hosts}= | ${16384} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-nat44ed-h16384-p63-s1032192-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-udir-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-udir-ndrpdr.robot index 0f421e3687..8584398646 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-udir-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h16384-p63-s1032192-udir-ndrpdr.robot @@ -15,8 +15,8 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_UDIR +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_16384 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h16384-p63-s1032192-udir | @@ -86,8 +86,9 @@ # Ramp-up settings | ${ramp_up_rate}= | ${500000} | ${ramp_up_duration}= | ${4.5} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p-udir +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -123,7 +124,6 @@ | | Then Send ramp-up traffic | | And Verify NAT44 UDP sessions number on DUT1 node | | And Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h16384-p63-s1032192-udir-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot index cf40a03d00..aa0ca1a757 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_262144 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h262144-p63-s16515072-cps | @@ -29,8 +29,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty UDP transactions with NAT44ED* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -85,12 +84,13 @@ | ${n_hosts}= | ${262144} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-262144h -| ${cps}= | ${16515072} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +109,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +118,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +131,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr @@ -146,39 +145,3 @@ | 64B-4c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-nat44ed-h262144-p63-s16515072-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot new file mode 100644 index 0000000000..6cc6d294d9 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | UD | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_262144 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-nat44ed-h262144-p63-s16515072-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.16.0.0 +| ${dest_mask}= | ${14} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 172.16.0.0 +| ${in_mask}= | ${14} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.255 +| ${out_mask}= | ${24} +# Scale settings +| ${n_hosts}= | ${262144} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${33} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-nat44ed-h262144-p63-s16515072-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-udir-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-udir-ndrpdr.robot index 9f17649ce0..76361dbf9d 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-udir-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h262144-p63-s16515072-udir-ndrpdr.robot @@ -15,8 +15,8 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_UDIR +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_262144 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h262144-p63-s16515072-udir | @@ -83,13 +83,14 @@ | ${n_hosts}= | ${262144} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Main heap size multiplicator +| ${heap_size_mult}= | ${7} # Ramp-up settings | ${ramp_up_rate}= | ${500000} | ${ramp_up_duration}= | ${72.7} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p-udir -# Main heap size multiplicator -| ${heap_size_mult}= | ${3} +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -125,7 +126,6 @@ | | Then Send ramp-up traffic | | And Verify NAT44 UDP sessions number on DUT1 node | | And Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h262144-p63-s16515072-udir-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot index 98a00a655d..efce02da2e 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_4096 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h4096-p63-s258048-cps | @@ -29,8 +29,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty UDP transactions with NAT44ED* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -85,12 +84,11 @@ | ${n_hosts}= | ${4096} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-4096h -| ${cps}= | ${258048} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +107,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +116,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +129,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr @@ -146,39 +143,3 @@ | 64B-4c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-nat44ed-h4096-p63-s258048-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot new file mode 100644 index 0000000000..c1c5ce6314 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr.robot @@ -0,0 +1,140 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_4096 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-nat44ed-h4096-p63-s258048-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${20} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${20} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.3 +| ${out_mask}= | ${20} +# Scale settings +| ${n_hosts}= | ${4096} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${33} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-nat44ed-h4096-p63-s258048-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-udir-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-udir-ndrpdr.robot index b201e36cfe..4c7015bf43 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-udir-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h4096-p63-s258048-udir-ndrpdr.robot @@ -15,8 +15,8 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_UDIR +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_4096 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h4096-p63-s258048-udir | @@ -86,8 +86,9 @@ # Ramp-up settings | ${ramp_up_rate}= | ${500000} | ${ramp_up_duration}= | ${1.1} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p-udir +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -123,7 +124,6 @@ | | Then Send ramp-up traffic | | And Verify NAT44 UDP sessions number on DUT1 node | | And Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h4096-p63-s258048-udir-ndrpdr diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot index bdd0ce5164..981d141f5a 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr.robot @@ -17,8 +17,8 @@ | Resource | resources/libraries/robot/shared/traffic.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_CPS +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_65536 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h65536-p63-s4128768-cps | @@ -29,8 +29,7 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode -| ... | performance test cases* +| Documentation | *CPS on empty UDP transactions with NAT44ED* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -85,12 +84,13 @@ | ${n_hosts}= | ${65536} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} -# Traffic profile: -| ${traffic_profile}= | trex-astf-ethip4udp-65536h -| ${cps}= | ${4128768} -# Trial data overwrite -| ${trial_duration}= | ${1.1} -| ${trial_multiplicity}= | ${1} +| ${transaction_scale}= | ${n_sessions} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h +| ${transaction_type}= | udp_cps +| ${disable_latency}= | ${True} *** Keywords *** | Local Template @@ -109,7 +109,6 @@ | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} | | | | Set Test Variable | \${frame_size} -| | Set Test Variable | \${max_rate} | ${cps} | | ${pre_stats}= | Create List | | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog | | ... | vpp-clear-runtime @@ -119,7 +118,7 @@ | | ... | vpp-show-runtime | | Set Test Variable | ${post_stats} | | -| | Given Set Jumbo +| | Given Set Max Rate And Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} | | And Add NAT to all DUTs | nat_mode=${nat_mode} @@ -132,7 +131,7 @@ | | And Initialize layer interface | | And Initialize IPv4 forwarding for NAT44 in circular topology | | And Initialize NAT44 endpoint-dependent mode in circular topology -| | Then Find NDR and PDR intervals using optimized search | latency=${False} +| | Then Find NDR and PDR intervals using optimized search *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr @@ -146,39 +145,3 @@ | 64B-4c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} - -| 1518B-1c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 1C -| | frame_size=${1518} | phy_cores=${1} - -| 1518B-2c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 2C -| | frame_size=${1518} | phy_cores=${2} - -| 1518B-4c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 1518B | 4C -| | frame_size=${1518} | phy_cores=${4} - -| 9000B-1c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 1C -| | frame_size=${9000} | phy_cores=${1} - -| 9000B-2c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 2C -| | frame_size=${9000} | phy_cores=${2} - -| 9000B-4c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | 9000B | 4C -| | frame_size=${9000} | phy_cores=${4} - -| IMIX-1c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 1C -| | frame_size=IMIX_v4_1 | phy_cores=${1} - -| IMIX-2c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 2C -| | frame_size=IMIX_v4_1 | phy_cores=${2} - -| IMIX-4c-ethip4udp-nat44ed-h65536-p63-s4128768-cps-ndrpdr -| | [Tags] | IMIX | 4C -| | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot new file mode 100644 index 0000000000..4065da9623 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2020 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| +| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR +| ... | NIC_Intel-X710 | ETH | IP4FWD | NAT44 | UDP | UDP_PPS | DRV_VFIO_PCI +| ... | SCALE | HOSTS_65536 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-nat44ed-h65536-p63-s4128768-pps +| +| Suite Setup | Setup suite topology interfaces | performance +| Suite Teardown | Tear down suite | performance +| Test Setup | Setup test | performance +| Test Teardown | Tear down test | performance | nat-ed +| +| Test Template | Local Template +| +| # TODO CSIT-1765: Unify suite Documentation. +| Documentation | *PPS on lightweight UDP transactions with NAT44ED* +| +| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\ +| ... | with single links between nodes. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing. +| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4\ +| ... | routing and two static IPv4 /24 route entries. DUT1 tested with\ +| ... | ${nic_name}. +| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\ +| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\ +| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\ +| ... | of packets transmitted. NDR and PDR are discovered for different\ +| ... | Ethernet L2 frame sizes using MLRsearch library.\ +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contains client and server ASTF programs, generating packets containing\ +| ... | Ethernet header, IPv4 header, UDP header and static payload.\ +| ... | MAC addresses are matching MAC addresses of the TG node interfaces. +| ... | *[Ref] Applicable standard specifications:* RFC2544. + +*** Variables *** +| @{plugins_to_enable}= | dpdk_plugin.so | nat_plugin.so +| ${crypto_type}= | ${None} +| ${nic_name}= | Intel-X710 +| ${nic_driver}= | vfio-pci +| ${nic_rxq_size}= | 0 +| ${nic_txq_size}= | 0 +| ${nic_pfs}= | 2 +| ${nic_vfs}= | 0 +| ${osi_layer}= | L7 +| ${overhead}= | ${0} +# IP settings +| ${tg_if1_ip4}= | 10.0.0.2 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 12.0.0.2 +| ${tg_if2_mask}= | ${20} +| ${dut1_if1_ip4}= | 10.0.0.1 +| ${dut1_if1_mask}= | ${24} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${24} +| ${dest_net}= | 20.0.0.0 +| ${dest_mask}= | ${16} +# NAT settings +| ${nat_mode}= | endpoint-dependent +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${16} +| ${out_net}= | 68.142.68.0 +| ${out_net_end}= | 68.142.68.63 +| ${out_mask}= | ${26} +# Scale settings +| ${n_hosts}= | ${65536} +| ${n_ports}= | ${63} +| ${n_sessions}= | ${${n_hosts} * ${n_ports}} +| ${transaction_scale}= | ${n_sessions} +| ${packets_per_transaction_and_direction}= | ${33} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} +# Traffic profile +| ${traffic_profile}= | trex-astf-ethip4udp-${n_hosts}h-pps +| ${transaction_type}= | udp_pps +| ${disable_latency}= | ${True} + +*** Keywords *** +| Local Template +| | [Documentation] +| | ... | [Cfg] DUT runs NAT44 ${nat_mode} configuration.\ +| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads. +| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\ +| | +| | ... | *Arguments:* +| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1). +| | ... | Type: integer, string +| | ... | - phy_cores - Number of physical cores. Type: integer +| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer +| | +| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None} +| | +| | Set Test Variable | \${frame_size} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-runtime +| | Set Test Variable | ${pre_stats} +| | ${post_stats}= | Create List +| | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog +| | ... | vpp-show-runtime +| | Set Test Variable | ${post_stats} +| | +| | Given Set Max Rate And Jumbo +| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} +| | And Pre-initialize layer driver | ${nic_driver} +| | And Add NAT to all DUTs | nat_mode=${nat_mode} +| | ${max_translations_per_thread}= | Compute Max Translations Per Thread +| | ... | ${n_sessions} | ${thr_count_int} +| | And Add NAT max translations per thread to all DUTs +| | ... | ${max_translations_per_thread} +| | And Apply startup configuration on all VPP DUTs +| | When Initialize layer driver | ${nic_driver} +| | And Initialize layer interface +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 endpoint-dependent mode in circular topology +| | Then Find NDR and PDR intervals using optimized search + +*** Test Cases *** +| 64B-1c-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-nat44ed-h65536-p63-s4128768-pps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-udir-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-udir-ndrpdr.robot index dfc88b375b..b0c75cf672 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-udir-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-nat44ed-h65536-p63-s4128768-udir-ndrpdr.robot @@ -15,8 +15,8 @@ | Resource | resources/libraries/robot/shared/default.robot | | Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR -| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP_SYN -| ... | NAT44_ENDPOINT_DEPENDENT | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | UDP | UDP_UDIR +| ... | NAT44_ENDPOINT_DEPENDENT | SCALE | HOSTS_65536 | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 | ... | ethip4udp-nat44ed-h65536-p63-s4128768-udir | @@ -83,13 +83,14 @@ | ${n_hosts}= | ${65536} | ${n_ports}= | ${63} | ${n_sessions}= | ${${n_hosts} * ${n_ports}} +# Main heap size multiplicator +| ${heap_size_mult}= | ${2} # Ramp-up settings | ${ramp_up_rate}= | ${500000} | ${ramp_up_duration}= | ${18.2} -# Traffic profile: +# Traffic profile | ${traffic_profile}= | trex-stl-ethip4udp-${n_hosts}u${n_ports}p-udir -# Main heap size multiplicator -| ${heap_size_mult}= | ${2} +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -125,7 +126,6 @@ | | Then Send ramp-up traffic | | And Verify NAT44 UDP sessions number on DUT1 node | | And Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4udp-nat44ed-h65536-p63-s4128768-udir-ndrpdr diff --git a/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-l3dsr-ndrpdr.robot b/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-l3dsr-ndrpdr.robot index f5e02f25f7..ec4570a44d 100644 --- a/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-l3dsr-ndrpdr.robot +++ b/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-l3dsr-ndrpdr.robot @@ -59,6 +59,7 @@ | ${overhead}= | ${0} # Traffic profile: | ${traffic_profile}= | trex-stl-2n-ethip4udp-lb +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -85,7 +86,6 @@ | | And Initialize layer interface | | And Initialize loadbalancer l3dsr | | Then Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4-loadbalancer-l3dsr-ndrpdr diff --git a/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-maglev-ndrpdr.robot b/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-maglev-ndrpdr.robot index 66e047d691..dff2536f20 100644 --- a/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-maglev-ndrpdr.robot +++ b/tests/vpp/perf/lb/2n1l-10ge2p1x710-ethip4-loadbalancer-maglev-ndrpdr.robot @@ -59,6 +59,7 @@ | ${overhead}= | ${0} # Traffic profile: | ${traffic_profile}= | trex-stl-2n-ethip4udp-lb +| ${traffic_directions}= | ${1} *** Keywords *** | Local Template @@ -85,7 +86,6 @@ | | And Initialize layer interface | | And Initialize loadbalancer maglev | | Then Find NDR and PDR intervals using optimized search -| | ... | traffic_directions=${1} *** Test Cases *** | 64B-1c-ethip4-loadbalancer-maglev-ndrpdr |