summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py8
-rw-r--r--scripts/exp/udp_1pkt_range_clients.pcapbin7624 -> 7624 bytes
-rw-r--r--scripts/exp/udp_1pkt_simple.pcapbin0 -> 252 bytes
-rw-r--r--scripts/stl/udp_1pkt_range_clients.py7
-rw-r--r--scripts/stl/udp_1pkt_simple.py19
5 files changed, 29 insertions, 5 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py
index ea3c872c..cfdba3c3 100644
--- a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py
+++ b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py
@@ -171,18 +171,20 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
["yaml/imix_1pkt_tuple_gen.yaml","-m 1 -l 100",True],
["yaml/imix_1pkt_vm.yaml","-m 1 -l 100",True],
["udp_1pkt_pcap.py","-m 1 -l 10",True],
- ["udp_3pkt_pcap.py","-m 1 -l 10",True]
+ ["udp_3pkt_pcap.py","-m 1 -l 10",True],
+ ["udp_1pkt_simple.py","-m 1 -l 3",True]
];
- p1=[ ["yaml/imix_1pkt_vm.yaml","-m 1 -l 100",True] ]
+
+ p0 =[ ["udp_1pkt_simple.py","-m 1 -l 3",True] ]
for obj in p:
self.run_py_profile_path (obj[0],obj[1],compare =obj[2], do_no_remove=True)
- def test_hlt_profiles (self):
+ def hlt_profiles (self):
p = (
['hlt/hlt_udp_inc_len_9k.py', '-m 1 -l 50', False],
)
diff --git a/scripts/exp/udp_1pkt_range_clients.pcap b/scripts/exp/udp_1pkt_range_clients.pcap
index f6502847..d0e6d923 100644
--- a/scripts/exp/udp_1pkt_range_clients.pcap
+++ b/scripts/exp/udp_1pkt_range_clients.pcap
Binary files differ
diff --git a/scripts/exp/udp_1pkt_simple.pcap b/scripts/exp/udp_1pkt_simple.pcap
new file mode 100644
index 00000000..3d215bf1
--- /dev/null
+++ b/scripts/exp/udp_1pkt_simple.pcap
Binary files differ
diff --git a/scripts/stl/udp_1pkt_range_clients.py b/scripts/stl/udp_1pkt_range_clients.py
index 2078b748..6b898ed2 100644
--- a/scripts/stl/udp_1pkt_range_clients.py
+++ b/scripts/stl/udp_1pkt_range_clients.py
@@ -3,7 +3,7 @@ from trex_stl_lib.api import *
# x clients override the LSB of destination
#Base src ip : 55.55.1.1, dst ip: Fixed
-#Increment host port portion starting at 55.55.1.1 for 'n' number of clients (55.55.1.1, 55.55.1.2)
+#Increment src ipt portion starting at 55.55.1.1 for 'n' number of clients (55.55.1.1, 55.55.1.2)
#Src MAC: start with 0000.dddd.0001, increment mac in steps of 1
#Dst MAC: Fixed (will be taken from trex_conf.yaml
@@ -25,7 +25,10 @@ class STLS1(object):
STLVmFlowVar(name="mac_src_wa", min_value=0x0000dddd, max_value=0x0000dddd, size=4, op="inc"), # workaround hardcoded the src MAC MSB, will be solved as an option in the stream
STLVmWrFlowVar(fv_name="mac_src_wa", pkt_offset= 6), # write constrant 0000.ddddd
- STLVmWrFlowVar(fv_name="mac_src", pkt_offset= 10) # write it to LSB of ethernet.src
+ STLVmWrFlowVar(fv_name="mac_src", pkt_offset= 10), # write it to LSB of ethernet.src
+ STLVmWrFlowVar(fv_name="mac_src" ,pkt_offset="IP.src",offset_fixup=2), # it is 2 byte so there is a need to fixup in 2 bytes
+ STLVmFixIpv4(offset = "IP")
+
]
)
diff --git a/scripts/stl/udp_1pkt_simple.py b/scripts/stl/udp_1pkt_simple.py
new file mode 100644
index 00000000..31492291
--- /dev/null
+++ b/scripts/stl/udp_1pkt_simple.py
@@ -0,0 +1,19 @@
+from trex_stl_lib.api import *
+
+class STLS1(object):
+
+ def create_stream (self):
+ return STLStream( packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')),
+ mode = STLTXCont() )
+
+ def get_streams (self, direction = 0):
+ # create 1 stream
+ return [ self.create_stream() ]
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+