From ff1f49d9ba97ddfee3229907e3a344503e072578 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Thu, 6 Aug 2020 03:34:31 +0200 Subject: [PATCH] Perf: NAT44 endpoint-dependent mode - udp, part I - continuation of https://gerrit.fd.io/r/c/csit/+/26898 as there was reached limit of changes (1000) Jira: CSIT-1711 - udp synthetic profiles w/o data packets - udp cps perf tests, phase I (no special "search cps" KW) Part I means that we are using MRR tests to collect traffic data until there is ready new CPS test type with corresponding algorithm. Change-Id: I0d30feb9ecf1d0bff937152656f8eb422f831378 Signed-off-by: Jan Gelety --- GPL/tools/trex/trex_astf_profile.py | 87 +++++++++- GPL/tools/trex/trex_astf_stop.py | 49 ------ .../trex/profile_trex_astf_base_class.py | 2 +- .../trex/trex-astf-ethip4udp-1024h.py | 15 +- .../trex/trex-astf-ethip4udp-16384h.py | 130 +++++++++++++++ .../trex/trex-astf-ethip4udp-262144h.py | 130 +++++++++++++++ .../trex/trex-astf-ethip4udp-4096h.py | 130 +++++++++++++++ .../trex/trex-astf-ethip4udp-65536h.py | 130 +++++++++++++++ .../trex/trex-sl-2n-ethip4udp-1u1p.py | 10 +- resources/api/vpp/supported_crcs.yaml | 16 ++ resources/libraries/python/Constants.py | 6 +- resources/libraries/python/IPUtil.py | 18 +++ resources/libraries/python/NATUtil.py | 148 +++++++++++++---- resources/libraries/python/TrafficGenerator.py | 77 +++++++-- resources/libraries/python/VppConfigGenerator.py | 13 +- resources/libraries/robot/ip/ip4.robot | 13 +- resources/libraries/robot/ip/nat.robot | 127 +++++++-------- .../robot/performance/performance_limits.robot | 88 ++++++++-- .../robot/performance/performance_utils.robot | 158 +++++++++++------- resources/libraries/robot/shared/default.robot | 101 +++++++----- .../libraries/robot/shared/test_teardown.robot | 11 ++ tests/dpdk/perf/__init__.robot | 3 +- tests/vpp/perf/__init__.robot | 3 +- ...thip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot} | 77 +++++---- ...ip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot | 150 +++++++++++++++++ ...4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot | 150 +++++++++++++++++ ...thip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot | 150 +++++++++++++++++ ...ip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot | 150 +++++++++++++++++ ...p1x710-ethip4udp-ip4base-nat44-ei-ndrpdr.robot} | 56 ++++--- ...dp-ip4base-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...4scale1024-udpsrcscale63-nat44-ei-ndrpdr.robot} | 63 ++++---- ...ale1048576-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...scale16384-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...p4scale238-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...cale262144-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...4scale4096-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...scale65536-udpsrcscale63-nat44-ei-ndrpdr.robot} | 61 +++---- ...4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr.robot | 179 +++++++++++++++++++++ ...p-snat44ed-h16384-p63-s1032192-cps-ndrpdr.robot | 179 +++++++++++++++++++++ ...snat44ed-h262144-p63-s16515072-cps-ndrpdr.robot | 179 +++++++++++++++++++++ ...udp-snat44ed-h4096-p63-s258048-cps-ndrpdr.robot | 179 +++++++++++++++++++++ ...p-snat44ed-h65536-p63-s4128768-cps-ndrpdr.robot | 179 +++++++++++++++++++++ 42 files changed, 2998 insertions(+), 585 deletions(-) create mode 100644 GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py create mode 100644 GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py create mode 100644 GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py create mode 100644 GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot} (62%) create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ei-ndrpdr.robot} (75%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr.robot} (76%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr.robot} (74%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr.robot} (74%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr.robot} (75%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr.robot} (75%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr.robot} (75%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr.robot} (75%) rename tests/vpp/perf/ip4/{2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr.robot => 2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr.robot} (75%) create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr.robot create mode 100644 tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr.robot diff --git a/GPL/tools/trex/trex_astf_profile.py b/GPL/tools/trex/trex_astf_profile.py index ed0b8fc0b3..2bdb8d3db4 100644 --- a/GPL/tools/trex/trex_astf_profile.py +++ b/GPL/tools/trex/trex_astf_profile.py @@ -181,6 +181,17 @@ def simple_burst( latency_pps=mult 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. @@ -190,20 +201,21 @@ 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 + ) # 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 ) - # Sample the stats. - stats[time.monotonic()-time_start] = client.get_stats( - ports=ports - ) else: # Read the stats after the test - stats[time.monotonic()-time_start] = client.get_stats( - ports=ports - ) + stats[time.monotonic()-time_start] = \ + client.get_stats(ports=ports) if client.get_warnings(): for warning in client.get_warnings(): @@ -245,18 +257,37 @@ def simple_burst( stats[port_0][u"ipackets"] + stats[port_1][u"ipackets"] client_stats = stats[u"traffic"][u"client"] server_stats = stats[u"traffic"][u"server"] + # Some zero counters are not sent # Active and established flows UDP/TCP # Client 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}, " + # 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}, " + # 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}, " + # 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}, " # 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}, " - # Some zero counters are not sent + 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}, " if u"udp" in profile_file: # Client # Established connections @@ -265,6 +296,21 @@ def simple_burst( # Closed connections c_udp_closed = client_stats.get(u"udps_closed", 0) 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}, " + # Sent packets + c_udp_sndpkt = client_stats.get(u"udps_sndpkt", 0) + 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}, " + # Received packets + c_udp_rcvpkt = client_stats.get(u"udps_rcvpkt", 0) + 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}, " # Server # Accepted connections s_udp_accepts = server_stats.get(u"udps_accepts", 0) @@ -272,6 +318,18 @@ def simple_burst( # Closed connections s_udp_closed = server_stats.get(u"udps_closed", 0) 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}, " + # Sent packets + s_udp_sndpkt = server_stats.get(u"udps_sndpkt", 0) + 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}, " + # Received packets + s_udp_rcvpkt = server_stats.get(u"udps_rcvpkt", 0) + l7_data += f"server_udp_rx_packets={s_udp_rcvpkt}, " elif u"tcp" in profile_file: # Client # Initiated connections @@ -283,6 +341,12 @@ def simple_burst( # Closed connections c_tcp_closed = client_stats.get(u"tcps_closed", 0) 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}, " + # Received bytes + c_tcp_rcvbyte = client_stats.get(u"tcps_rcvbyte", 0) + l7_data += f"client_tcp_rx_bytes={c_tcp_rcvbyte}, " # Server # Accepted connections s_tcp_accepts = server_stats.get(u"tcps_accepts", 0) @@ -293,6 +357,12 @@ def simple_burst( # Closed connections s_tcp_closed = server_stats.get(u"tcps_closed", 0) 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}, " + # Received bytes + s_tcp_rcvbyte = server_stats.get(u"tcps_rcvbyte", 0) + 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"] @@ -313,6 +383,7 @@ 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}, " diff --git a/GPL/tools/trex/trex_astf_stop.py b/GPL/tools/trex/trex_astf_stop.py index be13e8ed42..c216e531ab 100644 --- a/GPL/tools/trex/trex_astf_stop.py +++ b/GPL/tools/trex/trex_astf_stop.py @@ -87,54 +87,6 @@ def main(): tx_1, rx_1 = xstats1[u"tx_good_packets"], xstats1[u"rx_good_packets"] lost_a, lost_b = tx_0 - rx_1, tx_1 - rx_0 - client_stats = xstats0[u"traffic"][u"client"] - server_stats = xstats1[u"traffic"][u"server"] - # Active and established flows UDP/TCP - # Client - c_act_flows = client_stats[u"m_active_flows"] - c_est_flows = client_stats[u"m_est_flows"] - l7_data = f"client_active_flows={c_act_flows}, " - l7_data += f"client_established_flows={c_est_flows}, " - # Server - s_act_flows = server_stats[u"m_active_flows"] - s_est_flows = server_stats[u"m_est_flows"] - l7_data += f"server_active_flows={s_act_flows}, " - l7_data += f"server_established_flows={s_est_flows}, " - # Some zero counters are not sent - # Client - # Established connections - c_udp_connects = client_stats.get(u"udps_connects", 0) - 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}, " - # Server - # Accepted connections - s_udp_accepts = server_stats.get(u"udps_accepts", 0) - l7_data += f"server_udp_accepts={s_udp_accepts}, " - # Closed connections - s_udp_closed = server_stats.get(u"udps_closed", 0) - # Client - # Initiated connections - c_tcp_connatt = client_stats.get(u"tcps_connattempt", 0) - l7_data += f"client_tcp_connect_inits={c_tcp_connatt}, " - # Established connections - c_tcp_connects = client_stats.get(u"tcps_connects", 0) - 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}, " - # Server - # Accepted connections - s_tcp_accepts = server_stats.get(u"tcps_accepts", 0) - 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}, " - # Closed connections - s_tcp_closed = server_stats.get(u"tcps_closed", 0) - l7_data += f"server_tcp_closed={s_tcp_closed}, " - print(f"packets lost from 0 --> 1: {lost_a} pkts") print(f"packets lost from 1 --> 0: {lost_b} pkts") @@ -146,7 +98,6 @@ def main(): 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"{l7_data}" ) diff --git a/GPL/traffic_profiles/trex/profile_trex_astf_base_class.py b/GPL/traffic_profiles/trex/profile_trex_astf_base_class.py index ed28ccbb78..b013e8a480 100644 --- a/GPL/traffic_profiles/trex/profile_trex_astf_base_class.py +++ b/GPL/traffic_profiles/trex/profile_trex_astf_base_class.py @@ -71,7 +71,7 @@ class TrafficProfileBaseClass: # TODO: Add support for IMIX frame size; # use random.randrange(0, len(self.STREAM_TABLE[self.framesize])) ? if not required_length: - required_length = self.framesize + required_length = self.framesize return str(choices(ascii_letters, k=required_length - current_length)) diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py index a010fe1613..c2a004bc52 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py @@ -53,6 +53,9 @@ class TrafficProfile(TrafficProfileBaseClass): # Headers length 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) + def define_profile(self): """Define profile to be used by advanced stateful traffic generator. @@ -67,12 +70,22 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - prog_c.send_msg(self.udp_req) # size and fill not supported in v2.73 + # 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) # 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) # ip generators diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py new file mode 100644 index 0000000000..bf1ac295e7 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-16384h.py @@ -0,0 +1,130 @@ +# 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): + """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" + + # UDP messages + self.udp_req = u"GET" + self.udp_res = u"ACK" + + # Headers length + 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) + + 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 ASTFProfile(). + :rtype: tuple + """ + self.udp_req += self._gen_padding(self.headers_size + len(self.udp_req)) + self.udp_res += self._gen_padding(self.headers_size + len(self.udp_res)) + + # 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) + + # 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) + + # 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-ethip4udp-262144h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py new file mode 100644 index 0000000000..43ca0cba48 --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py @@ -0,0 +1,130 @@ +# 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): + """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" + + # UDP messages + self.udp_req = u"GET" + self.udp_res = u"ACK" + + # Headers length + 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) + + 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 ASTFProfile(). + :rtype: tuple + """ + self.udp_req += self._gen_padding(self.headers_size + len(self.udp_req)) + self.udp_res += self._gen_padding(self.headers_size + len(self.udp_res)) + + # 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) + + # 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) + + # 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-ethip4udp-4096h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py new file mode 100644 index 0000000000..ff26b3bdaa --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-4096h.py @@ -0,0 +1,130 @@ +# 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): + """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" + + # UDP messages + self.udp_req = u"GET" + self.udp_res = u"ACK" + + # Headers length + 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) + + 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 ASTFProfile(). + :rtype: tuple + """ + self.udp_req += self._gen_padding(self.headers_size + len(self.udp_req)) + self.udp_res += self._gen_padding(self.headers_size + len(self.udp_res)) + + # 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) + + # 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) + + # 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-ethip4udp-65536h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py new file mode 100644 index 0000000000..b6324f34fe --- /dev/null +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-65536h.py @@ -0,0 +1,130 @@ +# 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): + """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" + + # UDP messages + self.udp_req = u"GET" + self.udp_res = u"ACK" + + # Headers length + 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) + + 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 ASTFProfile(). + :rtype: tuple + """ + self.udp_req += self._gen_padding(self.headers_size + len(self.udp_req)) + self.udp_res += self._gen_padding(self.headers_size + len(self.udp_res)) + + # 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) + + # 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) + + # 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-sl-2n-ethip4udp-1u1p.py b/GPL/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py index a892ec8822..4f96ffe342 100644 --- a/GPL/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py +++ b/GPL/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py @@ -18,11 +18,11 @@ Stream profile: - Packet: ETH / IP / UDP - Direction 0 --> 1: - Source IP address range: 20.0.0.0 - - Destination IP address range: 12.0.0.2 + - Destination IP address range: 30.0.0.0 - Source UDP port range: 1024 - Destination UDP port range: 1024 - Direction 1 --> 0: - - Source IP address range: 12.0.0.2 + - Source IP address range: 30.0.0.0 - Destination IP address range: 200.0.0.0 - Source UDP port range: 1024 - Destination UDP port range: 1028 @@ -42,9 +42,9 @@ class TrafficStreams(TrafficStreamsBaseClass): # IPs used in packet headers. self.p1_src_ip = u"20.0.0.0" - self.p1_dst_ip = u"12.0.0.2" + self.p1_dst_ip = u"30.0.0.0" - self.p2_src_ip = u"12.0.0.2" + self.p2_src_ip = u"30.0.0.0" self.p2_dst_ip = u"200.0.0.0" # UDP ports used in packet headers. @@ -52,7 +52,7 @@ class TrafficStreams(TrafficStreamsBaseClass): self.p1_dst_udp_port = 1024 self.p2_src_udp_port = 1024 - self.p2_dst_udp_port = 1028 + self.p2_dst_udp_port = 2048 def define_packets(self): """Defines the packets to be sent from the traffic generator. diff --git a/resources/api/vpp/supported_crcs.yaml b/resources/api/vpp/supported_crcs.yaml index 57db243b18..f616a94e5e 100644 --- a/resources/api/vpp/supported_crcs.yaml +++ b/resources/api/vpp/supported_crcs.yaml @@ -175,12 +175,28 @@ memif_dump: '0x51077d14' # dev memif_socket_filename_add_del: '0xa2ce1a10' # dev memif_socket_filename_add_del_reply: '0xe8d4e804' # dev + nat44_add_del_address_range: '0xd4c7568c' # perf + nat44_add_del_address_range_reply: '0xe8d4e804' # perf + nat44_address_details: '0x45410ac4' # perf teardown + nat44_address_dump: '0x51077d14' # perf teardown nat44_interface_add_del_feature: '0xf3699b83' # perf nat44_interface_add_del_feature_reply: '0xe8d4e804' # perf + nat44_interface_addr_details: '0x3e687514' # perf teardown + nat44_interface_addr_dump: '0x51077d14' # perf teardown + nat44_interface_details: '0x5d286289' # perf teardown + nat44_interface_dump: '0x51077d14' # perf teardown + nat44_static_mapping_details: '0x1a433ef7' # perf teardown + nat44_static_mapping_dump: '0x51077d14' # perf teardown + nat44_user_details: '0x355896c2' # perf teardown + nat44_user_dump: '0x51077d14' # perf teardown + nat44_user_session_details: '0x1965fd69' # perf teardown + nat44_user_session_dump: '0xe1899c98' # perf teardown nat_det_add_del_map: '0x112fde05' # perf nat_det_add_del_map_reply: '0xe8d4e804' # perf nat_show_config: '0x51077d14' # perf teardown nat_show_config_reply: '0x7903ef06' # perf teardown + nat_worker_details: '0x84bf06fc' # perf teardown + nat_worker_dump: '0x51077d14' # perf teardown # 6x^ tc01-64B-1c-ethip4udp-ip4base-nat44-mrr # ^ nat44NOTscaleNOTsrc_user_1 nsim_configure: '0x16ed400f' # perf diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py index 90d60ad4e2..73d8b63a0b 100644 --- a/resources/libraries/python/Constants.py +++ b/resources/libraries/python/Constants.py @@ -187,13 +187,17 @@ class Constants: # TRex install directory TREX_INSTALL_DIR = u"/opt/trex-core-2.73" + # TODO: Find the right way how to use it in trex profiles + # TRex pcap files directory + TREX_PCAP_DIR = f"{TREX_INSTALL_DIR}/scripts/avl" + # TRex limit memory. TREX_LIMIT_MEMORY = get_int_from_env(u"TREX_LIMIT_MEMORY", 8192) # TRex number of cores TREX_CORE_COUNT = get_int_from_env(u"TREX_CORE_COUNT", 7) - # Trex force start regardles ports state + # Trex force start regardless ports state TREX_SEND_FORCE = get_pessimistic_bool_from_env(u"TREX_SEND_FORCE") # TRex extra commandline arguments diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py index 946f2f7b72..10a231f9df 100644 --- a/resources/libraries/python/IPUtil.py +++ b/resources/libraries/python/IPUtil.py @@ -139,6 +139,24 @@ class IPUtil: PapiSocketExecutor.run_cli_cmd(node, u"show ip6 fib") PapiSocketExecutor.run_cli_cmd(node, u"show ip6 fib summary") + @staticmethod + def vpp_get_ip_table_summary(node): + """Get IPv4 FIB table summary on a VPP node. + + :param node: VPP node. + :type node: dict + """ + PapiSocketExecutor.run_cli_cmd(node, u"show ip fib summary") + + @staticmethod + def vpp_get_ip_table(node): + """Get IPv4 FIB table on a VPP node. + + :param node: VPP node. + :type node: dict + """ + PapiSocketExecutor.run_cli_cmd(node, u"show ip fib") + @staticmethod def vpp_get_ip_tables_prefix(node, address): """Get dump of all IP FIB tables on a VPP node. diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py index 2d5c1c7b76..b43058b23f 100644 --- a/resources/libraries/python/NATUtil.py +++ b/resources/libraries/python/NATUtil.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: @@ -14,16 +14,17 @@ """NAT utilities library.""" from pprint import pformat -from socket import AF_INET, inet_pton from enum import IntEnum +from ipaddress import IPv4Address from robot.api import logger +from resources.libraries.python.Constants import Constants from resources.libraries.python.InterfaceUtil import InterfaceUtil from resources.libraries.python.PapiExecutor import PapiSocketExecutor -class NATConfigFlags(IntEnum): +class NatConfigFlags(IntEnum): """Common NAT plugin APIs""" NAT_IS_NONE = 0x00 NAT_IS_TWICE_NAT = 0x01 @@ -36,6 +37,13 @@ class NATConfigFlags(IntEnum): NAT_IS_EXT_HOST_VALID = 0x80 +class NatAddrPortAllocAlg(IntEnum): + """NAT Address and port assignment algorithms.""" + NAT_ALLOC_ALG_DEFAULT = 0 + NAT_ALLOC_ALG_MAP_E = 1 + NAT_ALLOC_ALG_PORT_RANGE = 2 + + class NATUtil: """This class defines the methods to set NAT.""" @@ -43,41 +51,42 @@ class NATUtil: pass @staticmethod - def set_nat44_interfaces(node, int_in, int_out): + def set_nat44_interface(node, interface, flag): """Set inside and outside interfaces for NAT44. :param node: DUT node. - :param int_in: Inside interface. - :param int_out: Outside interface. + :param interface: Inside interface. + :param flag: Interface NAT configuration flag name. :type node: dict - :type int_in: str - :type int_out: str + :type interface: str + :type flag: str """ cmd = u"nat44_interface_add_del_feature" - int_in_idx = InterfaceUtil.get_sw_if_index(node, int_in) - err_msg = f"Failed to set inside interface {int_in} for NAT44 " \ + err_msg = f"Failed to set {flag} interface {interface} for NAT44 " \ f"on host {node[u'host']}" args_in = dict( - sw_if_index=int_in_idx, + sw_if_index=InterfaceUtil.get_sw_if_index(node, interface), is_add=1, - flags=getattr(NATConfigFlags, u"NAT_IS_INSIDE").value + flags=getattr(NatConfigFlags, flag).value ) with PapiSocketExecutor(node) as papi_exec: papi_exec.add(cmd, **args_in).get_reply(err_msg) - int_out_idx = InterfaceUtil.get_sw_if_index(node, int_out) - err_msg = f"Failed to set outside interface {int_out} for NAT44 " \ - f"on host {node[u'host']}" - args_in = dict( - sw_if_index=int_out_idx, - is_add=1, - flags=getattr(NATConfigFlags, u"NAT_IS_OUTSIDE").value - ) + @staticmethod + def set_nat44_interfaces(node, int_in, int_out): + """Set inside and outside interfaces for NAT44. - with PapiSocketExecutor(node) as papi_exec: - papi_exec.add(cmd, **args_in).get_reply(err_msg) + :param node: DUT node. + :param int_in: Inside interface. + :param int_out: Outside interface. + :type node: dict + :type int_in: str + :type int_out: str + """ + NATUtil.set_nat44_interface(node, int_in, u"NAT_IS_INSIDE") + NATUtil.set_nat44_interface(node, int_out, u"NAT_IS_OUTSIDE") @staticmethod def set_nat44_deterministic(node, ip_in, subnet_in, ip_out, subnet_out): @@ -99,9 +108,9 @@ class NATUtil: f"on host {node[u'host']}" args_in = dict( is_add=True, - in_addr=inet_pton(AF_INET, str(ip_in)), + in_addr=IPv4Address(str(ip_in)).packed, in_plen=int(subnet_in), - out_addr=inet_pton(AF_INET, str(ip_out)), + out_addr=IPv4Address(str(ip_out)).packed, out_plen=int(subnet_out) ) @@ -109,26 +118,76 @@ class NATUtil: papi_exec.add(cmd, **args_in).get_reply(err_msg) @staticmethod - def show_nat(node): - """Show the NAT configuration and data. + def set_nat44_address_range( + node, start_ip, end_ip, vrf_id=Constants.BITWISE_NON_ZERO, + flag=u"NAT_IS_NONE"): + """Set NAT44 address range. + + :param node: DUT node. + :param start_ip: IP range start. + :param end_ip: IP range end. + :param vrf_id: VRF index (Optional). + :param flag: NAT flag name. + :type node: dict + :type start_ip: str + :type end_ip: str + :type vrf_id: int + :type flag: str + """ + cmd = u"nat44_add_del_address_range" + err_msg = f"Failed to set NAT44 address range on host {node[u'host']}" + args_in = dict( + is_add=True, + first_ip_address=IPv4Address(str(start_ip)).packed, + last_ip_address=IPv4Address(str(end_ip)).packed, + vrf_id=vrf_id, + flags=getattr(NatConfigFlags, flag).value + ) + + with PapiSocketExecutor(node) as papi_exec: + papi_exec.add(cmd, **args_in).get_reply(err_msg) + + @staticmethod + def show_nat_config(node): + """Show the NAT configuration. + + :param node: DUT node. + :type node: dict + """ + cmd = u"nat_show_config" + err_msg = f"Failed to get NAT configuration on host {node[u'host']}" + + with PapiSocketExecutor(node) as papi_exec: + reply = papi_exec.add(cmd).get_reply(err_msg) + + logger.debug(f"NAT Configuration:\n{pformat(reply)}") + + @staticmethod + def show_nat44_summary(node): + """Show NAT44 summary on the specified topology node. + + :param node: Topology node. + :type node: dict + """ + PapiSocketExecutor.run_cli_cmd(node, u"show nat44 summary") + + @staticmethod + def show_nat_base_data(node): + """Show the NAT base data. Used data sources: - nat_show_config nat_worker_dump nat44_interface_addr_dump nat44_address_dump nat44_static_mapping_dump - nat44_user_dump nat44_interface_dump - nat44_user_session_dump - nat_det_map_dump :param node: DUT node. :type node: dict """ cmd = u"nat_show_config" - err_msg = f"Failed to get NAT configuration on host {node[u'host']}" + err_msg = f"Failed to get NAT base data on host {node[u'host']}" with PapiSocketExecutor(node) as papi_exec: reply = papi_exec.add(cmd).get_reply(err_msg) @@ -140,9 +199,32 @@ class NATUtil: u"nat44_interface_addr_dump", u"nat44_address_dump", u"nat44_static_mapping_dump", - u"nat44_user_dump", u"nat44_interface_dump", + ] + PapiSocketExecutor.dump_and_log(node, cmds) + + @staticmethod + def show_nat_user_data(node): + """Show the NAT user data. + + Used data sources: + + nat44_user_dump + nat44_user_session_dump + + :param node: DUT node. + :type node: dict + """ + cmd = u"nat_show_config" + err_msg = f"Failed to get NAT user data on host {node[u'host']}" + + with PapiSocketExecutor(node) as papi_exec: + reply = papi_exec.add(cmd).get_reply(err_msg) + + logger.debug(f"NAT Configuration:\n{pformat(reply)}") + + cmds = [ + u"nat44_user_dump", u"nat44_user_session_dump", - u"nat_det_map_dump" ] PapiSocketExecutor.dump_and_log(node, cmds) diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index 119702c15b..54d0fbd502 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -466,9 +466,9 @@ class TrafficGenerator(AbstractMeasurer): if subtype == NodeSubTypeTG.TREX: # Last line from console output line = stdout.splitlines()[-1] - results = line.split(",") - if results[-1] == u" ": - results.remove(u" ") + 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) @@ -490,22 +490,48 @@ class TrafficGenerator(AbstractMeasurer): 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"] = \ @@ -514,6 +540,10 @@ class TrafficGenerator(AbstractMeasurer): 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") @@ -521,6 +551,10 @@ class TrafficGenerator(AbstractMeasurer): 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 @@ -668,6 +702,7 @@ class TrafficGenerator(AbstractMeasurer): self._loss = None self._latency = None xstats = [None, None] + self._l7_data = dict() self._l7_data[u"client"] = dict() self._l7_data[u"client"][u"active_flows"] = None self._l7_data[u"client"][u"established_flows"] = None @@ -849,12 +884,11 @@ class TrafficGenerator(AbstractMeasurer): """ subtype = check_subtype(self._node) if subtype == NodeSubTypeTG.TREX: - self.set_rate_provider_defaults( - frame_size, traffic_profile, - traffic_directions=traffic_directions) + 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, traffic_profile, + duration, int(rate), frame_size, self.traffic_profile, async_call, latency, warmup_time, traffic_directions, tx_port, rx_port ) @@ -862,7 +896,7 @@ class TrafficGenerator(AbstractMeasurer): elif u"trex-sl" in self.traffic_profile: unit_rate_str = str(rate) + u"pps" self.trex_stl_start_remote_exec( - duration, unit_rate_str, frame_size, traffic_profile, + duration, unit_rate_str, frame_size, self.traffic_profile, async_call, latency, warmup_time, traffic_directions, tx_port, rx_port ) @@ -999,8 +1033,12 @@ class TrafficGenerator(AbstractMeasurer): # 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, + duration, + unit_rate_int, + self.frame_size, + self.traffic_profile, + warmup_time=self.warmup_time, + latency=self.use_latency, traffic_directions=self.traffic_directions ) return self.get_measurement_result(duration, transmit_rate) @@ -1019,7 +1057,7 @@ class OptimizedSearch: 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): + timeout=720.0, doublings=1, traffic_directions=2, latency=False): """Setup initialized TG, perform optimized search, return intervals. :param frame_size: Frame size identifier or value [B]. @@ -1044,6 +1082,8 @@ class OptimizedSearch: less stable tests might get better overal duration with 2 or more. :param traffic_directions: Traffic is bi- (2) or uni- (1) directional. Default: 2 + :param latency: Whether to measure latency during the trial. + Default: False. :type frame_size: str or int :type traffic_profile: str :type minimum_transmit_rate: float @@ -1056,6 +1096,7 @@ class OptimizedSearch: :type timeout: float :type doublings: int :type traffic_directions: int + :type latency: bool :returns: Structure containing narrowed down NDR and PDR intervals and their measurements. :rtype: NdrPdrResult @@ -1069,7 +1110,11 @@ class OptimizedSearch: u"resources.libraries.python.TrafficGenerator" ) tg_instance.set_rate_provider_defaults( - frame_size, traffic_profile, traffic_directions=traffic_directions) + frame_size, + traffic_profile, + traffic_directions=traffic_directions, + latency=latency + ) algorithm = MultipleLossRatioSearch( measurer=tg_instance, final_trial_duration=final_trial_duration, final_relative_width=final_relative_width, @@ -1130,8 +1175,12 @@ class OptimizedSearch: u"resources.libraries.python.TrafficGenerator" ) tg_instance.set_rate_provider_defaults( - frame_size, traffic_profile, traffic_directions=traffic_directions, - negative_loss=False, latency=latency) + frame_size, + traffic_profile, + traffic_directions=traffic_directions, + negative_loss=False, + latency=latency + ) algorithm = PLRsearch( measurer=tg_instance, trial_duration_per_trial=tdpt, packet_loss_ratio_target=plr_target, diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index f19294965a..68a4e22e6b 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -501,12 +501,21 @@ class VppConfigGenerator: self.add_config_item(self._nodeconfig, u"", path) def add_nat(self, value=u"deterministic"): - """Add NAT configuration. + """Add NAT mode configuration. :param value: NAT mode. :type value: str """ - path = [u"nat"] + path = [u"nat", value] + self.add_config_item(self._nodeconfig, u"", path) + + def add_nat_max_translations_per_thread(self, value): + """Add NAT max. translations per thread number configuration. + + :param value: NAT mode. + :type value: str + """ + path = [u"nat", u"max translations per thread"] self.add_config_item(self._nodeconfig, value, path) def add_nsim_poll_main_thread(self): diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot index 2dc2a72857..9855e129a4 100644 --- a/resources/libraries/robot/ip/ip4.robot +++ b/resources/libraries/robot/ip/ip4.robot @@ -32,13 +32,16 @@ | | ... | Type: string | | ... | - remote_host2_ip - IP address of remote host2 (Optional). | | ... | Type: string +| | ... | - remote_host_mask - Mask of remote host IP addresses (Optional). +| | ... | Type: string | | | | ... | *Example:* | | | | ... | \| Initialize IPv4 forwarding in circular topology \ -| | ... | \| 192.168.0.1 \| 192.168.0.2 \| +| | ... | \| 192.168.0.1 \| 192.168.0.2 \| 24 \| | | | | [Arguments] | ${remote_host1_ip}=${NONE} | ${remote_host2_ip}=${NONE} +| | ... | ${remote_host_mask}=32 | | | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${dut2} @@ -81,18 +84,18 @@ | | ... | interface=${DUT2_${int}1}[0] | | | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' -| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 24 +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | ${remote_host_mask} | | ... | gateway=10.10.10.2 | interface=${DUT1_${int}1}[0] | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' -| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 24 +| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | ${remote_host_mask} | | ... | gateway=20.20.20.2 | interface=${dut_if2} | | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}' | | ... | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 24 +| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | ${remote_host_mask} | | ... | gateway=1.1.1.2 | interface=${DUT1_${int}2}[0] | | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}' | | ... | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 24 +| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | ${remote_host_mask} | | ... | gateway=1.1.1.1 | interface=${DUT2_${int}1}[0] | Initialize IPv4 forwarding with scaling in circular topology diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot index e1c302e98a..8a970cf556 100644 --- a/resources/libraries/robot/ip/nat.robot +++ b/resources/libraries/robot/ip/nat.robot @@ -72,86 +72,81 @@ | | | | Show NAT | ${node} -| Initialize NAT44 in circular topology -| | [Documentation] | Initialization of 2-node / 3-node topology with NAT44 -| | ... | between DUTs: +| Initialize NAT44 deterministic mode in circular topology +| | [Documentation] | Initialization of NAT44 deterministic mode on DUT1 +| | +| | Configure inside and outside interfaces +| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0] +| | Configure deterministic mode for NAT44 +| | ... | ${dut1} | ${in_net} | ${in_mask} | ${out_net} | ${out_mask} + +| Initialize NAT44 endpoint-dependent mode in circular topology +| | [Documentation] | Initialization of NAT44 endpoint-dependent mode on DUT1 +| | +| | Configure inside and outside interfaces +| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0] +| | Set NAT44 Address Range +| | ... | ${dut1} | ${out_net} | ${out_net_end} + +# TODO: Remove when 'ip4.Initialize IPv4 forwarding in circular topology' KW +# adapted to use IP values from variables +| Initialize IPv4 forwarding for NAT44 in circular topology +| | [Documentation] +| | ... | Set IPv4 forwarding for NAT44: | | ... | - set interfaces up | | ... | - set IP addresses | | ... | - set ARP | | ... | - create routes -| | ... | - set NAT44 - only on DUT1 | | -| | ${dut2_status} | ${value}= | Run Keyword And Ignore Error +| | ${status} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${dut2} +| | ${dut2_status}= | Set Variable If | '${status}' == 'PASS' | ${True} +| | ... | ${False} | | | | Set interfaces in path up | | -| | ${tg_if1_ip4}= | Get Variable Value | ${tg_if1_ip4} | 10.0.0.2 -| | ${tg_if1_mask}= | Get Variable Value | ${tg_if1_mask} | 20 -| | ${tg_if2_ip4}= | Get Variable Value | ${tg_if2_ip4} | 12.0.0.2 -| | ${tg_if2_mask}= | Get Variable Value | ${tg_if2_mask} | 20 -| | ${dut1_if1_ip4}= | Get Variable Value | ${dut1_if1_ip4} | 10.0.0.1 -| | ${dut1_if1_mask}= | Get Variable Value | ${dut1_if1_mask} | 20 -| | ${dut1_if2_ip4}= | Get Variable Value | ${dut1_if2_ip4} | 11.0.0.1 -| | ${dut1_if2_mask}= | Get Variable Value | ${dut2_if2_mask} | 20 -| | ${dut2_if1_ip4}= | Get Variable Value | ${dut2_if1_ip4} | 11.0.0.2 -| | ${dut2_if1_mask}= | Get Variable Value | ${dut2_if1_mask} | 20 -| | ${dut2_if2_ip4}= | Get Variable Value | ${dut2_if2_ip4} | 12.0.0.1 -| | ${dut2_if2_mask}= | Get Variable Value | ${dut2_if2_mask} | 20 -| | ${inside_net}= | Get Variable Value | ${inside_net} | 192.168.0.0 -| | ${inside_mask}= | Get Variable Value | ${inside_mask} | 16 -| | ${nat_net}= | Get Variable Value | ${nat_net} | 109.146.163.128 -| | ${nat_mask}= | Get Variable Value | ${nat_mask} | 26 -| | ${dest_net}= | Get Variable Value | ${dest_net} | 20.0.0.0 -| | ${dest_mask}= | Get Variable Value | ${dest_mask} | 24 -| | -| | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}1}[0] -| | ... | ${dut1_if1_ip4} | ${dut1_if1_mask} -| | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}2}[0] -| | ... | ${dut1_if2_ip4} | ${dut1_if2_mask} -| | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}1}[0] -| | ... | ${dut2_if1_ip4} | ${dut2_if1_mask} -| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Set Variable | ${dut2} -| | ... | ELSE | Set Variable | ${dut1} -| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Set Variable | ${DUT2_${int}2}[0] -| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0] -| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | ${dut2_if2_ip4} -| | ... | ${dut2_if2_mask} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${dut1_if1_ip4} | ${dut1_if1_mask} +| | VPP Interface Set IP Address +| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut1_if2_ip4} | ${dut1_if2_mask} +| | Run Keyword If | ${dut2_status} +| | ... | VPP Interface Set IP Address +| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_if1_ip4} | ${dut2_if1_mask} +| | Run Keyword If | ${dut2_status} +| | ... | VPP Interface Set IP Address +| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${dut2_if2_ip4} | ${dut2_if2_mask} | | | | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${tg_if1_ip4} | ${TG_pf1_mac}[0] -| | Run Keyword If | '${dut2_status}' == 'PASS' +| | Run Keyword If | ${dut2_status} | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip4} | | ... | ${DUT2_${int}1_mac}[0] -| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | ELSE | VPP Add IP Neighbor +| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${tg_if2_ip4} | ${TG_pf2_mac}[0] +| | Run Keyword If | ${dut2_status} | | ... | VPP Add IP Neighbor -| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_if2_ip4} +| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_if1_ip4} | | ... | ${DUT1_${int}2_mac}[0] -| | VPP Add IP Neighbor -| | ... | ${dut} | ${dut_if2} | ${tg_if2_ip4} | ${TG_pf2_mac}[0] -| | -| | Vpp Route Add | ${dut1} | ${inside_net} | ${inside_mask} -| | ... | gateway=${tg_if1_ip4} | interface=${DUT1_${int}1}[0] -| | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut1} | ${dest_net} | ${dest_mask} -| | ... | gateway=${dut2_if1_ip4} | interface=${DUT1_${int}2}[0] -| | Run Keyword Unless | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut1} | ${dest_net} | ${dest_mask} -| | ... | gateway=${tg_if2_ip4} | interface=${DUT1_${int}2}[0] -| | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut2} | ${dest_net} | ${dest_mask} -| | ... | gateway=${tg_if2_ip4} | interface=${DUT2_${int}2}[0] -| | Run Keyword If | '${dut2_status}' == 'PASS' -| | ... | Vpp Route Add | ${dut2} | ${nat_net} | ${nat_mask} -| | ... | gateway=${dut1_if2_ip4} | interface=${DUT2_${int}1}[0] -| | -| | Configure inside and outside interfaces -| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0] -| | Configure deterministic mode for NAT44 -| | ... | ${dut1} | ${inside_net} | ${inside_mask} | ${nat_net} | ${nat_mask} - +| | Run Keyword If | ${dut2_status} +| | ... | VPP Add IP Neighbor +| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${tg_if2_ip4}| ${TG_pf2_mac}[0] +| | +| | Vpp Route Add +| | ... | ${dut1} | ${in_net} | ${in_mask} | gateway=${tg_if1_ip4} +| | ... | interface=${DUT1_${int}1}[0] +| | Run Keyword If | ${dut2_status} +| | ... | Vpp Route Add +| | ... | ${dut1} | ${dest_net} | ${dest_mask} | gateway=${dut2_if1_ip4} +| | ... | interface=${DUT1_${int}2}[0] +| | ... | ELSE | Vpp Route Add +| | ... | ${dut1} | ${dest_net} | ${dest_mask} | gateway=${tg_if2_ip4} +| | ... | interface=${DUT1_${int}2}[0] +| | Run Keyword If | ${dut2_status} +| | ... | Vpp Route Add +| | ... | ${dut2} | ${dest_net} | ${dest_mask} | gateway=${tg_if2_ip4} +| | ... | interface=${DUT2_${int}2}[0] +| | Run Keyword If | ${dut2_status} +| | ... | Vpp Route Add +| | ... | ${dut2} | ${out_net} | ${out_mask} | gateway=${dut1_if2_ip4} +| | ... | interface=${DUT2_${int}1}[0] diff --git a/resources/libraries/robot/performance/performance_limits.robot b/resources/libraries/robot/performance/performance_limits.robot index 82688ac9c6..332ed9368b 100644 --- a/resources/libraries/robot/performance/performance_limits.robot +++ b/resources/libraries/robot/performance/performance_limits.robot @@ -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,19 +24,48 @@ | | | | ... | *Arguments:* | | ... | - frame_size - Framesize. Type: integer or string +| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer | | | | ... | *Returns:* -| | ... | Average frame size. Type: float +| | ... | Average frame size including overhead. Type: float | | | | ... | *Example:* | | | | ... | \| Get Average Frame Size \| IMIX_v4_1 \| | | -| | [Arguments] | ${frame_size} +| | [Arguments] | ${frame_size} | ${overhead}=${0} | | -| | Return From Keyword If | '${frame_size}' == 'IMIX_v4_1' | ${353.83333} -| | ${frame_size} = | Convert To Number | ${frame_size} -| | Return From Keyword | ${frame_size} +| | ${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] @@ -61,8 +90,9 @@ | | | | ... | *Test (or broader scope) variables read:* | | ... | - nic_name - Name of bottleneck NIC. Type: string -| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - 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]. @@ -72,7 +102,7 @@ | | | | ... | *Example:* | | -| | ... | \| Set test Variable \| \${frame_size} \| IMIX_v4_1 \| +| | ... | \| Set Test Variable \| \${frame_size} \| IMIX_v4_1 \| | | ... | \| Set Max Rate And Jumbo \| | | | | # Negative overhead is possible, if DUT-DUT traffic is less encapsulated @@ -84,16 +114,40 @@ | | ... | ${NIC_NAME_TO_PPS_LIMIT} | ${nic_name} | | ${bps_limit} = | Get From Dictionary | | ... | ${NIC_NAME_TO_BPS_LIMIT} | ${nic_name} -| | ${avg_size} = | Get Average Frame Size | ${frame_size} -| | ${max_size} = | Set Variable If | '${frame_size}' == 'IMIX_v4_1' -| | ... | ${1518} | ${frame_size} | | # swo := size_with_overhead -| | ${avg_swo} = | Evaluate | ${avg_size} + ${overhead} -| | ${max_swo} = | Evaluate | ${max_size} + ${overhead} -| | ${jumbo} = | Set Variable If | ${max_swo} < 1522 -| | ... | ${False} | ${True} +| | ${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 | \${jumbo} | | 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 dcabbb9fac..84113709cf 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -50,7 +50,8 @@ | | ... | *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: int or str +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. | | ... | Type: float | | @@ -59,12 +60,16 @@ | | ... | - 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: int +| | ... | - 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: int +| | ... | - doublings - How many doublings to do when expanding [1]. +| | ... | Type: integer | | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: int +| | ... | Type: integer | | ... | - latency_duration - Duration for latency-specific trials. Type: float +| | ... | - latency - False to disable latency measurement; default value: True. +| | ... | Type: boolean | | | | ... | *Example:* | | @@ -78,6 +83,7 @@ | | ... | ${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} @@ -86,6 +92,7 @@ | | ... | ${final_trial_duration} | ${initial_trial_duration} | | ... | ${number_of_intermediate_phases} | timeout=${timeout} | | ... | doublings=${doublings} | traffic_directions=${traffic_directions} +| | ... | latency=${latency} | | Display result of NDRPDR search | ${result} | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} @@ -95,18 +102,22 @@ | | ${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} -| | Measure and show latency at specified rate | Latency at 90% PDR: +| | 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} -| | Measure and show latency at specified rate | Latency at 50% PDR: +| | 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} -| | Measure and show latency at specified rate | Latency at 10% PDR: +| | Run Keyword If | ${latency} +| | ... | Measure and show latency at specified rate | Latency at 10% PDR: | | ... | ${latency_duration} | ${rate} | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | Measure and show latency at specified rate | Latency at 0% PDR: +| | 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. @@ -128,7 +139,8 @@ | | ... | *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: int or str +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. | | ... | Type: float | | @@ -137,11 +149,15 @@ | | ... | - 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: int +| | ... | - 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: int +| | ... | - doublings - How many doublings to do when expanding [1]. +| | ... | Type: integer | | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: int +| | ... | Type: integer +| | ... | - latency - True to enable latency measurement; default value: False. +| | ... | Type: boolean | | | | ... | *Returns:* | | ... | - Lower bound for bi-directional throughput at given PLR. Type: float @@ -156,7 +172,7 @@ | | ... | ${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} +| | ... | ${doublings}=${2} | ${traffic_directions}=${2} | ${latency}=${False} | | | | ${result} = | Perform optimized ndrpdr search | ${frame_size} | | ... | ${traffic_profile} | ${10000} | ${max_rate} @@ -164,6 +180,7 @@ | | ... | ${final_trial_duration} | ${initial_trial_duration} | | ... | ${number_of_intermediate_phases} | timeout=${timeout} | | ... | doublings=${doublings} | traffic_directions=${traffic_directions} +| | ... | latency=${latency} | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} | | Return From Keyword | ${result.pdr_interval.measured_low.target_tr} @@ -181,7 +198,8 @@ | | ... | *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: int or str +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. | | ... | Type: float | | @@ -189,7 +207,9 @@ | | ... | - 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: int +| | ... | Type: integer +| | ... | - latency - True to enable latency measurement; default value: False. +| | ... | Type: boolean | | | | ... | *Example:* | | @@ -197,13 +217,13 @@ | | ... | \| \${2} \| | | | | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${1800.0} -| | ... | ${traffic_directions}=${2} +| | ... | ${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} +| | ... | 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} @@ -229,7 +249,7 @@ | | ... | *Example:* | | | | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \ -| | ... | \| \${64} \| show_latency=\${EMPTY} \| +| | ... | \| \${64} \| latency=\${EMPTY} \| | | | | [Arguments] | ${text} | ${rate_total} | ${frame_size} | ${latency}=${EMPTY} | | @@ -271,7 +291,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: int or str +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | ... | *Arguments:* | | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult | | @@ -304,7 +325,8 @@ | | ... | (Throughput * (L2 Frame Size + IPG) * 8) | | | | ... | *Test (or broader scope) variables read:* -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - 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 @@ -360,36 +382,36 @@ | | ... | Send traffic at maximum rate. | | | | ... | *Test (or broader scope) variables read:* -| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | - traffic_profile - Name of module defining traffic for measurements. | | ... | Type: string -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. | | ... | Type: float | | | | ... | *Arguments:* -| | ... | - trial_duration - Duration of single trial [s]. -| | ... | Type: float -| | ... | - fail_no_traffic - Whether to fail on zero receive count. -| | ... | Type: boolean +| | ... | - 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: int -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: int -| | ... | - tx_port - TX port of TG, default 0. -| | ... | Type: integer -| | ... | - rx_port - RX port of TG, default 1. | | ... | 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 | | | | ... | *Example:* | | -| | ... | \| Traffic should pass with maximum rate \| \${1} \| \${10.0} \ -| | ... | \| \${False} \| \${2} \| \${0} \| \${1} \| +| | ... | \| 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}=${True} +| | ... | ${latency}=${False} | | | | ${results}= | Send traffic at specified rate | | ... | ${trial_duration} | ${max_rate} | ${frame_size} @@ -411,35 +433,39 @@ | | ... | - 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/string +| | ... | - frame_size - L2 Frame Size [B]. Type: integer or string | | ... | - traffic_profile - Name of module defining traffc for measurements. | | ... | Type: string | | ... | - trial_multiplicity - How many trials in this measurement. -| | ... | Type: int -| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: int -| | ... | - tx_port - TX port of TG, default 0. | | ... | Type: integer -| | ... | - rx_port - RX port of TG, default 1. +| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. | | ... | Type: integer -| | ... | - extended_debug- True to enable extended debug. +| | ... | - 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. | | ... | Type: boolean | | | | ... | *Example:* | | | | ... | \| Send traffic at specified rate \| \${1.0} \| ${4000000.0} \ | | ... | \| \${64} \| 3-node-IPv4 \| \${10} \| \${2} \| \${0} \| \${1} \ -| | ... | \${False} \| +| | ... | \| ${False} \| ${True} \| | | | | [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}=${True} +| | ... | ${extended_debug}=${extended_debug} | ${latency}=${False} | | | | Set Test Variable | ${extended_debug} -| | Clear and show runtime counters with running traffic | ${trial_duration} -| | ... | ${rate} | ${frame_size} | ${traffic_profile} -| | ... | ${traffic_directions} | ${tx_port} | ${rx_port} +| | # Following setting of test variables is needed as +| | # "Clear and show runtime counters with running traffic" has been moved to +| | # pre_stats actions. +| | Set Test Variable | ${rate} +| | Set Test Variable | ${traffic_directions} +| | Set Test Variable | ${tx_port} +| | Set Test Variable | ${rx_port} | | FOR | ${action} | IN | @{pre_stats} | | | Run Keyword | Additional Statistics Action For ${action} | | END @@ -473,15 +499,15 @@ | | ... | - 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/string +| | ... | - 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: int -| | ... | - tx_port - TX port of TG, default 0. Type: integer -| | ... | - rx_port - RX port of TG, default 1. Type: integer +| | ... | 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 int. +| | ... | In pps. Type: integer. | | | | ... | *Example:* | | @@ -514,13 +540,13 @@ | | ... | - 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/string +| | ... | - 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: int -| | ... | - tx_port - TX port of TG, default 0. Type: integer -| | ... | - rx_port - RX port of TG, default 1. Type: integer +| | ... | 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:* | | @@ -553,15 +579,16 @@ | | ... | *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: int or str +| | ... | - 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. | | ... | Type: float | | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic. -| | ... | Type: int -| | ... | - tx_port - TX port of TG, default 0. Type: integer -| | ... | - rx_port - RX port of TG, default 1. Type: integer +| | ... | 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:* | | @@ -647,4 +674,13 @@ | | ... | Additional Statistics Action for bash command "perf stat". | | | | Run Keyword If | ${extended_debug}==${True} -| | ... | Perf Stat On All DUTs | ${nodes} \ No newline at end of file +| | ... | Perf Stat On All DUTs | ${nodes} + +| Additional Statistics Action For vpp-clear-show-runtime-with-traffic +| | [Documentation] +| | ... | Additional Statistics Action for clear and show runtime counters with +| | ... | running traffic. +| | +| | Clear and show runtime counters with running traffic +| | ... | ${trial_duration} | ${rate} | ${frame_size} | ${traffic_profile} +| | ... | ${traffic_directions} | ${tx_port} | ${rx_port} diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 6e1e5416e2..51ce513078 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -77,10 +77,10 @@ | | ... | try to initialize/disable. | | | | ... | *Arguments:* -| | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx. -| | ... | Type: string, default value: HW_DH895xcc -| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs -| | ... | Type: integer, default value: ${32} +| | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx; default +| | ... | value: HW_DH895xcc. Type: string +| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs; default +| | ... | value: ${32} Type: integer | | ... | - force_init - Force to initialize. Type: boolean | | | | ... | *Example:* @@ -127,7 +127,7 @@ | | [Arguments] | ${dutx} | ${dut_keys} | | | | FOR | ${key} | IN | @{dut_keys} -| | | ${found_key} | ${value}= | Run Keyword and Ignore Error +| | | ${found_key} | ${value}= | Run Keyword And Ignore Error | | | ... | Dictionaries Should Be Equal | ${nodes['${key}']} | ${dutx} | | | Run Keyword If | '${found_key}' == 'PASS' | EXIT FOR LOOP | | END @@ -142,21 +142,21 @@ | | FOR | ${dut} | IN | @{duts} | | | Import Library | resources.libraries.python.VppConfigGenerator | | | ... | WITH NAME | ${dut} -| | | Run keyword | ${dut}.Set Node | ${nodes['${dut}']} | node_key=${dut} -| | | Run keyword | ${dut}.Add Unix Log -| | | Run keyword | ${dut}.Add Unix CLI Listen -| | | Run keyword | ${dut}.Add Unix Nodaemon -| | | Run keyword | ${dut}.Add Unix Coredump -| | | Run keyword | ${dut}.Add Socksvr | ${SOCKSVR_PATH} -| | | Run keyword | ${dut}.Add Heapsize | 4G -| | | Run keyword | ${dut}.Add Statseg size | 4G -| | | Run keyword | ${dut}.Add Statseg Per Node Counters | on -| | | Run keyword | ${dut}.Add Plugin | disable | default -| | | Run keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable} -| | | Run keyword | ${dut}.Add IP6 Hash Buckets | 2000000 -| | | Run keyword | ${dut}.Add IP6 Heap Size | 4G -| | | Run keyword | ${dut}.Add IP Heap Size | 4G -| | | Run keyword | ${dut}.Add Graph Node Variant | ${GRAPH_NODE_VARIANT} +| | | Run Keyword | ${dut}.Set Node | ${nodes['${dut}']} | node_key=${dut} +| | | Run Keyword | ${dut}.Add Unix Log +| | | Run Keyword | ${dut}.Add Unix CLI Listen +| | | Run Keyword | ${dut}.Add Unix Nodaemon +| | | Run Keyword | ${dut}.Add Unix Coredump +| | | Run Keyword | ${dut}.Add Socksvr | ${SOCKSVR_PATH} +| | | Run Keyword | ${dut}.Add Heapsize | 4G +| | | Run Keyword | ${dut}.Add Statseg size | 4G +| | | Run Keyword | ${dut}.Add Statseg Per Node Counters | on +| | | Run Keyword | ${dut}.Add Plugin | disable | default +| | | Run Keyword | ${dut}.Add Plugin | enable | @{plugins_to_enable} +| | | Run Keyword | ${dut}.Add IP6 Hash Buckets | 2000000 +| | | Run Keyword | ${dut}.Add IP6 Heap Size | 4G +| | | Run Keyword | ${dut}.Add IP Heap Size | 4G +| | | Run Keyword | ${dut}.Add Graph Node Variant | ${GRAPH_NODE_VARIANT} | | END | Add worker threads to all DUTs @@ -194,26 +194,26 @@ | | | ${cpu_main}= | Cpu list per node str | ${nodes['${dut}']} | ${numa} | | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${CPU_CNT_MAIN} | | | ${skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM} + ${CPU_CNT_MAIN} -| | | ${cpu_wt}= | Run keyword if | ${cpu_count_int} > 0 | +| | | ${cpu_wt}= | Run Keyword If | ${cpu_count_int} > 0 | | | | ... | Cpu list per node str | ${nodes['${dut}']} | ${numa} | | | ... | skip_cnt=${skip_cnt} | cpu_cnt=${cpu_count_int} | | | ... | smt_used=${smt_used} -| | | ${thr_count_int}= | Run keyword if | ${smt_used} +| | | ${thr_count_int}= | Run Keyword If | ${smt_used} | | | ... | Evaluate | int(${cpu_count_int}*2) | | | ... | ELSE | Set variable | ${thr_count_int} -| | | ${rxq_count_int}= | Run keyword if | ${rx_queues} +| | | ${rxq_count_int}= | Run Keyword If | ${rx_queues} | | | ... | Set variable | ${rx_queues} | | | ... | ELSE | Evaluate | int(${thr_count_int}/2) -| | | ${rxq_count_int}= | Run keyword if | ${rxq_count_int} == 0 +| | | ${rxq_count_int}= | Run Keyword If | ${rxq_count_int} == 0 | | | ... | Set variable | ${1} | | | ... | ELSE | Set variable | ${rxq_count_int} | | | Run Keyword | ${dut}.Add CPU Main Core | ${cpu_main} -| | | Run keyword if | ${cpu_count_int} > 0 +| | | Run Keyword If | ${cpu_count_int} > 0 | | | ... | ${dut}.Add CPU Corelist Workers | ${cpu_wt} -| | | Run keyword if | ${smt_used} -| | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${215040} | ELSE -| | | ... | Run keyword | ${dut}.Add Buffers Per Numa | ${107520} -| | | Run keyword if | ${thr_count_int} > 1 +| | | Run Keyword If | ${smt_used} +| | | ... | Run Keyword | ${dut}.Add Buffers Per Numa | ${215040} | ELSE +| | | ... | Run Keyword | ${dut}.Add Buffers Per Numa | ${107520} +| | | Run Keyword If | ${thr_count_int} > 1 | | | ... | Set Tags | MTHREAD | ELSE | Set Tags | STHREAD | | | Set Tags | ${thr_count_int}T${cpu_count_int}C | | END @@ -245,15 +245,44 @@ | Add NAT to all DUTs | | [Documentation] | Add NAT configuration to all DUTs. | | +| | ... | *Arguments:* +| | ... | - nat_mode - NAT mode; default value: deterministic. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Add NAT to all DUTs \| nat_mode=endpoint-dependent \| +| | +| | [Arguments] | ${nat_mode}=deterministic +| | +| | FOR | ${dut} | IN | @{duts} +| | | Run Keyword | ${dut}.Add NAT | value=${nat_mode} +| | END + +| Add NAT max translations per thread to all DUTs +| | [Documentation] | Add NAT maximum number of translations per thread +| | ... | configuration. +| | +| | ... | *Arguments:* +| | ... | - max_translations_per_thread - NAT maximum number of translations per +| | ... | thread. Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Add NAT translation memory to all DUTs \ +| | ... | \| max_translations_per_thread=2048 \| +| | +| | [Arguments] | ${max_translations_per_thread}=1024 +| | | | FOR | ${dut} | IN | @{duts} -| | | Run keyword | ${dut}.Add NAT +| | | Run Keyword | ${dut}.Add NAT max translations per thread +| | | ... | value=${max_translations_per_thread} | | END | Write startup configuration on all VPP DUTs | | [Documentation] | Write VPP startup configuration without restarting VPP. | | | | FOR | ${dut} | IN | @{duts} -| | | Run keyword | ${dut}.Write Config +| | | Run Keyword | ${dut}.Write Config | | END | Apply startup configuration on all VPP DUTs @@ -270,12 +299,12 @@ | | [Arguments] | ${with_trace}=${False} | | | | FOR | ${dut} | IN | @{duts} -| | | Run keyword | ${dut}.Apply Config +| | | Run Keyword | ${dut}.Apply Config | | END | | Save VPP PIDs | | Enable Coredump Limit VPP on All DUTs | ${nodes} | | Update All Interface Data On All Nodes | ${nodes} | skip_tg=${True} -| | Run keyword If | ${with_trace} | VPP Enable Traces On All Duts | ${nodes} +| | Run Keyword If | ${with_trace} | VPP Enable Traces On All Duts | ${nodes} | Apply startup configuration on VPP DUT | | [Documentation] | Write VPP startup configuration and restart VPP DUT. @@ -286,13 +315,13 @@ | | | | [Arguments] | ${dut} | ${with_trace}=${False} | | -| | Run keyword | ${dut}.Apply Config +| | Run Keyword | ${dut}.Apply Config | | Save VPP PIDs on DUT | ${dut} | | Enable Coredump Limit VPP on DUT | ${nodes['${dut}']} | | ${dutnode}= | Copy Dictionary | ${nodes} | | Keep In Dictionary | ${dutnode} | ${dut} | | Update All Interface Data On All Nodes | ${dutnode} | skip_tg=${True} -| | Run keyword If | ${with_trace} | VPP Enable Traces On Dut +| | Run Keyword If | ${with_trace} | VPP Enable Traces On Dut | | ... | ${nodes['${dut}']} | Save VPP PIDs @@ -335,7 +364,7 @@ | | ${err_msg}= | Catenate | ${SUITE NAME} - ${TEST NAME} | | ... | \nThe VPP PIDs are not equal!\nTest Setup VPP PIDs: | | ... | ${setup_vpp_pids}\nTest Teardown VPP PIDs: ${teardown_vpp_pids} -| | ${rc} | ${msg}= | Run keyword and ignore error +| | ${rc} | ${msg}= | Run Keyword And Ignore Error | | ... | Dictionaries Should Be Equal | | ... | ${setup_vpp_pids} | ${teardown_vpp_pids} | | Run Keyword And Return If | '${rc}'=='FAIL' | Log | ${err_msg} diff --git a/resources/libraries/robot/shared/test_teardown.robot b/resources/libraries/robot/shared/test_teardown.robot index b5cdab0664..5d71db4edc 100644 --- a/resources/libraries/robot/shared/test_teardown.robot +++ b/resources/libraries/robot/shared/test_teardown.robot @@ -110,6 +110,17 @@ | | | ... | Show NAT verbose | ${nodes['${dut}']} | | END +| Additional Test Tear Down Action For nat-ed +| | [Documentation] +| | ... | Additional teardown for tests which uses NAT feature. +| | +| | FOR | ${dut} | IN | @{duts} +| | | Show NAT Config | ${nodes['${dut}']} +| | | Show NAT44 Summary | ${nodes['${dut}']} +| | | Show NAT Base Data | ${nodes['${dut}']} +| | | Vpp Get Ip Table Summary | ${nodes['${dut}']} +| | END + | Additional Test Tear Down Action For namespace | | [Documentation] | | ... | Additional teardown for tests which uses namespace. diff --git a/tests/dpdk/perf/__init__.robot b/tests/dpdk/perf/__init__.robot index 321ddc826e..200289254b 100644 --- a/tests/dpdk/perf/__init__.robot +++ b/tests/dpdk/perf/__init__.robot @@ -39,7 +39,8 @@ | | ... | - pre_run_stats - Statistics actions during traffic before timer. | | ... | - post_run_stats - Statistics actions during traffic after timer. | | -| | ${pre_stats}= | Create List | ${EMPTY} +| | ${pre_stats}= | Create List +| | ... | vpp-clear-show-runtime-with-traffic | | ${post_stats}= | Create List | ${EMPTY} | | ${pre_run_stats}= | Create List | ${EMPTY} | | ${post_run_stats}= | Create List | ${EMPTY} diff --git a/tests/vpp/perf/__init__.robot b/tests/vpp/perf/__init__.robot index 1ccd94b8d2..d49486bf87 100644 --- a/tests/vpp/perf/__init__.robot +++ b/tests/vpp/perf/__init__.robot @@ -45,7 +45,8 @@ | | ... | - packages_dir - Path to directory where VPP packages are stored. | | | | ${pre_stats}= | Create List -| | ... | vpp-clear-stats | vpp-enable-packettrace | vpp-enable-elog +| | ... | vpp-clear-show-runtime-with-traffic | vpp-clear-stats +| | ... | vpp-enable-packettrace | vpp-enable-elog | | ${post_stats}= | Create List | | ... | vpp-show-stats | vpp-show-packettrace | vpp-show-elog | | ${pre_run_stats}= | Create List diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot similarity index 62% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot index 0b89c27291..c107d3e8f3 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr.robot @@ -15,10 +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 | FEATURE | NAT44 | SRC_USER_1000 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale1000-udpsrcscale15-nat44 +| ... | ethip4udp-ip4base-h1024-p63-s64512 | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -27,28 +26,28 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 performance test cases* +| Documentation | *RFC2544: Pkt throughput IPv4 routing test cases* | | ... | *[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 -| ... | one static IPv4 /18 route entries. -| ... | DUT1 is tested with ${nic_name}.\ +| ... | *[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 DUT1. TG traffic profile -| ... | contains two L3 flow-groups (flow-group per direction, 1 flow 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. +| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\ +| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | containing Ethernet header, IPv4 header with 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 +| @{plugins_to_enable}= | dpdk_plugin.so | ${crypto_type}= | ${None} | ${nic_name}= | Intel-X710 | ${nic_driver}= | vfio-pci @@ -56,16 +55,19 @@ | ${nic_txq_size}= | 0 | ${nic_pfs}= | 2 | ${nic_vfs}= | 0 -| ${osi_layer}= | L3 +| ${osi_layer}= | L7 | ${overhead}= | ${0} # Traffic profile: -| ${traffic_profile}= | trex-sl-2n-ethip4udp-1000u15p +| ${traffic_profile}= | trex-astf-ethip4udp-1024h +| ${cps}= | ${64512} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} *** Keywords *** | Local Template -| | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -78,62 +80,71 @@ | | [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 +| | 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 +| | Given Set Jumbo | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq} | | And Pre-initialize layer driver | ${nic_driver} -| | And Add NAT to all DUTs | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology -| | Then Find NDR and PDR intervals using optimized search +| | 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} *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4base-h1024-p63-s64512-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale1000-udpsrcscale15-nat44-ndrpdr +| 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-h16384-p63-s1032192-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot new file mode 100644 index 0000000000..eec0cfcef6 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr.robot @@ -0,0 +1,150 @@ +# 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 | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h16384-p63-s1032192 +| +| 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 | *RFC2544: Pkt throughput IPv4 routing test cases* +| +| ... | *[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 /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\ +| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | containing Ethernet header, IPv4 header with 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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-16384h +| ${cps}= | ${1032192} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h16384-p63-s1032192-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h16384-p63-s1032192-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-h262144-p63-s16515072-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot new file mode 100644 index 0000000000..64c0013955 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr.robot @@ -0,0 +1,150 @@ +# 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 | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h262144-p63-s16515072 +| +| 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 | *RFC2544: Pkt throughput IPv4 routing test cases* +| +| ... | *[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 /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\ +| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | containing Ethernet header, IPv4 header with 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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-262144h +| ${cps}= | ${16515072} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h262144-p63-s16515072-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h262144-p63-s16515072-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-h4096-p63-s258048-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot new file mode 100644 index 0000000000..76bf239508 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr.robot @@ -0,0 +1,150 @@ +# 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 | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h4096-p63-s258048 +| +| 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 | *RFC2544: Pkt throughput IPv4 routing test cases* +| +| ... | *[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 /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\ +| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | containing Ethernet header, IPv4 header with 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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-4096h +| ${cps}= | ${258048} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h4096-p63-s258048-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h4096-p63-s258048-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-h65536-p63-s4128768-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot new file mode 100644 index 0000000000..1807b880f4 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr.robot @@ -0,0 +1,150 @@ +# 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 | BASE | IP4BASE | DRV_VFIO_PCI | UDP_SYN +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4base-h65536-p63-s4128768 +| +| 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 | *RFC2544: Pkt throughput IPv4 routing test cases* +| +| ... | *[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 /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\ +| ... | contain L7 flows (${cps} bi-directional UDP flows) with all packets\ +| ... | containing Ethernet header, IPv4 header with 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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-65536h +| ${cps}= | ${4128768} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-ip4base-h65536-p63-s4128768-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-ip4base-h65536-p63-s4128768-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-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ei-ndrpdr.robot index 7b0e570cb0..a516fae5e6 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-nat44-ei-ndrpdr.robot @@ -17,9 +17,10 @@ | 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 | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | BASE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-nat44 +| ... | ethip4udp-ip4base-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -28,7 +29,8 @@ | | Test Template | Local Template | -| Documentation | *RFC2544: Pkt throughput NAT44 performance test cases* +| Documentation | *RFC2544: Pkt throughput NAT44 deterministic mode performance +| ... | test cases* | | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology | ... | with single links between nodes. @@ -59,6 +61,23 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} +# IP addresing +| ${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}= | ${20} +| ${dut1_if2_ip4}= | 12.0.0.1 +| ${dut1_if2_mask}= | ${20} +| ${dest_net}= | 30.0.0.0 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 20.0.0.0 +| ${in_mask}= | ${32} +| ${out_net}= | 200.0.0.0 +| ${out_mask}= | ${32} # Traffic profile: | ${traffic_profile}= | trex-sl-2n-ethip4udp-1u1p @@ -66,7 +85,7 @@ | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -83,58 +102,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4base-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4base-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4base-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4base-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4base-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4base-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4base-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4base-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4base-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4base-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 76% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr.robot index e097c5d885..5e250f6b5a 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_1 -| ... | BASE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_1 | BASE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4base-udpsrcscale63-nat44 +| ... | ethip4udp-ip4base-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-1u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 22 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 32 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${22} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${32} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-1u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4base-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 74% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr.robot index 3c63114248..1d1248d2a2 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_1024 +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC | ... | SCALE | DRV_VFIO_PCI -| ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale1024-udpsrcscale63-nat44 +| ... | SRC_USER_1024 | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-1024u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 -| ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if1_mask}= | ${20} +| ${tg_if2_ip4}= | 11.0.0.2 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 22 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 32 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${22} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${32} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-1024u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale1024-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 74% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr.robot index 6b2a11a25d..d332415405 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_1048576 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_1048576 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale1048576-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-1048576u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 172.16.0.0 -| ${inside_mask}= | 12 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 22 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 172.16.0.0 +| ${in_mask}= | ${12} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${22} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-1048576u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale1048576-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr.robot index 76731fe6fb..21f65cae34 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_16384 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_16384 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale16384-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-16384u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 18 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 28 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${18} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${28} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-16384u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale16384-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr.robot index 481153ca0f..95940a64c8 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_238 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_238 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale238-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale238-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-238u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 22 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 32 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${32} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${22} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-238u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale238-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr.robot index 9e36513a69..0cdcdbbc2e 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_262144 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_262144 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale262144-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-262144u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 172.16.0.0 -| ${inside_mask}= | 14 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 24 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 172.16.0.0 +| ${in_mask}= | ${14} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${24} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-262144u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale262144-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr.robot index b98d7a1ddd..a9418420a0 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_4096 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_4096 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale4096-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-4096u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 20 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 30 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${30} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${32} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-4096u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale4096-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr.robot similarity index 75% rename from tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr.robot rename to tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr.robot index 12e4be0320..1fc7259ece 100644 --- a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr.robot +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr.robot @@ -15,10 +15,10 @@ | 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 | SRC_USER_65536 -| ... | SCALE | DRV_VFIO_PCI +| ... | NIC_Intel-X710 | ETH | IP4FWD | FEATURE | NAT44 | NAT44_DETERMINISTIC +| ... | SRC_USER_65536 | SCALE | DRV_VFIO_PCI | ... | RXQ_SIZE_0 | TXQ_SIZE_0 -| ... | ethip4udp-ip4scale65536-udpsrcscale63-nat44 +| ... | ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei | | Suite Setup | Setup suite topology interfaces | performance | Suite Teardown | Tear down suite | performance @@ -58,29 +58,31 @@ | ${nic_vfs}= | 0 | ${osi_layer}= | L3 | ${overhead}= | ${0} -# Traffic profile: -| ${traffic_profile}= | trex-sl-ethip4udp-65536u63p # IP addresing | ${tg_if1_ip4}= | 10.0.0.2 -| ${tg_if1_mask}= | 20 +| ${tg_if1_mask}= | ${20} | ${tg_if2_ip4}= | 12.0.0.2 -| ${tg_if2_mask}= | 20 +| ${tg_if2_mask}= | ${20} | ${dut1_if1_ip4}= | 10.0.0.1 -| ${dut1_if1_mask}= | 20 +| ${dut1_if1_mask}= | ${20} | ${dut1_if2_ip4}= | 11.0.0.1 -| ${dut1_if2_mask}= | 20 -| ${inside_net}= | 192.168.0.0 -| ${inside_mask}= | 16 -| ${nat_net}= | 68.142.68.0 -| ${nat_mask}= | 26 +| ${dut1_if2_mask}= | ${20} | ${dest_net}= | 20.0.0.0 -| ${dest_mask}= | 24 +| ${dest_mask}= | ${24} +# NAT settings +| ${nat_mode}= | deterministic +| ${in_net}= | 192.168.0.0 +| ${in_mask}= | ${16} +| ${out_net}= | 68.142.68.0 +| ${out_mask}= | ${26} +# Traffic profile: +| ${traffic_profile}= | trex-sl-ethip4udp-65536u63p *** Keywords *** | Local Template | | | | [Documentation] -| | ... | [Cfg] DUT runs IPv4 routing config. +| | ... | [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.\ | | @@ -97,58 +99,59 @@ | | 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 +| | And Add NAT to all DUTs | nat_mode=${nat_mode} | | And Apply startup configuration on all VPP DUTs | | When Initialize layer driver | ${nic_driver} | | And Initialize layer interface -| | And Initialize NAT44 in circular topology +| | And Initialize IPv4 forwarding for NAT44 in circular topology +| | And Initialize NAT44 deterministic mode in circular topology | | Then Find NDR and PDR intervals using optimized search *** Test Cases *** -| 64B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 64B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 1C | | frame_size=${64} | phy_cores=${1} -| 64B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 64B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 2C | | frame_size=${64} | phy_cores=${2} -| 64B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 64B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 64B | 4C | | frame_size=${64} | phy_cores=${4} -| 1518B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 1518B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 1C | | frame_size=${1518} | phy_cores=${1} -| 1518B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 1518B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 2C | | frame_size=${1518} | phy_cores=${2} -| 1518B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 1518B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 1518B | 4C | | frame_size=${1518} | phy_cores=${4} -| 9000B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 9000B-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 1C | | frame_size=${9000} | phy_cores=${1} -| 9000B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 9000B-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 2C | | frame_size=${9000} | phy_cores=${2} -| 9000B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| 9000B-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | 9000B | 4C | | frame_size=${9000} | phy_cores=${4} -| IMIX-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| IMIX-1c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 1C | | frame_size=IMIX_v4_1 | phy_cores=${1} -| IMIX-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| IMIX-2c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 2C | | frame_size=IMIX_v4_1 | phy_cores=${2} -| IMIX-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ndrpdr +| IMIX-4c-ethip4udp-ip4scale65536-udpsrcscale63-nat44-ei-ndrpdr | | [Tags] | IMIX | 4C | | frame_size=IMIX_v4_1 | phy_cores=${4} diff --git a/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr.robot new file mode 100644 index 0000000000..746e448d95 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr.robot @@ -0,0 +1,179 @@ +# 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 +| Resource | resources/libraries/robot/ip/nat.robot +| 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 +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-snat44ed-h1024-p63-s64512-cps +| +| 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 +| +| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode +| ... | performance test cases* +| +| ... | *[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 +| ... | one static IPv4 /${dest_mask} 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\ +| ... | 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\ +| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | payload. MAC addresses are matching MAC addresses of the TG node\ +| ... | interfaces. +| ... | *[Ref] Applicable standard specifications:* Benchmarking Methodology\ +| ... | for Network Security Device Performance\ +| ... | (draft-ietf-bmwg-ngfw-performance-03). + +*** 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 +| ${max_translations_per_thread}= | 81920 +| ${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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-1024h +| ${cps}= | ${64512} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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} +| | 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} + +| 1518B-1c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 1518B | 1C +| | frame_size=${1518} | phy_cores=${1} + +| 1518B-2c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 1518B | 2C +| | frame_size=${1518} | phy_cores=${2} + +| 1518B-4c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 1518B | 4C +| | frame_size=${1518} | phy_cores=${4} + +| 9000B-1c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 9000B | 1C +| | frame_size=${9000} | phy_cores=${1} + +| 9000B-2c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 9000B | 2C +| | frame_size=${9000} | phy_cores=${2} + +| 9000B-4c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | 9000B | 4C +| | frame_size=${9000} | phy_cores=${4} + +| IMIX-1c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | IMIX | 1C +| | frame_size=IMIX_v4_1 | phy_cores=${1} + +| IMIX-2c-ethip4udp-snat44ed-h1024-p63-s64512-cps-ndrpdr +| | [Tags] | IMIX | 2C +| | frame_size=IMIX_v4_1 | phy_cores=${2} + +| IMIX-4c-ethip4udp-snat44ed-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-snat44ed-h16384-p63-s1032192-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr.robot new file mode 100644 index 0000000000..1e5057a255 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr.robot @@ -0,0 +1,179 @@ +# 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 +| Resource | resources/libraries/robot/ip/nat.robot +| 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 +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-snat44ed-h16384-p63-s1032192-cps +| +| 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 +| +| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode +| ... | performance test cases* +| +| ... | *[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 +| ... | one static IPv4 /${dest_mask} 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\ +| ... | 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\ +| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | payload. MAC addresses are matching MAC addresses of the TG node\ +| ... | interfaces. +| ... | *[Ref] Applicable standard specifications:* Benchmarking Methodology\ +| ... | for Network Security Device Performance\ +| ... | (draft-ietf-bmwg-ngfw-performance-03). + +*** 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 +| ${max_translations_per_thread}= | 655360 +| ${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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-16384h +| ${cps}= | ${1032192} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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} +| | 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} + +| 1518B-1c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 1518B | 1C +| | frame_size=${1518} | phy_cores=${1} + +| 1518B-2c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 1518B | 2C +| | frame_size=${1518} | phy_cores=${2} + +| 1518B-4c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 1518B | 4C +| | frame_size=${1518} | phy_cores=${4} + +| 9000B-1c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 9000B | 1C +| | frame_size=${9000} | phy_cores=${1} + +| 9000B-2c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 9000B | 2C +| | frame_size=${9000} | phy_cores=${2} + +| 9000B-4c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | 9000B | 4C +| | frame_size=${9000} | phy_cores=${4} + +| IMIX-1c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | IMIX | 1C +| | frame_size=IMIX_v4_1 | phy_cores=${1} + +| IMIX-2c-ethip4udp-snat44ed-h16384-p63-s1032192-cps-ndrpdr +| | [Tags] | IMIX | 2C +| | frame_size=IMIX_v4_1 | phy_cores=${2} + +| IMIX-4c-ethip4udp-snat44ed-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-snat44ed-h262144-p63-s16515072-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr.robot new file mode 100644 index 0000000000..0121cacabd --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr.robot @@ -0,0 +1,179 @@ +# 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 +| Resource | resources/libraries/robot/ip/nat.robot +| 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 +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-snat44ed-h262144-p63-s16515072-cps +| +| 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 +| +| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode +| ... | performance test cases* +| +| ... | *[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 +| ... | one static IPv4 /${dest_mask} 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\ +| ... | 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\ +| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | payload. MAC addresses are matching MAC addresses of the TG node\ +| ... | interfaces. +| ... | *[Ref] Applicable standard specifications:* Benchmarking Methodology\ +| ... | for Network Security Device Performance\ +| ... | (draft-ietf-bmwg-ngfw-performance-03). + +*** 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 +| ${max_translations_per_thread}= | 10485760 +| ${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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-262144h +| ${cps}= | ${16515072} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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} +| | 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} + +| 1518B-1c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 1518B | 1C +| | frame_size=${1518} | phy_cores=${1} + +| 1518B-2c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 1518B | 2C +| | frame_size=${1518} | phy_cores=${2} + +| 1518B-4c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 1518B | 4C +| | frame_size=${1518} | phy_cores=${4} + +| 9000B-1c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 9000B | 1C +| | frame_size=${9000} | phy_cores=${1} + +| 9000B-2c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 9000B | 2C +| | frame_size=${9000} | phy_cores=${2} + +| 9000B-4c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | 9000B | 4C +| | frame_size=${9000} | phy_cores=${4} + +| IMIX-1c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | IMIX | 1C +| | frame_size=IMIX_v4_1 | phy_cores=${1} + +| IMIX-2c-ethip4udp-snat44ed-h262144-p63-s16515072-cps-ndrpdr +| | [Tags] | IMIX | 2C +| | frame_size=IMIX_v4_1 | phy_cores=${2} + +| IMIX-4c-ethip4udp-snat44ed-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-snat44ed-h4096-p63-s258048-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr.robot new file mode 100644 index 0000000000..d9e155a5d9 --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr.robot @@ -0,0 +1,179 @@ +# 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 +| Resource | resources/libraries/robot/ip/nat.robot +| 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 +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-snat44ed-h4096-p63-s258048-cps +| +| 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 +| +| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode +| ... | performance test cases* +| +| ... | *[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 +| ... | one static IPv4 /${dest_mask} 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\ +| ... | 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\ +| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | payload. MAC addresses are matching MAC addresses of the TG node\ +| ... | interfaces. +| ... | *[Ref] Applicable standard specifications:* Benchmarking Methodology\ +| ... | for Network Security Device Performance\ +| ... | (draft-ietf-bmwg-ngfw-performance-03). + +*** 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 +| ${max_translations_per_thread}= | 163840 +| ${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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-4096h +| ${cps}= | ${258048} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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} +| | 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} + +| 1518B-1c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 1518B | 1C +| | frame_size=${1518} | phy_cores=${1} + +| 1518B-2c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 1518B | 2C +| | frame_size=${1518} | phy_cores=${2} + +| 1518B-4c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 1518B | 4C +| | frame_size=${1518} | phy_cores=${4} + +| 9000B-1c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 9000B | 1C +| | frame_size=${9000} | phy_cores=${1} + +| 9000B-2c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 9000B | 2C +| | frame_size=${9000} | phy_cores=${2} + +| 9000B-4c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | 9000B | 4C +| | frame_size=${9000} | phy_cores=${4} + +| IMIX-1c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | IMIX | 1C +| | frame_size=IMIX_v4_1 | phy_cores=${1} + +| IMIX-2c-ethip4udp-snat44ed-h4096-p63-s258048-cps-ndrpdr +| | [Tags] | IMIX | 2C +| | frame_size=IMIX_v4_1 | phy_cores=${2} + +| IMIX-4c-ethip4udp-snat44ed-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-snat44ed-h65536-p63-s4128768-cps-ndrpdr.robot b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr.robot new file mode 100644 index 0000000000..a2d1c6ee8b --- /dev/null +++ b/tests/vpp/perf/ip4/2n1l-10ge2p1x710-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr.robot @@ -0,0 +1,179 @@ +# 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 +| Resource | resources/libraries/robot/ip/nat.robot +| 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 +| ... | RXQ_SIZE_0 | TXQ_SIZE_0 +| ... | ethip4udp-snat44ed-h65536-p63-s4128768-cps +| +| 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 +| +| Documentation | *RFC2544: Pkt throughput NAT44 endpoint-dependent mode +| ... | performance test cases* +| +| ... | *[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 +| ... | one static IPv4 /${dest_mask} 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\ +| ... | 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\ +| ... | containing Ethernet header, IPv4 header with UDP header and static\ +| ... | payload. MAC addresses are matching MAC addresses of the TG node\ +| ... | interfaces. +| ... | *[Ref] Applicable standard specifications:* Benchmarking Methodology\ +| ... | for Network Security Device Performance\ +| ... | (draft-ietf-bmwg-ngfw-performance-03). + +*** 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 +| ${max_translations_per_thread}= | 2621440 +| ${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} +# Traffic profile: +| ${traffic_profile}= | trex-astf-ethip4udp-65536h +| ${cps}= | ${4128768} +# Trial data overwrite +| ${trial_duration}= | ${1.1} +| ${trial_multiplicity}= | ${1} + +*** 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} +| | Set Test Variable | \${max_rate} | ${cps} +| | ${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 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} +| | 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 | latency=${False} + +*** Test Cases *** +| 64B-1c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 64B | 1C +| | frame_size=${64} | phy_cores=${1} + +| 64B-2c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 64B | 2C +| | frame_size=${64} | phy_cores=${2} + +| 64B-4c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 64B | 4C +| | frame_size=${64} | phy_cores=${4} + +| 1518B-1c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 1518B | 1C +| | frame_size=${1518} | phy_cores=${1} + +| 1518B-2c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 1518B | 2C +| | frame_size=${1518} | phy_cores=${2} + +| 1518B-4c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 1518B | 4C +| | frame_size=${1518} | phy_cores=${4} + +| 9000B-1c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 9000B | 1C +| | frame_size=${9000} | phy_cores=${1} + +| 9000B-2c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 9000B | 2C +| | frame_size=${9000} | phy_cores=${2} + +| 9000B-4c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | 9000B | 4C +| | frame_size=${9000} | phy_cores=${4} + +| IMIX-1c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | IMIX | 1C +| | frame_size=IMIX_v4_1 | phy_cores=${1} + +| IMIX-2c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | IMIX | 2C +| | frame_size=IMIX_v4_1 | phy_cores=${2} + +| IMIX-4c-ethip4udp-snat44ed-h65536-p63-s4128768-cps-ndrpdr +| | [Tags] | IMIX | 4C +| | frame_size=IMIX_v4_1 | phy_cores=${4} -- 2.16.6