summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlinux_dpdk/ws_main.py2
-rw-r--r--scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py7
-rw-r--r--scripts/exp/udp_1pkt_range_clients_split.pcapbin0 -> 7624 bytes
-rw-r--r--scripts/exp/udp_1pkt_tuple_gen_split.pcapbin252 -> 7624 bytes
-rw-r--r--scripts/stl/udp_1pkt_range_clients_split.py50
5 files changed, 56 insertions, 3 deletions
diff --git a/linux_dpdk/ws_main.py b/linux_dpdk/ws_main.py
index 9b6e2bf5..81bc6b28 100755
--- a/linux_dpdk/ws_main.py
+++ b/linux_dpdk/ws_main.py
@@ -979,7 +979,7 @@ def publish_ext(bld, custom_source = None):
from_ = exec_p+'/'+release_name;
os.system('rsync -avz -e "ssh -i %s" --rsync-path=/usr/bin/rsync %s %s@%s:%s/release/%s' % (Env().get_trex_ex_web_key(),from_, Env().get_trex_ex_web_user(),Env().get_trex_ex_web_srv(),Env().get_trex_ex_web_path() ,release_name) )
os.system("ssh -i %s -l %s %s 'cd %s/release/;rm be_latest; ln -P %s be_latest' " %(Env().get_trex_ex_web_key(),Env().get_trex_ex_web_user(),Env().get_trex_ex_web_srv(),Env().get_trex_ex_web_path(),release_name))
- os.system("ssh -i %s -l %s %s 'cd %s/release/;rm latest; ln -P %s latest' " %(Env().get_trex_ex_web_key(),Env().get_trex_ex_web_user(),Env().get_trex_ex_web_srv(),Env().get_trex_ex_web_path(),release_name))
+ #os.system("ssh -i %s -l %s %s 'cd %s/release/;rm latest; ln -P %s latest' " %(Env().get_trex_ex_web_key(),Env().get_trex_ex_web_user(),Env().get_trex_ex_web_srv(),Env().get_trex_ex_web_path(),release_name))
# publish latest passed regression package (or custom commit from --publish_commit option) as be_latest to trex-tgn.cisco.com and internal wiki
def publish_both(self):
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 3a809857..42b35720 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
@@ -147,6 +147,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
self.golden_run("basic_tuple_gen", "imix_tuple_gen", "-m 50kpps --limit 500 --cores 8", silent = False)
def test_stl_profiles (self):
+
p = [
["udp_1pkt_1mac_override.py","-m 1 -l 50",True],
["syn_attack.py","-m 1 -l 50",False], # can't compare random now
@@ -173,12 +174,14 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
["udp_1pkt_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],
- ["udp_1pkt_pcap_relative_path.py","-m 1 -l 3",True]
+ ["udp_1pkt_pcap_relative_path.py","-m 1 -l 3",True],
+ ["udp_1pkt_tuple_gen_split.py","-m 1 -c 2 -l 100",True],
+ ["udp_1pkt_range_clients_split.py","-m 1 -c 2 -l 100",True]
];
- p1 = [ ["udp_1pkt_tuple_gen_split.py","-m 1 -l 3",True] ]
+ p1 = [ ["udp_1pkt_range_clients_split.py","-m 1 -c 2 -l 100",True] ]
for obj in p:
diff --git a/scripts/exp/udp_1pkt_range_clients_split.pcap b/scripts/exp/udp_1pkt_range_clients_split.pcap
new file mode 100644
index 00000000..b4b7b7c0
--- /dev/null
+++ b/scripts/exp/udp_1pkt_range_clients_split.pcap
Binary files differ
diff --git a/scripts/exp/udp_1pkt_tuple_gen_split.pcap b/scripts/exp/udp_1pkt_tuple_gen_split.pcap
index 8ad8d994..bbaa456a 100644
--- a/scripts/exp/udp_1pkt_tuple_gen_split.pcap
+++ b/scripts/exp/udp_1pkt_tuple_gen_split.pcap
Binary files differ
diff --git a/scripts/stl/udp_1pkt_range_clients_split.py b/scripts/stl/udp_1pkt_range_clients_split.py
new file mode 100644
index 00000000..7aee009d
--- /dev/null
+++ b/scripts/stl/udp_1pkt_range_clients_split.py
@@ -0,0 +1,50 @@
+from trex_stl_lib.api import *
+
+
+# x clients override the LSB of destination
+#Base src ip : 55.55.1.1, dst ip: Fixed
+#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
+
+
+class STLS1(object):
+
+ def __init__ (self):
+ self.num_clients =30000; # max is 16bit
+ self.fsize =64
+
+ def create_stream (self):
+
+ # create a base packet and pad it to size
+ size = self.fsize - 4; # no FCS
+ base_pkt = Ether()/IP(src="55.55.1.1",dst="58.0.0.1")/UDP(dport=12,sport=1025)
+ pad = max(0, size - len(base_pkt)) * 'x'
+
+ vm = CTRexScRaw( [ STLVmFlowVar(name="mac_src", min_value=1, max_value=self.num_clients, size=2, op="inc"), # 1 byte varible, range 1-10
+ 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="IP.src",offset_fixup=2), # it is 2 byte so there is a need to fixup in 2 bytes
+ STLVmFixIpv4(offset = "IP"),
+
+
+ ]
+ ,split_by_field = "mac_src" # split
+ )
+
+ return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
+ mode = STLTXCont( pps=10 ))
+
+ 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()
+
+
+