summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-06-21 15:30:16 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-06-21 15:30:34 +0300
commit3bf54917e0d8817dbadaae73a7545a011676cccf (patch)
treef1ca0e91e67effc90dcac982796d31348825735f /scripts/stl
parent131bb55c38c0e59d14043766b0d3a38d5f775771 (diff)
profile fixes
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/burst_3st_1000pkt.py10
-rw-r--r--scripts/stl/burst_3st_600pkt.py10
-rw-r--r--scripts/stl/burst_3st_loop_x_times.py10
-rw-r--r--scripts/stl/flow_stats.py34
-rw-r--r--scripts/stl/flow_stats_latency.py38
-rw-r--r--scripts/stl/imix.py2
-rw-r--r--scripts/stl/multi_burst_2st_1000pkt.py8
-rw-r--r--scripts/stl/simple_3st.py6
-rw-r--r--scripts/stl/udp_1pkt.py4
-rw-r--r--scripts/stl/udp_1pkt_1mac.py4
-rw-r--r--scripts/stl/udp_1pkt_1mac_override.py4
-rw-r--r--scripts/stl/udp_1pkt_1mac_step.py4
-rw-r--r--scripts/stl/udp_1pkt_mac.py4
-rw-r--r--scripts/stl/udp_1pkt_mac_mask1.py4
-rw-r--r--scripts/stl/udp_1pkt_mac_mask2.py4
-rw-r--r--scripts/stl/udp_1pkt_mac_mask3.py4
-rw-r--r--scripts/stl/udp_1pkt_mac_mask5.py4
-rw-r--r--scripts/stl/udp_1pkt_mac_step.py4
-rw-r--r--scripts/stl/udp_1pkt_range_clients.py4
-rw-r--r--scripts/stl/udp_1pkt_range_clients_split.py4
-rw-r--r--scripts/stl/udp_1pkt_range_clients_split_garp.py2
-rw-r--r--scripts/stl/udp_1pkt_src_ip_split.py4
-rw-r--r--scripts/stl/udp_1pkt_src_ip_split_latency.py4
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen.py2
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen_split.py4
-rw-r--r--scripts/stl/udp_3pkt_pcap.py6
26 files changed, 104 insertions, 84 deletions
diff --git a/scripts/stl/burst_3st_1000pkt.py b/scripts/stl/burst_3st_1000pkt.py
index 8fcdca57..88a30c84 100644
--- a/scripts/stl/burst_3st_1000pkt.py
+++ b/scripts/stl/burst_3st_1000pkt.py
@@ -10,27 +10,27 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt1 = Ether()/IP(src="16.0.0.2",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt2 = Ether()/IP(src="16.0.0.3",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
- return STLProfile( [ STLStream( isg = 10.0, # star in delay
+ return STLProfile( [ STLStream( isg = 10.0, # start in delay
name ='S0',
packet = STLPktBuilder(pkt = base_pkt/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = self.burst_size),
next = 'S1'), # point to next stream
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S0
name ='S1',
packet = STLPktBuilder(pkt = base_pkt1/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = self.burst_size),
next = 'S2' ),
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S1
name ='S2',
packet = STLPktBuilder(pkt = base_pkt2/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = self.burst_size )
diff --git a/scripts/stl/burst_3st_600pkt.py b/scripts/stl/burst_3st_600pkt.py
index 978c8920..b81f256b 100644
--- a/scripts/stl/burst_3st_600pkt.py
+++ b/scripts/stl/burst_3st_600pkt.py
@@ -9,27 +9,27 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt1 = Ether()/IP(src="16.0.0.2",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt2 = Ether()/IP(src="16.0.0.3",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
- return STLProfile( [ STLStream( isg = 10.0, # star in delay
+ return STLProfile( [ STLStream( isg = 10.0, # start in delay
name ='S0',
packet = STLPktBuilder(pkt = base_pkt/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 10),
next = 'S1'), # point to next stream
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S0
name ='S1',
packet = STLPktBuilder(pkt = base_pkt1/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 20),
next = 'S2' ),
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S1
name ='S2',
packet = STLPktBuilder(pkt = base_pkt2/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 30 )
diff --git a/scripts/stl/burst_3st_loop_x_times.py b/scripts/stl/burst_3st_loop_x_times.py
index 175b8315..ec217e9f 100644
--- a/scripts/stl/burst_3st_loop_x_times.py
+++ b/scripts/stl/burst_3st_loop_x_times.py
@@ -9,27 +9,27 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt1 = Ether()/IP(src="16.0.0.2",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt2 = Ether()/IP(src="16.0.0.3",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
- return STLProfile( [ STLStream( isg = 10.0, # star in delay
+ return STLProfile( [ STLStream( isg = 10.0, # start in delay
name ='S0',
packet = STLPktBuilder(pkt = base_pkt/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 1),
next = 'S1'), # point to next stream
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S0
name ='S1',
packet = STLPktBuilder(pkt = base_pkt1/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 2),
next = 'S2' ),
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S1
name ='S2',
packet = STLPktBuilder(pkt = base_pkt2/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = 3 ),
diff --git a/scripts/stl/flow_stats.py b/scripts/stl/flow_stats.py
index cbb5ac21..a50ba848 100644
--- a/scripts/stl/flow_stats.py
+++ b/scripts/stl/flow_stats.py
@@ -1,21 +1,29 @@
from trex_stl_lib.api import *
-import os
-
-# stream from pcap file. continues pps 10 in sec
-CP = os.path.join(os.path.dirname(__file__))
class STLS1(object):
-
- def get_streams (self, direction = 0, **kwargs):
- return [STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_64B_no_crc.pcap")), # path relative to pwd
- mode = STLTXCont(pps=1000),
- flow_stats = STLFlowStats(pg_id = 7)),
-
- STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_594B_no_crc.pcap")), # path relative to pwd
- mode = STLTXCont(pps=5000),
- flow_stats = STLFlowStats(pg_id = 12))
+ """
+ Create flow stat stream of UDP packet.
+ Can specify using tunables the packet length (fsize) and packet group id (pg_id)
+ """
+ def __init__ (self):
+ self.fsize = 64
+ self.pg_id = 0
+
+ def _create_stream (self):
+ size = self.fsize - 4; # HW will add 4 bytes ethernet CRC
+ base_pkt = Ether() / IP(src = "16.0.0.1", dst = "48.0.0.1") / UDP(dport = 12, sport = 1025)
+ pad = max(0, size - len(base_pkt)) * 'x'
+ pkt = STLPktBuilder(pkt = base_pkt/pad)
+
+ return [STLStream(packet = pkt,
+ mode = STLTXCont(pps=1),
+ flow_stats = STLFlowStats(pg_id = self.pg_id))
]
+ def get_streams (self, fsize = 64, pg_id = 7, **kwargs):
+ self.fsize = fsize
+ self.pg_id = pg_id
+ return self._create_stream()
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/flow_stats_latency.py b/scripts/stl/flow_stats_latency.py
index e1541272..8460fcfc 100644
--- a/scripts/stl/flow_stats_latency.py
+++ b/scripts/stl/flow_stats_latency.py
@@ -1,21 +1,33 @@
from trex_stl_lib.api import *
-import os
-
-# stream from pcap file. continues pps 10 in sec
-CP = os.path.join(os.path.dirname(__file__))
class STLS1(object):
-
- def get_streams (self, direction = 0, **kwargs):
- return [STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_64B_no_crc.pcap")), # path relative to pwd
- mode = STLTXCont(pps=1000),
- flow_stats = STLFlowLatencyStats(pg_id = 1 + kwargs['port_id'])),
-
- STLStream(packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_594B_no_crc.pcap")), # path relative to pwd
- mode = STLTXCont(pps=5000),
- flow_stats = STLFlowLatencyStats(pg_id = 50 + kwargs['port_id']))
+ """
+ Create flow stat latency stream of UDP packet.
+ Can specify using tunables the packet length (fsize) and packet group id (pg_id)
+ Since we can't have two latency streams with same pg_id, in order to be able to start this profile
+ on more than one port, we add port_id to the pg_id
+ """
+
+ def __init__ (self):
+ self.fsize = 64
+ self.pg_id = 0
+
+ def _create_stream (self):
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
+ base_pkt = Ether() / IP(src = "16.0.0.1", dst = "48.0.0.1") / UDP(dport = 12, sport = 1025)
+ pad = max(0, size - len(base_pkt)) * 'x'
+ pkt = STLPktBuilder(pkt = base_pkt/pad)
+
+ return [STLStream(packet = pkt,
+ mode = STLTXCont(pps=1),
+ flow_stats = STLFlowLatencyStats(pg_id = self.pg_id))
]
+ def get_streams (self, fsize = 64, pg_id = 7, **kwargs):
+ self.fsize = fsize
+ self.pg_id = pg_id + kwargs['port_id']
+ return self._create_stream()
+
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/imix.py b/scripts/stl/imix.py
index 82edbfa5..c9b1ff17 100644
--- a/scripts/stl/imix.py
+++ b/scripts/stl/imix.py
@@ -18,7 +18,7 @@ class STLImix(object):
def create_stream (self, size, pps, isg, vm ):
- # create a base packet and pad it to size
+ # Create base packet and pad it to size
base_pkt = Ether()/IP()/UDP()
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/multi_burst_2st_1000pkt.py b/scripts/stl/multi_burst_2st_1000pkt.py
index 1a43ae96..fe4b4eac 100644
--- a/scripts/stl/multi_burst_2st_1000pkt.py
+++ b/scripts/stl/multi_burst_2st_1000pkt.py
@@ -10,20 +10,20 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt1 = Ether()/IP(src="16.0.0.2",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
- return STLProfile( [ STLStream( isg = 10.0, # star in delay
+ return STLProfile( [ STLStream( isg = 10.0, # start in delay
name ='S0',
packet = STLPktBuilder(pkt = base_pkt/pad),
mode = STLTXSingleBurst( pps = 10, total_pkts = self.burst_size),
next = 'S1'), # point to next stream
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S0
name ='S1',
packet = STLPktBuilder(pkt = base_pkt1/pad),
mode = STLTXMultiBurst( pps = 1000,pkts_per_burst = 4,ibg = 1000000.0,count = 5)
diff --git a/scripts/stl/simple_3st.py b/scripts/stl/simple_3st.py
index 8979057c..ae388f13 100644
--- a/scripts/stl/simple_3st.py
+++ b/scripts/stl/simple_3st.py
@@ -8,15 +8,15 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt1 = Ether()/IP(src="16.0.0.2",dst="48.0.0.1")/UDP(dport=12,sport=1025)
base_pkt2 = Ether()/IP(src="16.0.0.3",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
- return STLProfile( [ STLStream( isg = 1.0, # star in delay in usec
+ return STLProfile( [ STLStream( isg = 1.0, # start in delay in usec
packet = STLPktBuilder(pkt = base_pkt/pad),
mode = STLTXCont( pps = 10),
),
diff --git a/scripts/stl/udp_1pkt.py b/scripts/stl/udp_1pkt.py
index 13516ecd..f2601d79 100644
--- a/scripts/stl/udp_1pkt.py
+++ b/scripts/stl/udp_1pkt.py
@@ -18,8 +18,8 @@ class STLS1(object):
return t[self.mode]
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = self.create_pkt_base ()
diff --git a/scripts/stl/udp_1pkt_1mac.py b/scripts/stl/udp_1pkt_1mac.py
index 4adffd7a..ade5b592 100644
--- a/scripts/stl/udp_1pkt_1mac.py
+++ b/scripts/stl/udp_1pkt_1mac.py
@@ -8,8 +8,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_1mac_override.py b/scripts/stl/udp_1pkt_1mac_override.py
index 04700420..410c2630 100644
--- a/scripts/stl/udp_1pkt_1mac_override.py
+++ b/scripts/stl/udp_1pkt_1mac_override.py
@@ -10,8 +10,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
# Ether(src="00:bb:12:34:56:01") this will tell TRex to take the src-mac from packet and not from config file
base_pkt = Ether(src="00:bb:12:34:56:01")/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
diff --git a/scripts/stl/udp_1pkt_1mac_step.py b/scripts/stl/udp_1pkt_1mac_step.py
index 1e5e4bd8..69a84d67 100644
--- a/scripts/stl/udp_1pkt_1mac_step.py
+++ b/scripts/stl/udp_1pkt_1mac_step.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac.py b/scripts/stl/udp_1pkt_mac.py
index 598e2074..93376aff 100644
--- a/scripts/stl/udp_1pkt_mac.py
+++ b/scripts/stl/udp_1pkt_mac.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac_mask1.py b/scripts/stl/udp_1pkt_mac_mask1.py
index efb45da7..9a4862a9 100644
--- a/scripts/stl/udp_1pkt_mac_mask1.py
+++ b/scripts/stl/udp_1pkt_mac_mask1.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac_mask2.py b/scripts/stl/udp_1pkt_mac_mask2.py
index b95a32e3..748ddbb1 100644
--- a/scripts/stl/udp_1pkt_mac_mask2.py
+++ b/scripts/stl/udp_1pkt_mac_mask2.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac_mask3.py b/scripts/stl/udp_1pkt_mac_mask3.py
index 7a5d2864..f3593ccb 100644
--- a/scripts/stl/udp_1pkt_mac_mask3.py
+++ b/scripts/stl/udp_1pkt_mac_mask3.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac_mask5.py b/scripts/stl/udp_1pkt_mac_mask5.py
index 75f9bbf1..901c2d98 100644
--- a/scripts/stl/udp_1pkt_mac_mask5.py
+++ b/scripts/stl/udp_1pkt_mac_mask5.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_mac_step.py b/scripts/stl/udp_1pkt_mac_step.py
index 0ebd035d..a2444905 100644
--- a/scripts/stl/udp_1pkt_mac_step.py
+++ b/scripts/stl/udp_1pkt_mac_step.py
@@ -9,8 +9,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_range_clients.py b/scripts/stl/udp_1pkt_range_clients.py
index 9bd3c335..f1fc57f4 100644
--- a/scripts/stl/udp_1pkt_range_clients.py
+++ b/scripts/stl/udp_1pkt_range_clients.py
@@ -16,8 +16,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether(src="00:00:dd:dd:00:01")/IP(src="55.55.1.1",dst="58.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_range_clients_split.py b/scripts/stl/udp_1pkt_range_clients_split.py
index a8c71c0a..9bf09ba4 100644
--- a/scripts/stl/udp_1pkt_range_clients_split.py
+++ b/scripts/stl/udp_1pkt_range_clients_split.py
@@ -16,8 +16,8 @@ class STLS1(object):
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether(src="00:00:dd:dd:00:01")/IP(src="55.55.1.1",dst="58.0.0.1")/UDP(dport=12,sport=1025)
pad = max(0, size - len(base_pkt)) * 'x'
diff --git a/scripts/stl/udp_1pkt_range_clients_split_garp.py b/scripts/stl/udp_1pkt_range_clients_split_garp.py
index d7f48ed7..4bad8afd 100644
--- a/scripts/stl/udp_1pkt_range_clients_split_garp.py
+++ b/scripts/stl/udp_1pkt_range_clients_split_garp.py
@@ -10,7 +10,7 @@ class STLS1(object):
self.num_clients =3000; # max is 16bit
def create_stream (self):
- # create a base packet and pad it to size
+ # Create base packet and pad it to size
base_pkt = Ether(src="00:00:dd:dd:00:01",dst="ff:ff:ff:ff:ff:ff")/ARP(psrc="55.55.1.1",hwsrc="00:00:dd:dd:00:01", hwdst="00:00:dd:dd:00:01", pdst="55.55.1.1")
vm = STLScVmRaw( [ STLVmFlowVar(name="mac_src", min_value=1, max_value=self.num_clients, size=2, op="inc"),
diff --git a/scripts/stl/udp_1pkt_src_ip_split.py b/scripts/stl/udp_1pkt_src_ip_split.py
index 778ccf54..48e02433 100644
--- a/scripts/stl/udp_1pkt_src_ip_split.py
+++ b/scripts/stl/udp_1pkt_src_ip_split.py
@@ -9,8 +9,8 @@ class STLS1(object):
self.fsize =64;
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
diff --git a/scripts/stl/udp_1pkt_src_ip_split_latency.py b/scripts/stl/udp_1pkt_src_ip_split_latency.py
index 2d81f756..4b297d70 100644
--- a/scripts/stl/udp_1pkt_src_ip_split_latency.py
+++ b/scripts/stl/udp_1pkt_src_ip_split_latency.py
@@ -16,8 +16,8 @@ class STLS1(object):
def create_stream (self, dir,port_id):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
if dir==0:
src_ip="16.0.0.1"
diff --git a/scripts/stl/udp_1pkt_tuple_gen.py b/scripts/stl/udp_1pkt_tuple_gen.py
index 4e9ab12d..733d511b 100644
--- a/scripts/stl/udp_1pkt_tuple_gen.py
+++ b/scripts/stl/udp_1pkt_tuple_gen.py
@@ -3,7 +3,7 @@ from trex_stl_lib.api import *
class STLS1(object):
def create_stream (self, packet_len):
- # create a base packet and pad it to size
+ # Create base packet and pad it to size
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
diff --git a/scripts/stl/udp_1pkt_tuple_gen_split.py b/scripts/stl/udp_1pkt_tuple_gen_split.py
index e7a33b22..cc9eb5fc 100644
--- a/scripts/stl/udp_1pkt_tuple_gen_split.py
+++ b/scripts/stl/udp_1pkt_tuple_gen_split.py
@@ -9,8 +9,8 @@ class STLS1(object):
self.fsize =64;
def create_stream (self):
- # create a base packet and pad it to size
- size = self.fsize - 4; # no FCS
+ # Create base packet and pad it to size
+ size = self.fsize - 4; # HW will add 4 bytes ethernet FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
diff --git a/scripts/stl/udp_3pkt_pcap.py b/scripts/stl/udp_3pkt_pcap.py
index 19ff46bc..2983f9a1 100644
--- a/scripts/stl/udp_3pkt_pcap.py
+++ b/scripts/stl/udp_3pkt_pcap.py
@@ -9,19 +9,19 @@ class STLS1(object):
def create_stream (self):
- return STLProfile( [ STLStream( isg = 10.0, # star in delay
+ return STLProfile( [ STLStream( isg = 10.0, # start in delay
name ='S0',
packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_64B_no_crc.pcap")),
mode = STLTXSingleBurst( pps = 10, total_pkts = 10),
next = 'S1'), # point to next stream
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S0
name ='S1',
packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_594B_no_crc.pcap")),
mode = STLTXSingleBurst( pps = 10, total_pkts = 20),
next = 'S2' ),
- STLStream( self_start = False, # stream is disabled enable trow S0
+ STLStream( self_start = False, # Stream is disabled. Will run because it is pointed from S1
name ='S2',
packet = STLPktBuilder(pkt = os.path.join(CP, "yaml/udp_1518B_no_crc.pcap")),
mode = STLTXSingleBurst( pps = 10, total_pkts = 30 )