aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-03-13 13:22:08 +0100
committerTibor Frank <tifrank@cisco.com>2017-04-18 13:15:55 +0200
commit9567fe498402331d552ae96ede19f8fd9e6b7fd1 (patch)
tree4a0ff4216a90aee64d40a07e2ed5a813076e0618
parentcecbb10a2bb7444ad96e23744d0cd7ba66f87f09 (diff)
CSIT-545: Performance tests for SNAT
- High level definition (HLD) - Low level definition (LLD) - Add keywords to set SNAT - Add tests according to HLD, LLD Change-Id: I7bf0b1870ac9c3adb36bb6590be9a3eb4ea8aa9a Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--docs/tag_documentation.rst4
-rw-r--r--resources/libraries/python/SNATUtil.py171
-rw-r--r--resources/libraries/python/TrafficGenerator.py155
-rw-r--r--resources/libraries/python/VppConfigGenerator.py122
-rw-r--r--resources/libraries/python/ssh.py2
-rw-r--r--resources/libraries/robot/default.robot8
-rw-r--r--resources/libraries/robot/performance.robot37
-rw-r--r--resources/libraries/robot/snat.robot150
-rw-r--r--resources/templates/vat/snat/snat_deterministic_forward.vat1
-rw-r--r--resources/templates/vat/snat/snat_deterministic_reverse.vat1
-rw-r--r--resources/templates/vat/snat/snat_set_deterministic.vat1
-rw-r--r--resources/templates/vat/snat/snat_set_interfaces.vat1
-rw-r--r--resources/templates/vat/snat/snat_set_workers.vat1
-rw-r--r--resources/templates/vat/snat/snat_show_snat.vat1
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py118
-rw-r--r--tests/perf/10ge2p1x520-ethip4-ip4base-snat-ndrpdrdisc.robot246
-rw-r--r--tests/perf/10ge2p1x520-ethip4-ip4scale-snat-ndrpdrdisc.robot919
17 files changed, 1891 insertions, 47 deletions
diff --git a/docs/tag_documentation.rst b/docs/tag_documentation.rst
index 7d458c2924..4edcaac526 100644
--- a/docs/tag_documentation.rst
+++ b/docs/tag_documentation.rst
@@ -289,6 +289,10 @@ Feature tags
COP whitelist.
+.. topic:: SNAT
+
+ SNAT configured and tested.
+
Encryption tags
---------------
diff --git a/resources/libraries/python/SNATUtil.py b/resources/libraries/python/SNATUtil.py
new file mode 100644
index 0000000000..02cf493a93
--- /dev/null
+++ b/resources/libraries/python/SNATUtil.py
@@ -0,0 +1,171 @@
+# Copyright (c) 2017 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.
+
+"""SNAT utilities library."""
+
+from resources.libraries.python.VatExecutor import VatTerminal
+
+
+class SNATUtil(object):
+ """This class defines the methods to set SNAT."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def set_snat_interfaces(node, int_in, int_out):
+ """Set inside and outside interfaces for SNAT.
+
+ :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
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If setting of inside and outside interfaces for
+ SNAT fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_set_interfaces.vat',
+ int_in=int_in, int_out=int_out)
+ return response
+ except:
+ raise RuntimeError("Setting of inside and outside interfaces for "
+ "SNAT failed!")
+
+ @staticmethod
+ def set_snat_deterministic(node, ip_in, subnet_in, ip_out, subnet_out):
+ """Set deterministic behaviour of SNAT.
+
+ :param node: DUT node.
+ :param ip_in: Inside IP.
+ :param subnet_in: Inside IP subnet.
+ :param ip_out: Outside IP.
+ :param subnet_out: Outside IP subnet.
+ :type node: dict
+ :type ip_in: str
+ :type subnet_in: str or int
+ :type ip_out: str
+ :type subnet_out: str or int
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If setting of deterministic behaviour of SNAT
+ fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_set_deterministic.vat',
+ ip_in=ip_in, subnet_in=subnet_in,
+ ip_out=ip_out, subnet_out=subnet_out)
+ return response
+ except:
+ raise RuntimeError("Setting of deterministic behaviour of SNAT "
+ "failed!")
+
+ @staticmethod
+ def set_snat_workers(node, lcores):
+ """Set SNAT workers.
+
+ :param node: DUT node.
+ :param lcores: list of cores, format: range e.g. 1-5 or list of ranges
+ e.g.: 1-5,18-22.
+ :type node: dict
+ :type lcores: str
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If setting of SNAT workers fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_set_workers.vat', lcores=lcores)
+ return response
+ except:
+ raise RuntimeError("Setting of SNAT workers failed!")
+
+ @staticmethod
+ def show_snat(node):
+ """Show the SNAT settings.
+
+ :param node: DUT node.
+ :type node: dict
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If getting of SNAT settings fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_show_snat.vat')
+ return response
+ except:
+ raise RuntimeError("Getting of SNAT settings failed!")
+
+ @staticmethod
+ def show_snat_deterministic_forward(node, ip_addr):
+ """Show forward IP address and port(s).
+
+ :param node: DUT node.
+ :param ip_addr: IP address.
+ :type node: dict
+ :type ip_addr: str
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If command 'exec snat deterministic forward'
+ fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_deterministic_forward.vat', ip=ip_addr)
+ return response
+ except:
+ raise RuntimeError("Command 'exec snat deterministic forward {ip}'"
+ " failed!".format(ip=ip_addr))
+
+ @staticmethod
+ def show_snat_deterministic_reverse(node, ip_addr, port):
+ """Show reverse IP address.
+
+ :param node: DUT node.
+ :param ip_addr: IP address.
+ :param port: Port.
+ :type node: dict
+ :type ip_addr: str
+ :type port: str or int
+ :returns: Response of the command.
+ :rtype: str
+ :raises RuntimeError: If command 'exec snat deterministic reverse'
+ fails.
+ """
+
+ try:
+ with VatTerminal(node, json_param=False) as vat:
+ response = vat.vat_terminal_exec_cmd_from_template(
+ 'snat/snat_deterministic_reverse.vat',
+ ip=ip_addr, port=port)
+ return response
+ except:
+ raise RuntimeError(
+ "Command 'exec snat deterministic reverse {ip}:{port}'"
+ " failed!".format(ip=ip_addr, port=port))
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 2313ec856b..8387ce2b3c 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -438,6 +438,161 @@ class TrafficGenerator(object):
_p0, _p1, _async, _latency,
warmup_time),
timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-1u-1p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.0.0 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1024 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1028 "
+ "--p{5}_dst_end_udp_port 1028 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-1u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.0.0 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 1038 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-10u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.0.9 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 1173 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-100u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.0.99 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 2523 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration) + 60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-1000u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.3.231 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 16023 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-2000u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.7.207 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 31022 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
+ elif traffic_type in ["3-node-IPv4-SNAT-4000u-15p"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} "
+ "--p{4}_src_start_ip 20.0.0.0 "
+ "--p{4}_src_end_ip 20.0.15.159 "
+ "--p{4}_dst_start_ip 12.0.0.2 "
+ "--p{5}_src_start_ip 12.0.0.2 "
+ "--p{5}_src_end_ip 12.0.0.2 "
+ "--p{5}_dst_start_ip 200.0.0.0 "
+ "--p{4}_src_start_udp_port 1024 "
+ "--p{4}_src_end_udp_port 1038 "
+ "--p{4}_dst_start_udp_port 1024 "
+ "--p{5}_src_start_udp_port 1024 "
+ "--p{5}_dst_start_udp_port 1024 "
+ "--p{5}_dst_end_udp_port 61022 "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+
elif traffic_type in ["3-node-IPv4-dst-10000"]:
(ret, stdout, stderr) = ssh.exec_command(
"sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 267c47845f..e109d768fa 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -67,7 +67,7 @@ ip6 {{
hash-buckets 2000000
heap-size 3G
}}
-
+{snatconfig}
"""
# End VPP configuration template.
@@ -83,22 +83,21 @@ class VppConfigGenerator(object):
:param node: DUT node
:type node: dict
- :return: nothing
+ :returns: nothing
"""
for port in node['interfaces'].keys():
pci_addr = Topology.get_interface_pci_addr(node, port)
if pci_addr:
self.add_pci_device(node, pci_addr)
-
def add_pci_device(self, node, *pci_devices):
"""Add PCI device configuration for node.
:param node: DUT node.
- :param pci_device: PCI devices (format 0000:00:00.0 or 00:00.0)
+ :param pci_devices: PCI devices (format 0000:00:00.0 or 00:00.0)
:type node: dict
:type pci_devices: tuple
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -129,7 +128,7 @@ class VppConfigGenerator(object):
:param cpu_config: CPU configuration option, as a string.
:type node: dict
:type cpu_config: str
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -150,7 +149,7 @@ class VppConfigGenerator(object):
as a string.
:type node: dict
:type socketmem_config: str
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -168,7 +167,7 @@ class VppConfigGenerator(object):
:param heapsize_config: Heap Size configuration, as a string.
:type node: dict
:type heapsize_config: str
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -186,56 +185,73 @@ class VppConfigGenerator(object):
:param rxqueues_config: Rxqueues configuration, as a string.
:type node: dict
:type rxqueues_config: str
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
- if not hostname in self._nodeconfig:
+ if hostname not in self._nodeconfig:
self._nodeconfig[hostname] = {}
- if not 'rxqueues_config' in self._nodeconfig[hostname]:
+ if 'rxqueues_config' not in self._nodeconfig[hostname]:
self._nodeconfig[hostname]['rxqueues_config'] = []
self._nodeconfig[hostname]['rxqueues_config'].append(rxqueues_config)
- logger.debug('Setting hostname {} rxqueues config to {}'.\
- format(hostname, rxqueues_config))
+ logger.debug('Setting hostname {} rxqueues config to {}'.
+ format(hostname, rxqueues_config))
def add_no_multi_seg_config(self, node):
"""Add No Multi Seg configuration for node.
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
- if not hostname in self._nodeconfig:
+ if hostname not in self._nodeconfig:
self._nodeconfig[hostname] = {}
- if not 'no_multi_seg_config' in self._nodeconfig[hostname]:
+ if 'no_multi_seg_config' not in self._nodeconfig[hostname]:
self._nodeconfig[hostname]['no_multi_seg_config'] = []
- self._nodeconfig[hostname]['no_multi_seg_config'].append(
- "no-multi-seg")
- logger.debug('Setting hostname {} config with {}'.\
- format(hostname, "no-multi-seg"))
+ self._nodeconfig[hostname]['no_multi_seg_config'].append("no-multi-seg")
+ logger.debug('Setting hostname {} config with {}'.
+ format(hostname, "no-multi-seg"))
def add_enable_vhost_user_config(self, node):
"""Add enable-vhost-user configuration for node.
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
- if not hostname in self._nodeconfig:
+ if hostname not in self._nodeconfig:
self._nodeconfig[hostname] = {}
- if not 'enable_vhost_user' in self._nodeconfig[hostname]:
+ if 'enable_vhost_user' not in self._nodeconfig[hostname]:
self._nodeconfig[hostname]['enable_vhost_user'] = []
- self._nodeconfig[hostname]['enable_vhost_user'].append(
- "enable-vhost-user")
- logger.debug('Setting hostname {} config with {}'.\
- format(hostname, "enable-vhost-user"))
+ self._nodeconfig[hostname]['enable_vhost_user'].\
+ append("enable-vhost-user")
+ logger.debug('Setting hostname {} config with {}'.
+ format(hostname, "enable-vhost-user"))
+
+ def add_snat_config(self, node):
+ """Add SNAT configuration for the node.
+
+ :param node: DUT node.
+ :type node: dict
+ :returns: nothing
+ """
+ if node['type'] != NodeType.DUT:
+ raise ValueError('Node type is not a DUT')
+ hostname = Topology.get_node_hostname(node)
+ if hostname not in self._nodeconfig:
+ self._nodeconfig[hostname] = {}
+ if 'snat_config' not in self._nodeconfig[hostname]:
+ self._nodeconfig[hostname]['snat_config'] = []
+ self._nodeconfig[hostname]['snat_config'].append("deterministic")
+ logger.debug('Setting hostname {} config with {}'.
+ format(hostname, "SNAT"))
def add_cryptodev_config(self, node, count):
"""Add cryptodev configuration for node.
@@ -276,7 +292,7 @@ class VppConfigGenerator(object):
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -291,7 +307,7 @@ class VppConfigGenerator(object):
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -306,7 +322,7 @@ class VppConfigGenerator(object):
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -337,7 +353,7 @@ class VppConfigGenerator(object):
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
@@ -352,45 +368,59 @@ class VppConfigGenerator(object):
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
if hostname in self._nodeconfig:
self._nodeconfig[hostname]['rxqueues_config'] = []
- logger.debug('Clearing rxqueues config for hostname {}.'.\
- format(hostname))
+ logger.debug('Clearing rxqueues config for hostname {}.'.
+ format(hostname))
def remove_no_multi_seg_config(self, node):
"""Remove No Multi Seg configuration from node.
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
if hostname in self._nodeconfig:
self._nodeconfig[hostname]['no_multi_seg_config'] = []
- logger.debug('Clearing No Multi Seg config for hostname {}.'.\
- format(hostname))
+ logger.debug('Clearing No Multi Seg config for hostname {}.'.
+ format(hostname))
def remove_enable_vhost_user_config(self, node):
"""Remove enable-vhost-user configuration from node.
:param node: DUT node.
:type node: dict
- :return: nothing
+ :returns: nothing
"""
if node['type'] != NodeType.DUT:
raise ValueError('Node type is not a DUT')
hostname = Topology.get_node_hostname(node)
if hostname in self._nodeconfig:
self._nodeconfig[hostname]['enable_vhost_user'] = []
- logger.debug('Clearing enable-vhost-user config for hostname {}.'.\
- format(hostname))
+ logger.debug('Clearing enable-vhost-user config for hostname {}.'.
+ format(hostname))
+
+ def remove_snat_config(self, node):
+ """Remove SNAT configuration for the node.
+
+ :param node: DUT node.
+ :type node: dict
+ :returns: nothing
+ """
+ if node['type'] != NodeType.DUT:
+ raise ValueError('Node type is not a DUT')
+ hostname = Topology.get_node_hostname(node)
+ if hostname in self._nodeconfig:
+ self._nodeconfig[hostname]['snat_config'] = []
+ logger.debug('Clearing SNAT config for hostname {}.'.format(hostname))
def apply_config(self, node, waittime=5, retries=12):
"""Generate and apply VPP configuration for node.
@@ -404,6 +434,8 @@ class VppConfigGenerator(object):
:type node: dict
:type waittime: int
:type retries: int
+ :raises RuntimeError: If writing config file failed, or restarting of
+ VPP failed.
"""
if node['type'] != NodeType.DUT:
@@ -420,6 +452,7 @@ class VppConfigGenerator(object):
enablevhostuser = ""
cryptodevconfig = ""
uiodriverconfig = ""
+ snatconfig = ""
if hostname in self._nodeconfig:
cfg = self._nodeconfig[hostname]
@@ -451,6 +484,11 @@ class VppConfigGenerator(object):
if 'enable_vhost_user' in cfg:
enablevhostuser = " " + "\n ".join(cfg['enable_vhost_user'])
+ if 'snat_config' in cfg:
+ snatconfig = "snat {\n"
+ snatconfig += " " + "\n ".join(cfg['snat_config'])
+ snatconfig += "\n}"
+
vppconfig = VPP_CONFIG_TEMPLATE.format(cpuconfig=cpuconfig,
pciconfig=pciconfig,
cryptodevconfig=cryptodevconfig,
@@ -460,7 +498,8 @@ class VppConfigGenerator(object):
rxqueuesconfig=rxqueuesconfig,
txqueuesconfig=txqueuesconfig,
nomultiseg=nomultiseg,
- enablevhostuser=enablevhostuser)
+ enablevhostuser=enablevhostuser,
+ snatconfig=snatconfig)
logger.debug('Writing VPP config to host {}: "{}"'.format(hostname,
vppconfig))
@@ -517,7 +556,6 @@ class VppConfigGenerator(object):
(ret, stdout, stderr) = \
ssh.exec_command('echo show hardware-interfaces | '
'nc 0 5002')
-
if ret == 0:
vpp_is_running = True
else:
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index 7b15998be0..961f7e2ee8 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -285,7 +285,7 @@ class SSH(object):
logger.trace('SCP {0} to {1}:{2}'.format(
local_path, self._ssh.get_transport().getpeername(), remote_path))
# SCPCLient takes a paramiko transport as its only argument
- scp = SCPClient(self._ssh.get_transport())
+ scp = SCPClient(self._ssh.get_transport(), socket_timeout=10)
start = time()
scp.put(local_path, remote_path)
scp.close()
diff --git a/resources/libraries/robot/default.robot b/resources/libraries/robot/default.robot
index 08315c32ef..05314d6a15 100644
--- a/resources/libraries/robot/default.robot
+++ b/resources/libraries/robot/default.robot
@@ -281,6 +281,13 @@
| | :FOR | ${dut} | IN | @{duts}
| | | Add Enable Vhost User Config | ${nodes['${dut}']}
+| Add SNAT to all DUTs
+| | [Documentation] | Add SNAT configuration to all DUTs.
+| | ...
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Add SNAT Config | ${nodes['${dut}']}
+
| Add Cryptodev to all DUTs
| | [Documentation] | AddCryptodev to VPP startup configuration to all
| | ... | DUTs
@@ -310,6 +317,7 @@
| | | Remove Rxqueues Config | ${nodes['${dut}']}
| | | Remove No Multi Seg Config | ${nodes['${dut}']}
| | | Remove Enable Vhost User Config | ${nodes['${dut}']}
+| | | Remove SNAT Config | ${nodes['${dut}']}
| Setup default startup configuration of VPP on all DUTs
| | [Documentation] | Setup default startup configuration of VPP to all DUTs.
diff --git a/resources/libraries/robot/performance.robot b/resources/libraries/robot/performance.robot
index ee662841c9..69d8fdb7aa 100644
--- a/resources/libraries/robot/performance.robot
+++ b/resources/libraries/robot/performance.robot
@@ -2288,6 +2288,43 @@
| | dut1_v4.set_arp | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
| | dut2_v4.set_arp | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
+| SNAT is initialized in a 3-node circular topology
+| | [Documentation] | Initialization of 3-node topology with SNAT between DUTs:
+| | ... | - set interfaces up
+| | ... | - set IP addresses
+| | ... | - set ARP
+| | ... | - create routes
+| | ... | - set SNAT - only on DUT1
+| | ...
+| | Set Interface State | ${dut1} | ${dut1_if1} | up
+| | Set Interface State | ${dut1} | ${dut1_if2} | up
+| | Set Interface State | ${dut2} | ${dut2_if1} | up
+| | Set Interface State | ${dut2} | ${dut2_if2} | up
+| | All Vpp Interfaces Ready Wait | ${nodes}
+| | ...
+| | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
+| | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 11.0.0.1 | 20
+| | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 11.0.0.2 | 20
+| | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 12.0.0.1 | 20
+| | ...
+| | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
+| | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
+| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
+| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
+| | ...
+| | Add arp on dut | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
+| | Add arp on dut | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
+| | Add arp on dut | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
+| | Add arp on dut | ${dut2} | ${dut2_if2} | 12.0.0.2 | ${tg_if2_mac}
+| | ...
+| | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | 11.0.0.2 | ${dut1_if2}
+| | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | 10.0.0.2 | ${dut1_if1}
+| | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | 12.0.0.2 | ${dut2_if2}
+| | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | 11.0.0.1 | ${dut2_if1}
+| | ...
+| | Set inside and outside interfaces | ${dut1} | ${dut1_if1} | ${dut1_if2}
+| | Set deterministic mode for SNAT | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
+
| DPDK 2-node Performance Suite Setup with DUT's NIC model
| | [Documentation]
| | ... | Updates interfaces on all nodes and setup global
diff --git a/resources/libraries/robot/snat.robot b/resources/libraries/robot/snat.robot
new file mode 100644
index 0000000000..12c7a71369
--- /dev/null
+++ b/resources/libraries/robot/snat.robot
@@ -0,0 +1,150 @@
+# Copyright (c) 2017 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 ***
+| Library | resources.libraries.python.SNATUtil
+| Library | resources.libraries.python.NAT.NATUtil
+| Documentation | Keywords for SNAT feature in VPP.
+
+*** Keywords ***
+| Set inside and outside interfaces
+| | [Documentation] | Set inside and outside interfaces for SNAT.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to set SNAT interfaces on. Type: dictionary
+| | ... | - int_in - Inside interface. Type: string
+| | ... | - int_out - Outside interface. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set inside and outside interfaces \| ${nodes['DUT1']} \
+| | ... | \| FortyGigabitEtherneta/0/0 \| FortyGigabitEtherneta/0/1 \|
+| | ...
+| | [Arguments] | ${node} | ${int_in} | ${int_out}
+| | ...
+| | ${int_in_name}= | Set variable | ${node['interfaces']['${int_in}']['name']}
+| | ${int_out_name}= | Set variable | ${node['interfaces']['${int_out}']['name']}
+| | Set SNAT Interfaces | ${node} | ${int_in_name} | ${int_out_name}
+
+| Set deterministic mode for SNAT
+| | [Documentation] | Set deterministic behaviour of SNAT.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to set deterministic mode for SNAT on.
+| | ... | Type: dictionary
+| | ... | - ip_in - Inside IP. Type: string
+| | ... | - subnet_in - Inside IP subnet. Type: string
+| | ... | - ip_out - Outside IP. Type: string
+| | ... | - subnet_out - Outside IP subnet. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set deterministic mode for SNAT \| ${nodes['DUT1']} \
+| | ... | \| 100.0.0.0 \| 12 \| 12.1.1.0 \| 24 \|
+| | ...
+| | [Arguments] | ${node} | ${ip_in} | ${subnet_in} | ${ip_out} | ${subnet_out}
+| | ...
+| | Set SNAT deterministic | ${node} | ${ip_in} | ${subnet_in} | ${ip_out}
+| | ... | ${subnet_out}
+
+| Set workers for SNAT
+| | [Documentation] | Set workers for SNAT.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to set SNAT workers on. Type: dictionary
+| | ... | - lcores - list of cores, format: range e.g. 1-5 or list of ranges \
+| | ... | e.g.: 1-5,18-22. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set workers for SNAT \| ${nodes['DUT1']} \| 12-23,36-47 \|
+| | ...
+| | [Arguments] | ${node} | ${lcores}
+| | ...
+| | Set SNAT workers | ${node} | ${lcores}
+
+| Show SNAT verbose
+| | [Documentation] | Get the SNAT settings on the node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to show SNAT. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Show SNAT verbose \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | ...
+| | Show SNAT | ${node}
+
+| Get SNAT deterministic forward
+| | [Documentation] | Show forward IP address and port(s).
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to get SNAT deterministic forward on.
+| | ... | Type: dictionary
+| | ... | - ip - IP address. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Get SNAT deterministic forward \| ${nodes['DUT1']} \| 10.0.0.2 \|
+| | ...
+| | [Arguments] | ${node} | ${ip}
+| | ...
+| | Show SNAT deterministic forward | ${node} | ${ip}
+
+| Get SNAT deterministic reverse
+| | [Documentation] | Show reverse IP address.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to get SNAT deterministic reverse on.
+| | ... | Type: dictionary
+| | ... | - ip - IP address. Type: string
+| | ... | - port - Port. Type: string or integer
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Get SNAT deterministic reverse \| ${nodes['DUT1']} \| 10.0.0.2 \
+| | ... | \| 1025 \|
+| | ...
+| | [Arguments] | ${node} | ${ip} | ${port}
+| | ...
+| | Show SNAT deterministic reverse | ${node} | ${ip} | ${port}
+
+| Get NAT interfaces
+| | [Documentation] | Get list of interfaces configured with NAT from VPP node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to get SNAT interfaces on. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Get NAT interfaces \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | ...
+| | VPP get NAT interfaces | ${node}
+
+| Get NAT static mappings
+| | [Documentation] | Get NAT static mappings from VPP node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - DUT node to get SNAT static mappings on. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Get NAT static mappings \| ${nodes['DUT1']} \|
+| | ...
+| | [Arguments] | ${node}
+| | ...
+| | VPP get NAT static mappings | ${node}
diff --git a/resources/templates/vat/snat/snat_deterministic_forward.vat b/resources/templates/vat/snat/snat_deterministic_forward.vat
new file mode 100644
index 0000000000..3bb7b2b1f9
--- /dev/null
+++ b/resources/templates/vat/snat/snat_deterministic_forward.vat
@@ -0,0 +1 @@
+exec snat deterministic forward {ip} \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_deterministic_reverse.vat b/resources/templates/vat/snat/snat_deterministic_reverse.vat
new file mode 100644
index 0000000000..1b9ac5bac5
--- /dev/null
+++ b/resources/templates/vat/snat/snat_deterministic_reverse.vat
@@ -0,0 +1 @@
+exec snat deterministic reverse {ip}:{port} \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_set_deterministic.vat b/resources/templates/vat/snat/snat_set_deterministic.vat
new file mode 100644
index 0000000000..200ae69008
--- /dev/null
+++ b/resources/templates/vat/snat/snat_set_deterministic.vat
@@ -0,0 +1 @@
+exec snat deterministic add in {ip_in}/{subnet_in} out {ip_out}/{subnet_out} \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_set_interfaces.vat b/resources/templates/vat/snat/snat_set_interfaces.vat
new file mode 100644
index 0000000000..905c219ca3
--- /dev/null
+++ b/resources/templates/vat/snat/snat_set_interfaces.vat
@@ -0,0 +1 @@
+exec set interface snat in {int_in} out {int_out} \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_set_workers.vat b/resources/templates/vat/snat/snat_set_workers.vat
new file mode 100644
index 0000000000..23e8bac3eb
--- /dev/null
+++ b/resources/templates/vat/snat/snat_set_workers.vat
@@ -0,0 +1 @@
+exec set snat workers {lcores} \ No newline at end of file
diff --git a/resources/templates/vat/snat/snat_show_snat.vat b/resources/templates/vat/snat/snat_show_snat.vat
new file mode 100644
index 0000000000..0ce9f1e914
--- /dev/null
+++ b/resources/templates/vat/snat/snat_show_snat.vat
@@ -0,0 +1 @@
+exec show snat verbose \ No newline at end of file
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
index 504ef50eef..ae8d187670 100755
--- a/resources/tools/t-rex/t-rex-stateless.py
+++ b/resources/tools/t-rex/t-rex-stateless.py
@@ -172,12 +172,13 @@ def create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size):
return (stream1, stream2, lat_stream1, lat_stream2)
+
def create_streams(traffic_options, frame_size=64):
"""Create two IP packets to be used in stream.
:param traffic_options: Parameters for packets.
:param frame_size: Size of L2 frame.
- :type traffic_options: list
+ :type traffic_options: dict
:type frame_size: int
:return: Packet instances.
:rtype: Tuple of STLPktBuilder
@@ -197,13 +198,91 @@ def create_streams(traffic_options, frame_size=64):
p1_dst_end_ip = traffic_options['p1_dst_end_ip']
p2_dst_end_ip = traffic_options['p2_dst_end_ip']
- base_pkt_a = Ether()/IP(src=p1_src_start_ip, dst=p1_dst_start_ip, proto=61)
- base_pkt_b = Ether()/IP(src=p2_src_start_ip, dst=p2_dst_start_ip, proto=61)
+ try:
+ p1_src_start_udp_port = traffic_options['p1_src_start_udp_port']
+ p1_src_end_udp_port = traffic_options['p1_src_end_udp_port']
+ p1_dst_start_udp_port = traffic_options['p1_dst_start_udp_port']
+ p2_src_start_udp_port = traffic_options['p2_src_start_udp_port']
+ p2_dst_start_udp_port = traffic_options['p2_dst_start_udp_port']
+ p2_dst_end_udp_port = traffic_options['p2_dst_end_udp_port']
+ ports_defined = True
+ except KeyError:
+ ports_defined = False
+
+ if ports_defined:
+ base_pkt_a = (Ether() /
+ IP(src=p1_src_start_ip, dst=p1_dst_start_ip, proto=17) /
+ UDP(sport=int(p1_src_start_udp_port),
+ dport=int(p1_dst_start_udp_port)))
+ base_pkt_b = (Ether() /
+ IP(src=p2_src_start_ip, dst=p2_dst_start_ip, proto=17) /
+ UDP(sport=int(p2_src_start_udp_port),
+ dport=int(p2_dst_start_udp_port)))
+ else:
+ base_pkt_a = Ether() / IP(src=p1_src_start_ip, dst=p1_dst_start_ip,
+ proto=61)
+ base_pkt_b = Ether() / IP(src=p2_src_start_ip, dst=p2_dst_start_ip,
+ proto=61)
# The following code applies raw instructions to packet (IP src/dst
# increment). It splits the generated traffic by "ip_src"/"ip_dst" variable
# to cores and fix IPv4 header checksum.
- if p1_dst_end_ip and p2_dst_end_ip:
+ if ports_defined:
+ if p1_src_start_udp_port != p1_src_end_udp_port and \
+ p1_src_start_ip != p1_src_end_ip:
+ vm1 = STLScVmRaw([
+ STLVmTupleGen(ip_min=p1_src_start_ip,
+ ip_max=p1_src_end_ip,
+ port_min=int(p1_src_start_udp_port),
+ port_max=int(p1_src_end_udp_port),
+ name="tuple"),
+ STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+ STLVmFixIpv4(offset="IP"),
+ STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+ ])
+ vm2 = STLScVmRaw([
+ STLVmTupleGen(ip_min=p2_dst_start_ip,
+ ip_max=p2_dst_start_ip,
+ port_min=int(p2_dst_start_udp_port),
+ port_max=int(p2_dst_end_udp_port),
+ name="tuple"),
+ STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.dst"),
+ STLVmFixIpv4(offset="IP"),
+ STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.dport")
+ ])
+ elif p1_src_start_udp_port != p1_src_end_udp_port:
+ vm1 = STLScVmRaw([
+ STLVmFlowVar(name="sport",
+ min_value=int(p1_src_start_udp_port),
+ max_value=int(p1_src_end_udp_port),
+ size=2, op="inc"),
+ STLVmWrFlowVar(fv_name="sport", pkt_offset="UDP.sport")
+ ])
+ vm2 = STLScVmRaw([
+ STLVmFlowVar(name="dport",
+ min_value=int(p2_dst_start_udp_port),
+ max_value=int(p2_dst_end_udp_port),
+ size=2, op="inc"),
+ STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+ ])
+ elif p1_src_start_udp_port == p1_src_end_udp_port:
+ vm1 = STLScVmRaw([STLVmFlowVar(name="src",
+ min_value=p1_src_start_ip,
+ max_value=p1_src_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="src",
+ pkt_offset="IP.src"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="src")
+ vm2 = STLScVmRaw([STLVmFlowVar(name="src",
+ min_value=p2_src_start_ip,
+ max_value=p2_src_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="src",
+ pkt_offset="IP.src"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="src")
+ elif p1_dst_end_ip and p2_dst_end_ip:
vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
min_value=p1_dst_start_ip,
max_value=p1_dst_end_ip,
@@ -524,6 +603,7 @@ def parse_args():
# help="Port 1 source MAC address")
# parser.add_argument("--p1_dst_mac",
# help="Port 1 destination MAC address")
+
parser.add_argument("--p1_src_start_ip", required=True,
help="Port 1 source start IP address")
parser.add_argument("--p1_src_end_ip",
@@ -534,10 +614,26 @@ def parse_args():
parser.add_argument("--p1_dst_end_ip",
default=False,
help="Port 1 destination end IP address")
+
+ parser.add_argument("--p1_src_start_udp_port",
+ default=None,
+ help="Port 1 source start UDP port.")
+ parser.add_argument("--p1_src_end_udp_port",
+ default=None,
+ help="Port 1 source end UDP port.")
+
+ parser.add_argument("--p1_dst_start_udp_port",
+ default=None,
+ help="Port 1 destination start UDP port.")
+ parser.add_argument("--p1_dst_end_udp_port",
+ default=None,
+ help="Port 1 destination end UDP port.")
+
# parser.add_argument("--p2_src_mac",
# help="Port 2 source MAC address")
# parser.add_argument("--p2_dst_mac",
# help="Port 2 destination MAC address")
+
parser.add_argument("--p2_src_start_ip", required=True,
help="Port 2 source start IP address")
parser.add_argument("--p2_src_end_ip",
@@ -549,6 +645,20 @@ def parse_args():
default=False,
help="Port 2 destination end IP address")
+ parser.add_argument("--p2_src_start_udp_port",
+ default=None,
+ help="Port 2 source start UDP port.")
+ parser.add_argument("--p2_src_end_udp_port",
+ default=None,
+ help="Port 2 source end UDP port.")
+
+ parser.add_argument("--p2_dst_start_udp_port",
+ default=None,
+ help="Port 2 destination start UDP port.")
+ parser.add_argument("--p2_dst_end_udp_port",
+ default=None,
+ help="Port 2 destination end UDP port.")
+
return parser.parse_args()
diff --git a/tests/perf/10ge2p1x520-ethip4-ip4base-snat-ndrpdrdisc.robot b/tests/perf/10ge2p1x520-ethip4-ip4base-snat-ndrpdrdisc.robot
new file mode 100644
index 0000000000..21227c0316
--- /dev/null
+++ b/tests/perf/10ge2p1x520-ethip4-ip4base-snat-ndrpdrdisc.robot
@@ -0,0 +1,246 @@
+# Copyright (c) 2017 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/performance.robot
+| Resource | resources/libraries/robot/snat.robot
+| Resource | resources/libraries/robot/traffic.robot
+| ...
+| Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
+| ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | FEATURE | SNAT | BASE | THIS
+| ...
+| Suite Setup | 3-node Performance Suite Setup with DUT's NIC model
+| ... | L3 | Intel-X520-DA2
+| Suite Teardown | 3-node Performance Suite Teardown
+| ...
+| Test Setup | Performance test setup
+| ...
+| Documentation | *SNAT performance test cases*
+| ...
+| ... | *High level description*
+| ...
+| ... | - NDR and PDR tests
+| ... | - 3-node topology, TG-DUT1-DUT2-TG, SNAT is enabled between DUTs.
+| ... | - Cores / threads: 1t1c and 2t2c
+| ... | - Framesize: 64B, 1518B, IMIX
+| ... | - Packet: ETH / IP(src, dst) / UDP(src_port, dst_port) / payload
+| ...
+| ... | *Low level description*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
+| ... | with single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing.
+| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
+| ... | routing and two static IPv4 /24 and IPv4/20 route entries. DUT1 and DUT2
+| ... | tested with 2p10GE NIC X520 Niantic by Intel.
+| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
+| ... | Rate) with zero packet loss tolerance or 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 either binary search or linear search
+| ... | algorithms with configured starting rate and final step that determines
+| ... | throughput measurement resolution. Test packets are generated by TG on
+| ... | links to DUTs. TG traffic profile contains two L3 flow-groups
+| ... | (flow-group per direction, one flow per flow-group) 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 ***
+# X520-DA2 bandwidth limit
+| ${s_limit} | ${10000000000}
+
+*** Test Cases ***
+| tc01-64B-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-1p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc02-64B-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-1p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc03-1518B-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-1p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc04-1518B-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-1p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc05-IMIX-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-1p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc06-IMIX-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 1 port (session) per user.
+| | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-1p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-1p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
diff --git a/tests/perf/10ge2p1x520-ethip4-ip4scale-snat-ndrpdrdisc.robot b/tests/perf/10ge2p1x520-ethip4-ip4scale-snat-ndrpdrdisc.robot
new file mode 100644
index 0000000000..a9b0c5df16
--- /dev/null
+++ b/tests/perf/10ge2p1x520-ethip4-ip4scale-snat-ndrpdrdisc.robot
@@ -0,0 +1,919 @@
+# Copyright (c) 2017 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/performance.robot
+| Resource | resources/libraries/robot/snat.robot
+| Resource | resources/libraries/robot/traffic.robot
+| ...
+| Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
+| ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | FEATURE | SNAT | SCALE | THIS
+| ...
+| Suite Setup | 3-node Performance Suite Setup with DUT's NIC model
+| ... | L3 | Intel-X520-DA2
+| Suite Teardown | 3-node Performance Suite Teardown
+| ...
+| Test Setup | Performance test setup
+| ...
+| Documentation | *SNAT performance test cases*
+| ...
+| ... | *High level description*
+| ...
+| ... | - NDR and PDR tests
+| ... | - 3-node topology, TG-DUT1-DUT2-TG, SNAT is enabled between DUTs.
+| ... | - Cores / threads: 1t1c and 2t2c
+| ... | - Framesize: 64B, 1518B, IMIX
+| ... | - Packet: ETH / IP(src, dst) / UDP(src_port, dst_port) / payload
+| ... | - scale: src: 1 user, 10 users, 100 users, ..., 4000 up to the memory
+| ... | limit; 15 ports per user
+| ...
+| ... | *Low level description*
+| ...
+| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
+| ... | with single links between nodes.
+| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing.
+| ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
+| ... | routing and two static IPv4 /24 and IPv4/20 route entries. DUT1 and DUT2
+| ... | tested with 2p10GE NIC X520 Niantic by Intel.
+| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
+| ... | Rate) with zero packet loss tolerance or 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 either binary search or linear search
+| ... | algorithms with configured starting rate and final step that determines
+| ... | throughput measurement resolution. Test packets are generated by TG on
+| ... | links to DUTs. TG traffic profile contains two L3 flow-groups
+| ... | (flow-group per direction, one flow per flow-group) 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 ***
+# X520-DA2 bandwidth limit
+| ${s_limit} | ${10000000000}
+
+*** Test Cases ***
+| tc01-64B-1t1c-ethip4-ip4base-snat-1u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc02-64B-1t1c-ethip4-ip4base-snat-1u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc03-64B-1t1c-ethip4-ip4base-snat-10u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-10u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc04-64B-1t1c-ethip4-ip4base-snat-10u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-10u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc05-64B-1t1c-ethip4-ip4base-snat-100u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-100u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc06-64B-1t1c-ethip4-ip4base-snat-100u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-100u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc07-64B-1t1c-ethip4-ip4base-snat-1000u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1000u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc08-64B-1t1c-ethip4-ip4base-snat-1000u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1000u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc09-64B-1t1c-ethip4-ip4base-snat-2000u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 2000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-2000u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-2000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc10-64B-1t1c-ethip4-ip4base-snat-2000u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 2000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-2000u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-2000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc11-64B-1t1c-ethip4-ip4base-snat-4000u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 4000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-4000u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-4000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc12-64B-1t1c-ethip4-ip4base-snat-4000u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 4000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-4000u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${64}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-4000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc13-1518B-1t1c-ethip4-ip4base-snat-1u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc14-1518B-1t1c-ethip4-ip4base-snat-1u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc15-1518B-1t1c-ethip4-ip4base-snat-10u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-10u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc16-1518B-1t1c-ethip4-ip4base-snat-10u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-10u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc17-1518B-1t1c-ethip4-ip4base-snat-100u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-100u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc18-1518B-1t1c-ethip4-ip4base-snat-100u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-100u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc19-1518B-1t1c-ethip4-ip4base-snat-1000u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1000u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc20-1518B-1t1c-ethip4-ip4base-snat-1000u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1000u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | ${1518}
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc21-IMIX-1t1c-ethip4-ip4base-snat-1u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc22-IMIX-1t1c-ethip4-ip4base-snat-1u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1 user and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc23-IMIX-1t1c-ethip4-ip4base-snat-10u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-10u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc24-IMIX-1t1c-ethip4-ip4base-snat-10u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 10 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-10u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-10u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc25-IMIX-1t1c-ethip4-ip4base-snat-100u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-100u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc26-IMIX-1t1c-ethip4-ip4base-snat-100u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 100 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-100u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-100u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
+
+| tc27-IMIX-1t1c-ethip4-ip4base-snat-1000u-15p-ndrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Run keywords | Performance test teardown | ${min_rate}pps
+| | ... | ${framesize} | 3-node-IPv4-SNAT-1000u-15p
+| | ... | AND | Show SNAT verbose | ${dut1}
+| | ... | AND | Show SNAT verbose | ${dut2}
+| | ...
+| | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
+
+| tc28-IMIX-1t1c-ethip4-ip4base-snat-1000u-15p-pdrdisc
+| | [Documentation]
+| | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port. SNAT is configured between DUTs -\
+| | ... | 1000 users and 15 ports (sessions) per user.
+| | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
+| | ... | linerate, step 100kpps.
+| | ...
+| | [Teardown] | Performance test teardown | ${min_rate}pps | ${framesize}
+| | ... | 3-node-IPv4-SNAT-1000u-15p
+| | ...
+| | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
+| | ${framesize}= | Set Variable | IMIX_v4_1
+| | ${min_rate}= | Set Variable | ${100000}
+| | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
+| | ${binary_min}= | Set Variable | ${min_rate}
+| | ${binary_max}= | Set Variable | ${max_rate}
+| | ${threshold}= | Set Variable | ${min_rate}
+| | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Add SNAT to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | When SNAT is initialized in a 3-node circular topology
+| | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
+| | ... | ${binary_max} | 3-node-IPv4-SNAT-1000u-15p | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}