aboutsummaryrefslogtreecommitdiffstats
path: root/resources/traffic_profiles
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2020-05-04 13:05:26 +0200
committerVratko Polak <vrpolak@cisco.com>2020-05-06 14:03:21 +0000
commit79f5ba9bf7656972dd988508eff9465562dde42c (patch)
treea84714e81d65bfc4f0454fa8e327d4129f58ac79 /resources/traffic_profiles
parent16ef90a2415aa3b65341fdb6517cf58721bfff7a (diff)
Separate files needing GPL license
+ Keep apache license for now, until this is completed: https://wiki.fd.io/view/TSC/Relicensing_Procedure + Add utilities for switching license comment blocks. - They do not preserve attributes, so executable flag is lost. + Move the affected files to GPL/. + Update paths so files are executed from the new location. + Change the way scripts are started to do not require executable flag. + Employ OptionString when constructing longer command lines. + Move also PacketVerifier.py and TrafficScriptArg.py as they are linked with traffic scripts. + That means the two files are outside "resources" package tree now. + Added __init__.py files so relative imports work in new package tree. + Start traffic scripts as python modules to allow relative imports. + Once again needed because they are outside the default PYTHONPATH. Change-Id: Ieb135629e890adbaf5b79497570f3be25b746f9f Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/traffic_profiles')
-rw-r--r--resources/traffic_profiles/trex/profile_trex_stateless_base_class.py217
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-dot1qip4asym-ip4src254.py133
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-dot1qip6asym-ip6src253.py134
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd10000.py127
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd100000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd1000000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst10000.py125
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst100000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst1000000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src253.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src254.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc500kdst500k.py215
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc50kdst50k.py214
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc5kdst5k.py215
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1000u15p.py146
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-10u1000p-conc.py189
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py104
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-lb.py150
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst10000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst100000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst1000000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6src253.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c1n.py163
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c2n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c10n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c1n.py166
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c2n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c4n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c6n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c8n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c10n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c1n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c2n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c4n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c6n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c8n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c1n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c2n.py162
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c4n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c6n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c1n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c2n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c4n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c1n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c2n.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan100ip4src254ip4dst254.py191
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan10ip4src254ip4dst254.py191
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1ip4src254ip4dst254.py166
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1kip4src254ip4dst254.py191
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1.py85
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py156
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253_l3fwd.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py157
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src253.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src254.py126
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100ip4src100.py161
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100kip4src100k.py161
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc10kip4src10k.py161
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc500kdst500k.py215
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc50kdst50k.py215
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc5kdst5k.py215
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1000u15p.py148
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py189
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u15p.py148
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py189
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py189
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u15p.py148
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u15p.py141
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u1p.py104
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-2000u15p.py148
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-4000u15p.py148
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst10000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst100000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst1000000.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6src253.py129
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254-bvi.py170
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254.py164
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src10udpsrcrnd.py287
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src1udpsrcrnd.py288
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src2udpsrcrnd.py288
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src4udpsrcrnd.py288
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src6udpsrcrnd.py288
-rw-r--r--resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src8udpsrcrnd.py288
-rw-r--r--resources/traffic_profiles/trex/trex-sl-ethip4vxlan-ip4src1udpsrcrnd.py261
130 files changed, 0 insertions, 20864 deletions
diff --git a/resources/traffic_profiles/trex/profile_trex_stateless_base_class.py b/resources/traffic_profiles/trex/profile_trex_stateless_base_class.py
deleted file mode 100644
index a3736796eb..0000000000
--- a/resources/traffic_profiles/trex/profile_trex_stateless_base_class.py
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Base class for stream profiles for T-rex traffic generator.
-"""
-
-import sys
-import socket
-import struct
-
-from random import choice
-from string import ascii_letters
-
-from trex.stl.api import *
-
-
-class TrafficStreamsBaseClass:
- """Base class for stream profiles for T-rex traffic generator."""
-
- STREAM_TABLE = {
- u"IMIX_v4": [
- {u"size": 60, u"pps": 28, u"isg": 0},
- {u"size": 590, u"pps": 20, u"isg": 0.1},
- {u"size": 1514, u"pps": 4, u"isg": 0.2}
- ],
- 'IMIX_v4_1': [
- {u"size": 64, u"pps": 28, u"isg": 0},
- {u"size": 570, u"pps": 16, u"isg": 0.1},
- {u"size": 1518, u"pps": 4, u"isg": 0.2}
- ]
- }
-
- def __init__(self):
- # Default value of frame size, it will be overwritten by the value of
- # "framesize" parameter of "get_streams" method.
- self.framesize = 64
-
- # If needed, add your own parameters.
-
- def _gen_payload(self, length):
- """Generate payload.
-
- If needed, implement your own algorithm.
-
- :param length: Length of generated payload.
- :type length: int
- :returns: The generated payload.
- :rtype: str
- """
- payload = u""
- for _ in range(length):
- payload += choice(ascii_letters)
-
- return payload
-
- def _get_start_end_ipv6(self, start_ip, end_ip):
- """Get start host and number of hosts from IPv6 as integer.
-
- :param start_ip: Start IPv6.
- :param end_ip: End IPv6.
- :type start_ip: string
- :type end_ip: string
- :return: Start host, number of hosts.
- :rtype tuple of int
- :raises: ValueError if start_ip is greater then end_ip.
- :raises: socket.error if the IP addresses are not valid IPv6 addresses.
- """
- try:
- ip1 = socket.inet_pton(socket.AF_INET6, start_ip)
- ip2 = socket.inet_pton(socket.AF_INET6, end_ip)
-
- hi1, lo1 = struct.unpack(u"!QQ", ip1)
- hi2, lo2 = struct.unpack(u"!QQ", ip2)
-
- if ((hi1 << 64) | lo1) > ((hi2 << 64) | lo2):
- raise ValueError(u"IPv6: start_ip is greater then end_ip")
-
- return lo1, abs(int(lo1) - int(lo2))
-
- except socket.error as err:
- print(err)
- raise
-
- def define_packets(self):
- """Define the packets to be sent from the traffic generator.
-
- This method MUST return:
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
- vm1 and vm2 CAN be None.
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
- raise NotImplementedError
-
- def create_streams(self):
- """Create traffic streams.
-
- Implement your own traffic streams.
-
- :returns: Traffic streams.
- :rtype: list
- """
- base_pkt_a, base_pkt_b, vm1, vm2 = self.define_packets()
-
- # In most cases you will not have to change the code below:
-
- # Frame size is defined as an integer, e.g. 64, 1518:
- if isinstance(self.framesize, int):
-
- # Create a base packet and pad it to size
- payload_len = max(0, self.framesize - len(base_pkt_a) - 4) # No FCS
-
- # Direction 0 --> 1
- pkt_a = STLPktBuilder(
- pkt=base_pkt_a / self._gen_payload(payload_len), vm=vm1
- )
- # Direction 1 --> 0
- pkt_b = STLPktBuilder(
- pkt=base_pkt_b / self._gen_payload(payload_len), vm=vm2
- )
-
- # Packets for latency measurement:
- # Direction 0 --> 1
- pkt_lat_a = STLPktBuilder(
- pkt=base_pkt_a / self._gen_payload(payload_len), vm=vm1
- )
- # Direction 1 --> 0
- pkt_lat_b = STLPktBuilder(
- pkt=base_pkt_b / self._gen_payload(payload_len), vm=vm2
- )
-
- # Create the streams:
- # Direction 0 --> 1
- stream1 = STLStream(packet=pkt_a, mode=STLTXCont(pps=9000))
- # Direction 1 --> 0
- # second traffic stream with a phase of 10ns (inter-stream gap)
- stream2 = STLStream(packet=pkt_b, isg=10.0,
- mode=STLTXCont(pps=9000))
-
- # Streams for latency measurement:
- # Direction 0 --> 1
- lat_stream1 = STLStream(
- packet=pkt_lat_a,
- flow_stats=STLFlowLatencyStats(pg_id=0),
- mode=STLTXCont(pps=9000)
- )
- # Direction 1 --> 0
- # second traffic stream with a phase of 10ns (inter-stream gap)
- lat_stream2 = STLStream(
- packet=pkt_lat_b,
- isg=10.0,
- flow_stats=STLFlowLatencyStats(pg_id=1),
- mode=STLTXCont(pps=9000)
- )
-
- return [stream1, stream2, lat_stream1, lat_stream2]
-
- # Frame size is defined as a string, e.g.IMIX_v4_1:
- elif isinstance(self.framesize, str):
-
- stream1 = list()
- stream2 = list()
-
- for stream in self.STREAM_TABLE[self.framesize]:
- payload_len_a = max(0, stream[u"size"] - len(base_pkt_a) - 4)
- payload_len_b = max(0, stream[u"size"] - len(base_pkt_b) - 4)
- # Create a base packet and pad it to size
- pkt_a = STLPktBuilder(
- pkt=base_pkt_a / self._gen_payload(payload_len_a),
- vm=vm1)
- pkt_b = STLPktBuilder(
- pkt=base_pkt_b / self._gen_payload(payload_len_b),
- vm=vm2)
-
- # Create the streams:
- stream1.append(STLStream(
- packet=pkt_a,
- isg=stream[u"isg"],
- mode=STLTXCont(pps=stream[u"pps"]))
- )
- stream2.append(STLStream(
- packet=pkt_b,
- isg=stream[u"isg"],
- mode=STLTXCont(pps=stream[u"pps"]))
- )
- streams = list()
- streams.extend(stream1)
- streams.extend(stream2)
-
- return streams
-
- def get_streams(self, **kwargs):
- """Get traffic streams created by "create_streams" method.
-
- If needed, add your own parameters.
-
- :param kwargs: Key-value pairs used by "create_streams" method while
- creating streams.
- :returns: Traffic streams.
- :rtype: list
- """
- self.framesize = kwargs[u"framesize"]
-
- return self.create_streams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-dot1qip4asym-ip4src254.py b/resources/traffic_profiles/trex/trex-sl-2n-dot1qip4asym-ip4src254.py
deleted file mode 100644
index ae411e233b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-dot1qip4asym-ip4src254.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Direction 0 --> 1:
- - Packet: ETH / IP /
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Packet: ETH / DOT1Q / IP /
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN ID
- self.vlan_id = 10
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.vlan_id
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-dot1qip6asym-ip6src253.py b/resources/traffic_profiles/trex/trex-sl-2n-dot1qip6asym-ip6src253.py
deleted file mode 100644
index f2e9e81920..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-dot1qip6asym-ip6src253.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Direction 0 --> 1:
- - Packet: ETH / IPv6 /
- - Source IP address range: 2001:1::2 - 2001:1::FE
- - Destination IP address range: 2001:2::2
- - Direction 1 --> 0:
- - Packet: ETH / DOT1Q / IPv6 /
- - Source IP address range: 2001:2::2 - 2001:2::FE
- - Destination IP address range: 2001:1::2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN ID
- self.vlan_id = 10
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::2"
- self.p1_src_end_ip = u"2001:1::FE"
- self.p1_dst_start_ip = u"2001:2::2"
-
- self.p2_src_start_ip = u"2001:2::2"
- self.p2_src_end_ip = u"2001:2::FE"
- self.p2_dst_start_ip = u"2001:1::2"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_src_start_ip,
- self.p1_src_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_src_start_ip,
- self.p2_src_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.vlan_id
- ) /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8, op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8, op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd10000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd10000.py
deleted file mode 100644
index 16627f0884..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd10000.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams" parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- limit=10000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- limit=10000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd100000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd100000.py
deleted file mode 100644
index 751528d10c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd100000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.1.134.159
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.1.134.159
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams" parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.1.134.159"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.1.134.159"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- limit=100000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- limit=100000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd1000000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd1000000.py
deleted file mode 100644
index 58ab03516c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst-rnd1000000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.15.66.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.15.66.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams" parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.15.66.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.15.66.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- limit=1000000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVarRepeatableRandom(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- limit=1000000
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst10000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst10000.py
deleted file mode 100644
index e9d5fb15f6..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst10000.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4, op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst100000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst100000.py
deleted file mode 100644
index 5977d36b5b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst100000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.1.134.159
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.1.134.159
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.1.134.159"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.1.134.159"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst1000000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst1000000.py
deleted file mode 100644
index 8b63b82e4f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4dst1000000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.15.66.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.15.66.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.15.66.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.15.66.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name="dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op="inc"
- ),
- STLVmWrFlowVar(
- fv_name="dst",
- pkt_offset="IP.dst"
- ),
- STLVmFixIpv4(
- offset="IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name="dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op="inc"
- ),
- STLVmWrFlowVar(
- fv_name="dst",
- pkt_offset="IP.dst"
- ),
- STLVmFixIpv4(
- offset="IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src253.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src253.py
deleted file mode 100644
index 883883ad18..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src253.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.254
- - Destination IP address range: 20.20.20.2
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.254
- - Destination IP address range: 10.10.10.2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.2"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.2"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src254.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src254.py
deleted file mode 100644
index fc6167d126..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-ip4src254.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc500kdst500k.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc500kdst500k.py
deleted file mode 100644
index 9c55482078..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc500kdst500k.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:07:a1:1f
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:07:a1:1f
- - Source IP address range: 10.0.0.0 - 10.7.161.31
- - Destination IP address range: 20.0.0.0 - 20.7.161.31
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:07:a1:1f
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:07:a1:1f
- - Source IP address range: 20.0.0.0 - 20.7.161.31
- - Destination IP address range: 10.0.0.0 - 10.7.161.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 500000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.7.161.31"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.7.161.31"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.7.161.31"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.7.161.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc50kdst50k.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc50kdst50k.py
deleted file mode 100644
index 42e3db6a6f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc50kdst50k.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:c3:4f
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:c3:4f
- - Source IP address range: 10.0.0.0 - 10.0.195.79
- - Destination IP address range: 20.0.0.0 - 20.0.195.79
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:c3:4f
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:c3:4f
- - Source IP address range: 20.0.0.0 - 20.0.195.79
- - Destination IP address range: 10.0.0.0 - 10.0.195.79
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 50000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.0.195.79"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.195.79"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.0.195.79"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.195.79"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc5kdst5k.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc5kdst5k.py
deleted file mode 100644
index 29df3373d3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4-macsrc5kdst5k.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:13:87
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:13:87
- - Source IP address range: 10.0.0.0 - 10.0.19.135
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:13:87
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:13:87
- - Source IP address range: 20.0.0.0 - 20.0.19.135
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 5000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.0.19.135"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.0.19.135"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1000u15p.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1000u15p.py
deleted file mode 100644
index 64fe1a705f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1000u15p.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.3.231
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 16023
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.3.231"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 16023
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(offset=u"IP"),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-10u1000p-conc.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-10u1000p-conc.py
deleted file mode 100644
index 77f05f8af3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-10u1000p-conc.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.11
- - Destination IP address range: 20.20.20.2 - 20.20.20.11
- - Source UDP port range: 1001 - 2000
- - Destination UDP port range: 2001 - 3000
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.11
- - Destination IP address range: 10.10.10.2 - 10.10.10.11
- - Source UDP port range: 2001 - 3000
- - Destination UDP port range: 1001 - 2000
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.11"
- self.p1_dst_start_ip = u"20.20.20.2"
- self.p1_dst_end_ip = u"20.20.20.11"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.11"
- self.p2_dst_start_ip = u"10.10.10.2"
- self.p2_dst_end_ip = u"10.10.10.11"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1001
- self.p1_src_end_udp_port = 2000
- self.p1_dst_start_udp_port = 2001
- self.p1_dst_end_udp_port = 3000
-
- self.p2_src_start_udp_port = 2001
- self.p2_src_end_udp_port = 3000
- self.p2_dst_start_udp_port = 1001
- self.p2_dst_end_udp_port = 2000
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple1_src"
- ),
- STLVmTupleGen(
- ip_min=self.p1_dst_start_ip,
- ip_max=self.p1_dst_end_ip,
- port_min=self.p1_dst_start_udp_port,
- port_max=self.p1_dst_end_udp_port,
- name=u"tuple1_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p2_src_start_ip,
- ip_max=self.p2_src_end_ip,
- port_min=self.p2_src_start_udp_port,
- port_max=self.p2_src_end_udp_port,
- name=u"tuple2_src"
- ),
- STLVmTupleGen(
- ip_min=self.p2_dst_start_ip,
- ip_max=self.p2_dst_end_ip,
- port_min=self.p2_dst_start_udp_port,
- port_max=self.p2_dst_end_udp_port,
- name=u"tuple2_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py
deleted file mode 100644
index a892ec8822..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-1u1p.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1028
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_ip = u"20.0.0.0"
- self.p1_dst_ip = u"12.0.0.2"
-
- self.p2_src_ip = u"12.0.0.2"
- self.p2_dst_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_udp_port = 1024
- self.p1_dst_udp_port = 1024
-
- self.p2_src_udp_port = 1024
- self.p2_dst_udp_port = 1028
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_ip,
- dst=self.p1_dst_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_udp_port,
- dport=self.p1_dst_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_ip,
- dst=self.p2_dst_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_udp_port,
- dport=self.p2_dst_udp_port
- )
- )
-
- return base_pkt_a, base_pkt_b, None, None
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-lb.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-lb.py
deleted file mode 100644
index df05cbff17..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip4udp-lb.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# Copyright (c) 2020 Intel 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.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 192.168.50.74 - 192.168.50.79
- - Destination IP address range: 90.1.2.1
- - Direction 1 --> 0:
- - Source IP address range: 192.168.60.74 - 192.168.60.79
- - Destination IP address range: 192.168.50.74 - 192.168.50.79
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"192.168.50.74"
- self.p1_src_end_ip = u"192.168.50.79"
- self.p1_dst_start_ip = u"90.1.2.1"
-
- self.p2_src_start_ip = u"192.168.60.74"
- self.p2_src_end_ip = u"192.168.60.79"
- self.p2_dst_start_ip = u"192.168.50.74"
- self.p2_dst_end_ip = u"192.168.50.79"
-
- # UDP ports used in packet headers.
- self.p1_src_udp_port = 63
- self.p1_dst_udp_port = 20000
-
- self.p2_src_udp_port = 3307
- self.p2_dst_udp_port = 63
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17) /
- UDP(
- sport=self.p1_src_udp_port,
- dport=self.p1_dst_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_udp_port,
- dport=self.p2_dst_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst10000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst10000.py
deleted file mode 100644
index f1b90350fb..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst10000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::270F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::270F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::270F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::270F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst100000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst100000.py
deleted file mode 100644
index 87e76726b2..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst100000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::1:869F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::1:869F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::1:869F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::1:869F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst1000000.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst1000000.py
deleted file mode 100644
index 9214b6239d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6dst1000000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::F:423F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::F:423F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::F:423F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::F:423F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6src253.py b/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6src253.py
deleted file mode 100644
index 7ac5f75bed..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n-ethip6-ip6src253.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::2 - 2001:1::FE
- - Destination IP address range: 2001:2::2
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::2 - 2001:2::FE
- - Destination IP address range: 2001:1::2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::2"
- self.p1_src_end_ip = u"2001:1::FE"
- self.p1_dst_start_ip = u"2001:2::2"
-
- self.p2_src_start_ip = u"2001:2::2"
- self.p2_src_end_ip = u"2001:2::FE"
- self.p2_dst_start_ip = u"2001:1::2"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_src_start_ip,
- self.p1_src_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_src_start_ip,
- self.p2_src_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c1n.py
deleted file mode 100644
index 3707ec6b9a..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c1n.py
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 10
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4, op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c2n.py
deleted file mode 100644
index 52396c3723..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-10c2n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 10
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u'52:54:00:00:00:01'
- self.p2_dst_start_mac = u'52:54:00:00:00:02'
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u'10.10.10.1'
- self.p1_src_end_ip = u'10.10.10.254'
- self.p1_dst_start_ip = u'20.20.20.1'
-
- self.p2_src_start_ip = u'20.20.20.1'
- self.p2_src_end_ip = u'20.20.20.254'
- self.p2_dst_start_ip = u'10.10.10.1'
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c10n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c10n.py
deleted file mode 100644
index 8d29f86b49..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c10n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 10
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c1n.py
deleted file mode 100644
index f50e2e6c1d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c1n.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from re import finditer
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c2n.py
deleted file mode 100644
index 1923f72504..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c2n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c4n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c4n.py
deleted file mode 100644
index a1e55c5253..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c4n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 4
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c6n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c6n.py
deleted file mode 100644
index ffc8b428ef..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c6n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 6
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c8n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c8n.py
deleted file mode 100644
index 952859b31d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-1c8n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 1
- self.nf_nodes = 8
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c10n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c10n.py
deleted file mode 100644
index 84440af422..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c10n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 10
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c1n.py
deleted file mode 100644
index 91941769a3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c1n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c2n.py
deleted file mode 100644
index d66271f076..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c2n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c4n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c4n.py
deleted file mode 100644
index 7eadae361b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c4n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 4
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c6n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c6n.py
deleted file mode 100644
index 3725f75b3e..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c6n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 6
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c8n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c8n.py
deleted file mode 100644
index 024cbc34f3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-2c8n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 2
- self.nf_nodes = 8
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c1n.py
deleted file mode 100644
index e8c62b9c41..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c1n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 4
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c2n.py
deleted file mode 100644
index a6fbe9ea79..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c2n.py
+++ /dev/null
@@ -1,162 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 4
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1, step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c4n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c4n.py
deleted file mode 100644
index f1477419c3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c4n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 4
- self.nf_nodes = 4
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c6n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c6n.py
deleted file mode 100644
index 7e2b79fdac..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-4c6n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 4
- self.nf_nodes = 6
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c1n.py
deleted file mode 100644
index dc8616c6fe..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c1n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 6
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c2n.py
deleted file mode 100644
index 53a83db70b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c2n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 6
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c4n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c4n.py
deleted file mode 100644
index ac697e60ec..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-6c4n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 6
- self.nf_nodes = 4
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c1n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c1n.py
deleted file mode 100644
index 587dfc3406..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c1n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 8
- self.nf_nodes = 1
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c2n.py b/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c2n.py
deleted file mode 100644
index 9123a752b2..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-2n3n-ethip4-ip4src254-8c2n.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Destination MAC address: 52:54:00:00:nf_id:01
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Destination MAC address: 52:54:00:00:nf_id:02
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # Service density parameters.
- self.nf_chains = 8
- self.nf_nodes = 2
-
- # MACs used in packet headers.
- self.p1_dst_start_mac = u"52:54:00:00:00:01"
- self.p2_dst_start_mac = u"52:54:00:00:00:02"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=1,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=self.nf_nodes,
- max_value=self.nf_chains*self.nf_nodes,
- size=1,
- step=self.nf_nodes,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=4
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan100ip4src254ip4dst254.py b/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan100ip4src254ip4dst254.py
deleted file mode 100644
index b414bd1c7a..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan100ip4src254ip4dst254.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - VLAN range: 1 - 100
- - Source IP address range: 10.0.0.1 - 10.0.0.254
- - Destination IP address range: 20.0.0.1 - 20.0.0.254
- - Direction 1 --> 0:
- - VLAN range: 1 - 100
- - Source IP address range: 20.0.0.1 - 20.0.0.254
- - Destination IP address range: 10.0.0.1 - 10.0.0.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.vlans = 100
-
- self.p1_vlan_start = 1
- self.p1_vlan_end = self.p1_vlan_start + self.vlans - 1
-
- self.p2_vlan_start = 1
- self.p2_vlan_end = self.p2_vlan_start + self.vlans - 1
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_src_end_ip = u"10.0.0.254"
-
- self.p1_dst_start_ip = u"20.0.0.1"
- self.p1_dst_end_ip = u"20.0.0.254"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_src_end_ip = u"20.0.0.254"
-
- self.p2_dst_start_ip = u"10.0.0.1"
- self.p2_dst_end_ip = u"10.0.0.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p1_vlan_start,
- max_value=self.p1_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p2_vlan_start,
- max_value=self.p2_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan10ip4src254ip4dst254.py b/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan10ip4src254ip4dst254.py
deleted file mode 100644
index d878e2d726..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan10ip4src254ip4dst254.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - VLAN range: 1 - 10
- - Source IP address range: 10.0.0.1 - 10.0.0.254
- - Destination IP address range: 20.0.0.1 - 20.0.0.254
- - Direction 1 --> 0:
- - VLAN range: 1 - 10
- - Source IP address range: 20.0.0.1 - 20.0.0.254
- - Destination IP address range: 10.0.0.1 - 10.0.0.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.vlans = 10
-
- self.p1_vlan_start = 1
- self.p1_vlan_end = self.p1_vlan_start + self.vlans - 1
-
- self.p2_vlan_start = 1
- self.p2_vlan_end = self.p2_vlan_start + self.vlans - 1
-
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_src_end_ip = u"10.0.0.254"
-
- self.p1_dst_start_ip = u"20.0.0.1"
- self.p1_dst_end_ip = u"20.0.0.254"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_src_end_ip = u"20.0.0.254"
-
- self.p2_dst_start_ip = u"10.0.0.1"
- self.p2_dst_end_ip = u"10.0.0.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p1_vlan_start,
- max_value=self.p1_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p2_vlan_start,
- max_value=self.p2_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1ip4src254ip4dst254.py b/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1ip4src254ip4dst254.py
deleted file mode 100644
index c8f279bdb3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1ip4src254ip4dst254.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - VLAN range: 1
- - Source IP address range: 10.0.0.1 - 10.0.0.254
- - Destination IP address range: 20.0.0.1 - 20.0.0.254
- - Direction 1 --> 0:
- - VLAN range: 1
- - Source IP address range: 20.0.0.1 - 20.0.0.254
- - Destination IP address range: 10.0.0.1 - 10.0.0.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.p1_vlan_start = 1
-
- self.p2_vlan_start = 1
-
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_src_end_ip = u"10.0.0.254"
-
- self.p1_dst_start_ip = u"20.0.0.1"
- self.p1_dst_end_ip = u"20.0.0.254"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_src_end_ip = u"20.0.0.254"
-
- self.p2_dst_start_ip = u"10.0.0.1"
- self.p2_dst_end_ip = u"10.0.0.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1kip4src254ip4dst254.py b/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1kip4src254ip4dst254.py
deleted file mode 100644
index 02decf4284..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-dot1qip4-vlan1kip4src254ip4dst254.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - VLAN range: 1 - 1000
- - Source IP address range: 10.0.0.1 - 10.0.0.254
- - Destination IP address range: 20.0.0.1 - 20.0.0.254
- - Direction 1 --> 0:
- - VLAN range: 1 - 1000
- - Source IP address range: 20.0.0.1 - 20.0.0.254
- - Destination IP address range: 10.0.0.1 - 10.0.0.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.vlans = 1000
-
- self.p1_vlan_start = 1
- self.p1_vlan_end = self.p1_vlan_start + self.vlans - 1
-
- self.p2_vlan_start = 1
- self.p2_vlan_end = self.p2_vlan_start + self.vlans - 1
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_src_end_ip = u"10.0.0.254"
-
- self.p1_dst_start_ip = u"20.0.0.1"
- self.p1_dst_end_ip = u"20.0.0.254"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_src_end_ip = u"20.0.0.254"
-
- self.p2_dst_start_ip = u"10.0.0.1"
- self.p2_dst_end_ip = u"10.0.0.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p1_vlan_start,
- max_value=self.p1_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"vlan",
- min_value=self.p2_vlan_start,
- max_value=self.p2_vlan_end,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"vlan",
- pkt_offset=u"Dot1Q.vlan"
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1.py
deleted file mode 100644
index 0d36b7358f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_ip = u"10.0.0.1"
- self.p1_dst_ip = u"20.0.0.0"
-
- self.p2_src_ip = u"20.0.0.1"
- self.p2_dst_ip = u"10.0.0.0"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_ip,
- dst=self.p1_dst_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_ip,
- dst=self.p2_dst_ip,
- proto=61
- )
- )
-
- return base_pkt_a, base_pkt_b, None, None
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100.py
deleted file mode 100644
index 222b127914..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.99
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.99
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.99"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.99"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py
deleted file mode 100644
index 1397ae4828..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.3.231"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.3.231"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py
deleted file mode 100644
index b7f316092a..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-2cnf.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.3.231"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.3.231"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) / IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py
deleted file mode 100644
index a64e4d5a5e..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.3.231"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.3.231"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py
deleted file mode 100644
index a58df6e87b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.3.231"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.3.231"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000.py
deleted file mode 100644
index 8d9ec21a25..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.3.231
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.3.231
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.3.231"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.3.231"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py
deleted file mode 100644
index 53e68de2b9..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py
deleted file mode 100644
index ca3f41a6fb..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py
deleted file mode 100644
index df7572853f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py
deleted file mode 100644
index 1dbd3feb1a..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000.py
deleted file mode 100644
index 9f55ff71de..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst10000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.39.15
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.39.15
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.39.15"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.39.15"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100000.py
deleted file mode 100644
index ae36cf9995..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst100000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.1.134.159
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.1.134.159
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.1.134.159"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.1.134.159"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000000.py
deleted file mode 100644
index 8f6e5a0836..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst1000000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.15.66.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.15.66.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.15.66.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.15.66.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py
deleted file mode 100644
index f6f6fada5a..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.78.31"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.78.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py
deleted file mode 100644
index 15cb461624..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.78.31"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.78.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py
deleted file mode 100644
index 62eb1bee78..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.78.31"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.78.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py
deleted file mode 100644
index b6eef29366..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.78.31"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.78.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000.py
deleted file mode 100644
index 877e6cdc66..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst20000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.78.31
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.78.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.78.31"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.78.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253.py
deleted file mode 100644
index e1e6a89af7..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 20.20.20.2
- - Destination IP address range: 2.1.1.2 - 2.1.1.254
- - Direction 1 --> 0:
- - Source IP address range: 10.10.10.2
- - Destination IP address range: 1.1.1.2 - 1.1.1.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.20.20.2"
- self.p1_dst_start_ip = u"2.1.1.2"
- self.p1_dst_end_ip = u"2.1.1.254"
-
- self.p2_src_start_ip = u"10.10.10.2"
- self.p2_dst_start_ip = u"1.1.1.2"
- self.p2_dst_end_ip = u"1.1.1.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253_l3fwd.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253_l3fwd.py
deleted file mode 100644
index ed4f5b5bd6..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst253_l3fwd.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 20.20.20.2
- - Destination IP address range: 1.1.1.2 - 1.1.1.254
- - Direction 1 --> 0:
- - Source IP address range: 10.10.10.2
- - Destination IP address range: 2.1.1.2 - 2.1.1.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.20.20.2"
- self.p1_dst_start_ip = u"1.1.1.2"
- self.p1_dst_end_ip = u"1.1.1.254"
-
- self.p2_src_start_ip = u"10.10.10.2"
- self.p2_dst_start_ip = u"2.1.1.2"
- self.p2_dst_end_ip = u"2.1.1.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py
deleted file mode 100644
index b937d02741..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.3"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.3"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py
deleted file mode 100644
index b95649a94d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.3"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.3"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py
deleted file mode 100644
index fed0d7ef3c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.3"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.3"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4.py
deleted file mode 100644
index 9f14d4c929..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst4.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.3
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.3
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.3"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.3"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py
deleted file mode 100644
index d321d0ffb2..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.39"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.39"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py
deleted file mode 100644
index acc565e776..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.39"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.39"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py
deleted file mode 100644
index 629100cb83..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.39"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.39"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py
deleted file mode 100644
index b51c98d7aa..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.39"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.39"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40.py
deleted file mode 100644
index 5dbc5fc803..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.0.39
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.0.39
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.0.39"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.0.39"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py
deleted file mode 100644
index 1a004b055f..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.1.143
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.1.143
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.1.143"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.1.143"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py
deleted file mode 100644
index b09e79d7dc..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.1.143
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.1.143
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.1.143"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.1.143"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py
deleted file mode 100644
index 7081525771..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.1.143
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.1.143
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.1.143"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.1.143"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py
deleted file mode 100644
index c5b1d52e04..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.1.143
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.1.143
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.1.143"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.1.143"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400.py
deleted file mode 100644
index 44db3ec81c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst400.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.1.143
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.1.143
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.1.143"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.1.143"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py
deleted file mode 100644
index 038b986b65..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.156.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.156.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py
deleted file mode 100644
index 5933b33d20..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.156.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.156.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py
deleted file mode 100644
index 851cd7c870..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.156.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.156.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py
deleted file mode 100644
index 40d57f09dd..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.156.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.156.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000.py
deleted file mode 100644
index 570a236fd6..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst40000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.156.63
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.156.63
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.156.63"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.156.63"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams() \ No newline at end of file
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py
deleted file mode 100644
index fb4c61b030..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py
deleted file mode 100644
index ca13c337cb..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py
deleted file mode 100644
index 1ffd8c8ba5..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py
deleted file mode 100644
index 26efc1a438..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000.py
deleted file mode 100644
index 95d8380a22..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst5000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams() \ No newline at end of file
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py
deleted file mode 100644
index 251758ddae..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-1cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.234.95"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.234.95"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=0,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py
deleted file mode 100644
index acebf6d06d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-2cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.234.95"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.234.95"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=1,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py
deleted file mode 100644
index 3fe3caf128..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-4cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.234.95"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.234.95"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=3,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py
deleted file mode 100644
index 84bfb89f0b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000-8cnf.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.p1_dst_start_mac = u"02:02:00:00:12:00"
-
- self.p2_dst_start_mac = u"02:02:00:00:02:00"
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.234.95"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.234.95"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=7,
- size=1,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset=5
- ),
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000.py
deleted file mode 100644
index 126302d545..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4dst60000.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.0.0.1
- - Destination IP address range: 20.0.0.0 - 20.0.234.95
- - Direction 1 --> 0:
- - Source IP address range: 20.0.0.1
- - Destination IP address range: 10.0.0.0 - 10.0.234.95
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.1"
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.234.95"
-
- self.p2_src_start_ip = u"20.0.0.1"
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.234.95"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src253.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src253.py
deleted file mode 100644
index 883883ad18..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src253.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.254
- - Destination IP address range: 20.20.20.2
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.254
- - Destination IP address range: 10.10.10.2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.2"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.2"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src254.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src254.py
deleted file mode 100644
index fc6167d126..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-ip4src254.py
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
- self.p1_dst_start_ip = u"20.20.20.1"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
- self.p2_dst_start_ip = u"10.10.10.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100ip4src100.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100ip4src100.py
deleted file mode 100644
index b94c56ad6c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100ip4src100.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: | ETH | IP |
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:00:63
- - Source IP address range: 10.0.0.2 - 10.0.0.101
- - Destination IP address range: 20.0.0.1
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:00:63
- - Source IP address range: 20.0.0.2 - 20.0.0.101
- - Destination IP address range: 10.0.0.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 100
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.2"
- self.p1_src_end_ip = u"10.0.0.101"
- self.p1_dst_start_ip = u"20.0.0.1"
-
- self.p2_src_start_ip = u"20.0.0.2"
- self.p2_src_end_ip = u"20.0.0.101"
- self.p2_dst_start_ip = u"10.0.0.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100kip4src100k.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100kip4src100k.py
deleted file mode 100644
index 52eb841ab0..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc100kip4src100k.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: | ETH | IP |
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:01:86:9f
- - Source IP address range: 10.0.0.2 - 10.1.134.161
- - Destination IP address range: 20.0.0.1
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:01:86:9f
- - Source IP address range: 20.0.0.2 - 20.1.134.161
- - Destination IP address range: 10.0.0.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 100000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.2"
- self.p1_src_end_ip = u"10.1.134.161"
- self.p1_dst_start_ip = u"20.0.0.1"
-
- self.p2_src_start_ip = u"20.0.0.2"
- self.p2_src_end_ip = u"20.1.134.161"
- self.p2_dst_start_ip = u"10.0.0.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc10kip4src10k.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc10kip4src10k.py
deleted file mode 100644
index 8e959c829d..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc10kip4src10k.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: | ETH | IP |
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:27:0f
- - Source IP address range: 10.0.0.2 - 10.0.39.17
- - Destination IP address range: 20.0.0.1
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:27:0f
- - Source IP address range: 20.0.0.2 - 20.0.39.17
- - Destination IP address range: 10.0.0.1
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 10000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.2"
- self.p1_src_end_ip = u"10.0.39.17"
- self.p1_dst_start_ip = u"20.0.0.1"
-
- self.p2_src_start_ip = u"20.0.0.2"
- self.p2_src_end_ip = u"20.0.39.17"
- self.p2_dst_start_ip = u"10.0.0.1"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset=8
- ),
- STLVmFlowVar(
- name=u"src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"src",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc500kdst500k.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc500kdst500k.py
deleted file mode 100644
index da4348f2a0..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc500kdst500k.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:07:a1:1f
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:07:a1:1f
- - Source IP address range: 10.0.0.0 - 10.7.161.31
- - Destination IP address range: 20.0.0.0 - 20.7.161.31
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:07:a1:1f
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:07:a1:1f
- - Source IP address range: 20.0.0.0 - 20.7.161.31
- - Destination IP address range: 10.0.0.0 - 10.7.161.31
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 500000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.7.161.31"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.7.161.31"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.7.161.31"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.7.161.31"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc50kdst50k.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc50kdst50k.py
deleted file mode 100644
index 6cf066367b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc50kdst50k.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:c3:4f
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:c3:4f
- - Source IP address range: 10.0.0.0 - 10.0.195.79
- - Destination IP address range: 20.0.0.0 - 20.0.195.79
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:c3:4f
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:c3:4f
- - Source IP address range: 20.0.0.0 - 20.0.195.79
- - Destination IP address range: 10.0.0.0 - 10.0.195.79
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 50000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.0.195.79"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.195.79"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.0.195.79"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.195.79"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc5kdst5k.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc5kdst5k.py
deleted file mode 100644
index 29df3373d3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4-macsrc5kdst5k.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP /
- - Direction 0 --> 1:
- - Source MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:13:87
- - Destination MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:13:87
- - Source IP address range: 10.0.0.0 - 10.0.19.135
- - Destination IP address range: 20.0.0.0 - 20.0.19.135
- - Direction 1 --> 0:
- - Source MAC address range: fa:ce:00:00:00:00 - fa:ce:00:00:13:87
- - Destination MAC address range: ca:fe:00:00:00:00 - ca:fe:00:00:13:87
- - Source IP address range: 20.0.0.0 - 20.0.19.135
- - Destination IP address range: 10.0.0.0 - 10.0.19.135
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.clients = 5000
-
- # MACs used in packet headers.
- self.p1_src_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p1_dst_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- self.p2_src_start_mac = u"fa:ce:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
- self.p2_dst_start_mac = u"ca:fe:00:00:00:00" # mask: 00:00:FF:FF:FF:FF
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.0.0.0"
- self.p1_src_end_ip = u"10.0.19.135"
-
- self.p1_dst_start_ip = u"20.0.0.0"
- self.p1_dst_end_ip = u"20.0.19.135"
-
- self.p2_src_start_ip = u"20.0.0.0"
- self.p2_src_end_ip = u"20.0.19.135"
-
- self.p2_dst_start_ip = u"10.0.0.0"
- self.p2_dst_end_ip = u"10.0.19.135"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- src=self.p1_src_start_mac,
- dst=self.p1_dst_start_mac
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- src=self.p2_src_start_mac,
- dst=self.p2_dst_start_mac
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"mac_src",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmFlowVar(
- name=u"mac_dst",
- min_value=0,
- max_value=self.clients-1,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_src",
- pkt_offset= 8
- ),
- STLVmWrFlowVar(
- fv_name=u"mac_dst",
- pkt_offset= 2
- ),
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1000u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1000u15p.py
deleted file mode 100644
index b7b364f195..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1000u15p.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.3.231
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 16023
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.3.231"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 16023
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py
deleted file mode 100644
index b93cd645ae..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u1000p-conc.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.101
- - Destination IP address range: 20.20.20.2 - 20.20.20.101
- - Source UDP port range: 1001 - 2000
- - Destination UDP port range: 2001 - 3000
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.101
- - Destination IP address range: 10.10.10.2 - 10.10.10.101
- - Source UDP port range: 2001 - 3000
- - Destination UDP port range: 1001 - 2000
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.101"
- self.p1_dst_start_ip = u"20.20.20.2"
- self.p1_dst_end_ip = u"20.20.20.101"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.101"
- self.p2_dst_start_ip = u"10.10.10.2"
- self.p2_dst_end_ip = u"10.10.10.101"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1001
- self.p1_src_end_udp_port = 2000
- self.p1_dst_start_udp_port = 2001
- self.p1_dst_end_udp_port = 3000
-
- self.p2_src_start_udp_port = 2001
- self.p2_src_end_udp_port = 3000
- self.p2_dst_start_udp_port = 1001
- self.p2_dst_end_udp_port = 2000
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple1_src"
- ),
- STLVmTupleGen(
- ip_min=self.p1_dst_start_ip,
- ip_max=self.p1_dst_end_ip,
- port_min=self.p1_dst_start_udp_port,
- port_max=self.p1_dst_end_udp_port,
- name=u"tuple1_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p2_src_start_ip,
- ip_max=self.p2_src_end_ip,
- port_min=self.p2_src_start_udp_port,
- port_max=self.p2_src_end_udp_port,
- name=u"tuple2_src"
- ),
- STLVmTupleGen(
- ip_min=self.p2_dst_start_ip,
- ip_max=self.p2_dst_end_ip,
- port_min=self.p2_dst_start_udp_port,
- port_max=self.p2_dst_end_udp_port,
- name=u"tuple2_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u15p.py
deleted file mode 100644
index 31cdc5e628..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-100u15p.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.0.99
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 2523
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.0.99"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 2523
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py
deleted file mode 100644
index 9032a8c2f5..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u1000p-conc.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.11
- - Destination IP address range: 20.20.20.2 - 20.20.20.11
- - Source UDP port range: 1001 - 2000
- - Destination UDP port range: 2001 - 3000
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.11
- - Destination IP address range: 10.10.10.2 - 10.10.10.11
- - Source UDP port range: 2001 - 3000
- - Destination UDP port range: 1001 - 2000
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.11"
- self.p1_dst_start_ip = u"20.20.20.2"
- self.p1_dst_end_ip = u"20.20.20.11"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.11"
- self.p2_dst_start_ip = u"10.10.10.2"
- self.p2_dst_end_ip = u"10.10.10.11"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1001
- self.p1_src_end_udp_port = 2000
- self.p1_dst_start_udp_port = 2001
- self.p1_dst_end_udp_port = 3000
-
- self.p2_src_start_udp_port = 2001
- self.p2_src_end_udp_port = 3000
- self.p2_dst_start_udp_port = 1001
- self.p2_dst_end_udp_port = 2000
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple1_src"
- ),
- STLVmTupleGen(
- ip_min=self.p1_dst_start_ip,
- ip_max=self.p1_dst_end_ip,
- port_min=self.p1_dst_start_udp_port,
- port_max=self.p1_dst_end_udp_port,
- name=u"tuple1_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p2_src_start_ip,
- ip_max=self.p2_src_end_ip,
- port_min=self.p2_src_start_udp_port,
- port_max=self.p2_src_end_udp_port,
- name=u"tuple2_src"
- ),
- STLVmTupleGen(
- ip_min=self.p2_dst_start_ip,
- ip_max=self.p2_dst_end_ip,
- port_min=self.p2_dst_start_udp_port,
- port_max=self.p2_dst_end_udp_port,
- name=u"tuple2_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py
deleted file mode 100644
index 29433b3d27..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u10p-conc.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 10.10.10.2 - 10.10.10.11
- - Destination IP address range: 20.20.20.2 - 20.20.2011
- - Source UDP port range: 1001 - 1010
- - Destination UDP port range: 2001 - 2010
- - Direction 1 --> 0:
- - Source IP address range: 20.20.20.2 - 20.20.20.11
- - Destination IP address range: 10.10.10.2 - 10.10.10.11
- - Source UDP port range: 2001 - 2010
- - Destination UDP port range: 1001 - 1010
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.2"
- self.p1_src_end_ip = u"10.10.10.11"
- self.p1_dst_start_ip = u"20.20.20.2"
- self.p1_dst_end_ip = u"20.20.20.11"
-
- self.p2_src_start_ip = u"20.20.20.2"
- self.p2_src_end_ip = u"20.20.20.11"
- self.p2_dst_start_ip = u"10.10.10.2"
- self.p2_dst_end_ip = u"10.10.10.11"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1001
- self.p1_src_end_udp_port = 1010
- self.p1_dst_start_udp_port = 2001
- self.p1_dst_end_udp_port = 2010
-
- self.p2_src_start_udp_port = 2001
- self.p2_src_end_udp_port = 2010
- self.p2_dst_start_udp_port = 1001
- self.p2_dst_end_udp_port = 1010
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple1_src"
- ),
- STLVmTupleGen(
- ip_min=self.p1_dst_start_ip,
- ip_max=self.p1_dst_end_ip,
- port_min=self.p1_dst_start_udp_port,
- port_max=self.p1_dst_end_udp_port,
- name=u"tuple1_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple1_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p2_src_start_ip,
- ip_max=self.p2_src_end_ip,
- port_min=self.p2_src_start_udp_port,
- port_max=self.p2_src_end_udp_port,
- name=u"tuple2_src"
- ),
- STLVmTupleGen(
- ip_min=self.p2_dst_start_ip,
- ip_max=self.p2_dst_end_ip,
- port_min=self.p2_dst_start_udp_port,
- port_max=self.p2_dst_end_udp_port,
- name=u"tuple2_dst"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.ip",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_src.port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple2_dst.port",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u15p.py
deleted file mode 100644
index 57c5b2dcbc..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-10u15p.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.0.9
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 1173
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.0.9"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- #self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 1173
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u15p.py
deleted file mode 100644
index df9a1642a9..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u15p.py
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 1038
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.0.0"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 1038
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"sport",
- min_value=self.p1_src_start_udp_port,
- max_value=self.p1_src_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"sport",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u1p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u1p.py
deleted file mode 100644
index a892ec8822..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-1u1p.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1028
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_ip = u"20.0.0.0"
- self.p1_dst_ip = u"12.0.0.2"
-
- self.p2_src_ip = u"12.0.0.2"
- self.p2_dst_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_udp_port = 1024
- self.p1_dst_udp_port = 1024
-
- self.p2_src_udp_port = 1024
- self.p2_dst_udp_port = 1028
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_ip,
- dst=self.p1_dst_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_udp_port,
- dport=self.p1_dst_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_ip,
- dst=self.p2_dst_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_udp_port,
- dport=self.p2_dst_udp_port
- )
- )
-
- return base_pkt_a, base_pkt_b, None, None
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-2000u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-2000u15p.py
deleted file mode 100644
index c96f76aaee..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-2000u15p.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.7.207
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 31022
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.7.207"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 31022
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-4000u15p.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-4000u15p.py
deleted file mode 100644
index c1b3d5ba59..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip4udp-4000u15p.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / UDP
- - Direction 0 --> 1:
- - Source IP address range: 20.0.0.0 - 20.0.15.159
- - Destination IP address range: 12.0.0.2
- - Source UDP port range: 1024 - 1038
- - Destination UDP port range: 1024
- - Direction 1 --> 0:
- - Source IP address range: 12.0.0.2
- - Destination IP address range: 200.0.0.0
- - Source UDP port range: 1024
- - Destination UDP port range: 1024 - 61022
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"20.0.0.0"
- self.p1_src_end_ip = u"20.0.15.159"
- self.p1_dst_start_ip = u"12.0.0.2"
-
- self.p2_src_start_ip = u"12.0.0.2"
- self.p2_src_end_ip = u"12.0.0.2"
- self.p2_dst_start_ip = u"200.0.0.0"
-
- # UDP ports used in packet headers.
- self.p1_src_start_udp_port = 1024
- self.p1_src_end_udp_port = 1038
- self.p1_dst_start_udp_port = 1024
-
- self.p2_src_start_udp_port = 1024
- self.p2_dst_start_udp_port = 1024
- self.p2_dst_end_udp_port = 61022
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | UDP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p1_src_start_udp_port,
- dport=self.p1_dst_start_udp_port
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=17
- ) /
- UDP(
- sport=self.p2_src_start_udp_port,
- dport=self.p2_dst_start_udp_port
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmTupleGen(
- ip_min=self.p1_src_start_ip,
- ip_max=self.p1_src_end_ip,
- port_min=self.p1_src_start_udp_port,
- port_max=self.p1_src_end_udp_port,
- name=u"tuple"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.ip",
- pkt_offset=u"IP.src"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- ),
- STLVmWrFlowVar(
- fv_name=u"tuple.port",
- pkt_offset=u"UDP.sport"
- )
- ]
- )
- # Direction 0 --> 1
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"dport",
- min_value=self.p2_dst_start_udp_port,
- max_value=self.p2_dst_end_udp_port,
- size=2,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"dport",
- pkt_offset=u"UDP.dport"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst10000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst10000.py
deleted file mode 100644
index f1b90350fb..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst10000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::270F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::270F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::270F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::270F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst100000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst100000.py
deleted file mode 100644
index 87e76726b2..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst100000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::1:869F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::1:869F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::1:869F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::1:869F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst1000000.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst1000000.py
deleted file mode 100644
index c6870d89fa..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6dst1000000.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::1
- - Destination IP address range: 2001:2::0 - 2001:2::F:423F
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::1
- - Destination IP address range: 2001:1::0 - 2001:1::F:423F
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::1"
- self.p1_dst_start_ip = u"2001:2::0"
- self.p1_dst_end_ip = u"2001:2::F:423F"
-
- self.p2_src_start_ip = u"2001:2::1"
- self.p2_dst_start_ip = u"2001:1::0"
- self.p2_dst_end_ip = u"2001:1::F:423F"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_dst_start_ip,
- self.p1_dst_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_dst_start_ip,
- self.p2_dst_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_dst",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_dst",
- pkt_offset=u"IPv6.dst",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6src253.py b/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6src253.py
deleted file mode 100644
index fbe8b94ab3..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-3n-ethip6-ip6src253.py
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IPv6 /
- - Direction 0 --> 1:
- - Source IP address range: 2001:1::2 - 2001:1::FE
- - Destination IP address range: 2001:2::2
- - Direction 1 --> 0:
- - Source IP address range: 2001:2::2 - 2001:2::FE
- - Destination IP address range: 2001:1::2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"2001:1::2"
- self.p1_src_end_ip = u"2001:1::FE"
- self.p1_dst_start_ip = u"2001:2::2"
-
- self.p2_src_start_ip = u"2001:2::2"
- self.p2_src_end_ip = u"2001:2::FE"
- self.p2_dst_start_ip = u"2001:1::2"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IPv6 |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- base_p1, count_p1 = self._get_start_end_ipv6(
- self.p1_src_start_ip,
- self.p1_src_end_ip
- )
- base_p2, count_p2 = self._get_start_end_ipv6(
- self.p2_src_start_ip,
- self.p2_src_end_ip
- )
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- IPv6(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- IPv6(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p1,
- max_value=base_p1 + count_p1,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ipv6_src",
- min_value=base_p2,
- max_value=base_p2 + count_p2,
- size=8,
- op=u"inc"
- ),
- STLVmWrFlowVar(
- fv_name=u"ipv6_src",
- pkt_offset=u"IPv6.src",
- offset_fixup=8
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254-bvi.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254-bvi.py
deleted file mode 100644
index 28ec10bf8b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254-bvi.py
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - Destination MAC address: ba:dc:00:ff:ee:01
- - VLAN range: 100
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1 - 20.20.20.254
- - Direction 1 --> 0:
- - Destination MAC address: ba:dc:00:ff:ee:01
- - VLAN range: 200
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1 - 10.10.10.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.p1_vlan_start = 100
- self.p2_vlan_start = 200
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
-
- self.p1_dst_start_ip = u"20.20.20.1"
- self.p1_dst_end_ip = u"20.20.20.254"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
-
- self.p2_dst_start_ip = u"10.10.10.1"
- self.p2_dst_end_ip = u"10.10.10.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether(
- dst=u"ba:dc:00:ff:ee:01"
- ) /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether(
- dst=u"ba:dc:00:ff:ee:01"
- ) /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254.py
deleted file mode 100644
index 6ce351968c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4-vlan1ip4src254ip4dst254.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP /
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address range: 10.10.10.1 - 10.10.10.254
- - Destination IP address range: 20.20.20.1 - 20.20.20.254
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address range: 20.20.20.1 - 20.20.20.254
- - Destination IP address range: 10.10.10.1 - 10.10.10.254
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- # VLAN IDs
- self.p1_vlan_start = 100
- self.p2_vlan_start = 200
-
- # IPs used in packet headers.
- self.p1_src_start_ip = u"10.10.10.1"
- self.p1_src_end_ip = u"10.10.10.254"
-
- self.p1_dst_start_ip = u"20.20.20.1"
- self.p1_dst_end_ip = u"20.20.20.254"
-
- self.p2_src_start_ip = u"20.20.20.1"
- self.p2_src_end_ip = u"20.20.20.254"
-
- self.p2_dst_start_ip = u"10.10.10.1"
- self.p2_dst_end_ip = u"10.10.10.254"
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP |
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether() /
- Dot1Q(
- vlan=self.p1_vlan_start
- ) /
- IP(
- src=self.p1_src_start_ip,
- dst=self.p1_dst_start_ip,
- proto=61
- )
- )
- # Direction 1 --> 0
- base_pkt_b = (
- Ether() /
- Dot1Q(
- vlan=self.p2_vlan_start
- ) /
- IP(
- src=self.p2_src_start_ip,
- dst=self.p2_dst_start_ip,
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p1_src_start_ip,
- max_value=self.p1_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p1_dst_start_ip,
- max_value=self.p1_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"ip_src",
- min_value=self.p2_src_start_ip,
- max_value=self.p2_src_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_src",
- pkt_offset=u"IP.src"
- ),
- STLVmFlowVar(
- name=u"ip_dst",
- min_value=self.p2_dst_start_ip,
- max_value=self.p2_dst_end_ip,
- size=4,
- op=u"random"
- ),
- STLVmWrFlowVar(
- fv_name=u"ip_dst",
- pkt_offset=u"IP.dst"
- ),
- STLVmFixIpv4(
- offset=u"IP"
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :returns: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src10udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src10udpsrcrnd.py
deleted file mode 100644
index 32ca072154..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src10udpsrcrnd.py
+++ /dev/null
@@ -1,287 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.[0..9].2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..9]
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.[0..9].2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..9]
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 10
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- ) /
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2, op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src1udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src1udpsrcrnd.py
deleted file mode 100644
index 1e78cd3cae..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src1udpsrcrnd.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.0.2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: 0
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.0.2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: 0
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks.
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 1
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- ) /
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src2udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src2udpsrcrnd.py
deleted file mode 100644
index d195bc5b61..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src2udpsrcrnd.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.[0..1].2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..1]
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.[0..1].2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..1]
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 2
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- ) /
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src4udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src4udpsrcrnd.py
deleted file mode 100644
index 8a7bc08b1b..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src4udpsrcrnd.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.[0..3].2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..3]
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.[0..3].2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..3]
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 4
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- )/
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src6udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src6udpsrcrnd.py
deleted file mode 100644
index fe46844571..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src6udpsrcrnd.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.[0..5].2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..5]
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.[0..5].2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..5]
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 6
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- ) /
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src8udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src8udpsrcrnd.py
deleted file mode 100644
index cf34818781..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-dot1qip4vxlan-ip4src8udpsrcrnd.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / DOT1Q / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - VLAN range: 100
- - Source IP address: 172.17.[0..7].2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..7]
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].1
- - Direction 1 --> 0:
- - VLAN range: 200
- - Source IP address: 172.27.[0..7].2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024..65535])
- - Destination UDP port: 4789
- - VXLAN VNI: [0..7]
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.[0..255].1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.[0..255].2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 8
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | DOT1Q | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- Dot1Q(
- vlan=100
- ) /
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- Dot1Q(
- vlan=200
- ) /
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=32
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=52
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=58
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=64
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=82
- ),
- STLVmWrFlowVar(
- fv_name=u"in_ip",
- pkt_offset=86
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-
diff --git a/resources/traffic_profiles/trex/trex-sl-ethip4vxlan-ip4src1udpsrcrnd.py b/resources/traffic_profiles/trex/trex-sl-ethip4vxlan-ip4src1udpsrcrnd.py
deleted file mode 100644
index cd1a0a690c..0000000000
--- a/resources/traffic_profiles/trex/trex-sl-ethip4vxlan-ip4src1udpsrcrnd.py
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Stream profile for T-rex traffic generator.
-
-Stream profile:
- - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
- - Packet: ETH / IP / VXLAN / ETH / IP
- - Direction 0 --> 1:
- - Source IP address: 172.17.0.2
- - Destination IP address: 172.16.0.1
- - Source UDP port: random([1024-65535])
- - Destination UDP port: 4789
- - VXLAN VNI: 0
- - Payload source MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload source IP address: 10.0.0.2
- - Payload destination MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload destination IP address: 10.0.0.1
- - Direction 1 --> 0:
- - Source IP address: 172.27.0.2
- - Destination IP address: 172.26.0.1
- - Source UDP port: random([1024-65535])
- - Destination UDP port: 4789
- - VXLAN VNI: 0
- - Payload source MAC address: 00:bb:bb:00:00:[00..ff]
- - Payload source IP address: 10.0.0.1
- - Payload destination MAC address: 00:aa:aa:00:00:[00..ff]
- - Payload destination IP address: 10.0.0.2
-"""
-
-from trex.stl.api import *
-from profile_trex_stateless_base_class import TrafficStreamsBaseClass
-
-# RFC 7348 - Virtual eXtensible Local Area Network (VXLAN):
-# A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks
-# http://tools.ietf.org/html/rfc7348
-_VXLAN_FLAGS = list(u"R"*24 + u"RRRIRRRRR")
-
-
-class VXLAN(Packet):
- name=u"VXLAN"
- fields_desc = [
- FlagsField(u"flags", 0x08000000, 32, _VXLAN_FLAGS),
- ThreeBytesField(u"vni", 0),
- XByteField(u"reserved", 0x00)
- ]
-
- def mysummary(self):
- return self.sprintf(u"VXLAN (vni=%VXLAN.vni%)")
-
-
-bind_layers(UDP, VXLAN, dport=4789)
-bind_layers(VXLAN, Ether)
-
-
-class TrafficStreams(TrafficStreamsBaseClass):
- """Stream profile."""
-
- def __init__(self):
- """Initialization and setting of streams' parameters."""
-
- super(TrafficStreamsBaseClass, self).__init__()
-
- self.nf_chains = 1
-
- def define_packets(self):
- """Defines the packets to be sent from the traffic generator.
-
- Packet definition: | ETH | IP | VXLAN | ETH | IP
-
- :returns: Packets to be sent from the traffic generator.
- :rtype: tuple
- """
-
- # Direction 0 --> 1
- base_pkt_a = (
- Ether()/
- IP(
- src=u"172.17.0.2",
- dst=u"172.16.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789)/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:aa:aa:00:00:00",
- dst=u"00:bb:bb:00:00:00"
- )/
- IP(
- src=u"10.0.0.2",
- dst=u"10.0.0.1",
- proto=61
- )
- )
-
- # Direction 1 --> 0
- base_pkt_b = (
- Ether()/
- IP(
- src=u"172.27.0.2",
- dst=u"172.26.0.1"
- )/
- UDP(
- sport=1024,
- dport=4789
- )/
- VXLAN(
- vni=0
- )/
- Ether(
- src=u"00:bb:bb:00:00:00",
- dst=u"00:aa:aa:00:00:00"
- )/
- IP(
- src=u"10.0.0.1",
- dst=u"10.0.0.2",
- proto=61
- )
- )
-
- # Direction 0 --> 1
- vm1 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=28
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=48
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=54
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=60
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- # Direction 1 --> 0
- vm2 = STLScVmRaw(
- [
- STLVmFlowVar(
- name=u"nf_id",
- size=1,
- op=u"inc",
- min_value=0,
- max_value=self.nf_chains - 1
- ),
- STLVmFlowVar(
- name=u"in_mac",
- size=2, op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"in_ip",
- size=1, op=u"inc",
- min_value=0,
- max_value=255
- ),
- STLVmFlowVar(
- name=u"src_port",
- size=2,
- op=u"random",
- min_value=1024,
- max_value=65535
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=28
- ),
- STLVmWrFlowVar(
- fv_name=u"src_port",
- pkt_offset=u"UDP.sport"
- ),
- STLVmWrFlowVar(
- fv_name=u"nf_id",
- pkt_offset=48
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=54
- ),
- STLVmWrFlowVar(
- fv_name=u"in_mac",
- pkt_offset=60
- ),
- STLVmFixChecksumHw(
- l3_offset="IP:{}".format(0),
- l4_offset="UDP:{}".format(0),
- l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP
- )
- ]
- )
-
- return base_pkt_a, base_pkt_b, vm1, vm2
-
-def register():
- """Register this traffic profile to T-rex.
-
- Do not change this function.
-
- :return: Traffic streams.
- :rtype: Object
- """
- return TrafficStreams()
-