summaryrefslogtreecommitdiffstats
path: root/scripts/stl/hlt/hlt_david2.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-02-23 08:34:35 -0500
committerYaroslav Brustinov <ybrustin@cisco.com>2016-02-23 08:34:35 -0500
commitee91690697d026c168de223f0b6b61c2e59e76ad (patch)
treeffcb938bea2951c52392dda84c53c740d04a40a3 /scripts/stl/hlt/hlt_david2.py
parenta420b4c469c49c01c5de6756e2955beb4c714728 (diff)
hltapi: optimization to utilize similar variables for several fields, fix incorrect size from l3_length, add profiles
Diffstat (limited to 'scripts/stl/hlt/hlt_david2.py')
-rwxr-xr-xscripts/stl/hlt/hlt_david2.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/stl/hlt/hlt_david2.py b/scripts/stl/hlt/hlt_david2.py
new file mode 100755
index 00000000..be21c93d
--- /dev/null
+++ b/scripts/stl/hlt/hlt_david2.py
@@ -0,0 +1,42 @@
+from trex_stl_lib.trex_stl_hltapi import STLHltStream
+
+
+class STLS1(object):
+
+ def create_streams (self, direction = 0):
+ return STLHltStream(
+ #enable_auto_detect_instrumentation = '1', # not supported yet
+ ip_dst_addr = '192.168.3.3',
+ ip_dst_count = '1',
+ ip_dst_mode = 'increment',
+ ip_dst_step = '0.0.0.1',
+ ip_src_addr = '192.168.2.3',
+ ip_src_count = '1',
+ ip_src_step = '0.0.0.1',
+ l3_imix1_ratio = 7,
+ l3_imix1_size = 68,
+ l3_imix2_ratio = 4,
+ l3_imix2_size = 570,
+ l3_imix3_ratio = 1,
+ l3_imix3_size = 1518,
+ l3_protocol = 'ipv4',
+ length_mode = 'imix',
+ #mac_dst_mode = 'discovery', # not supported yet
+ mac_src = '00.00.c0.a8.02.03',
+ mac_src2 = '00.00.c0.a8.03.03',
+ pkts_per_burst = '200000',
+ rate_percent = '0.75',
+ transmit_mode = 'continuous',
+ vlan_id = '2',
+ direction = direction,
+ )
+
+ def get_streams (self, direction = 0):
+ return self.create_streams(direction)
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+