summaryrefslogtreecommitdiffstats
path: root/scripts/stl/hlt/hlt_david4.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_david4.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_david4.py')
-rwxr-xr-xscripts/stl/hlt/hlt_david4.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/stl/hlt/hlt_david4.py b/scripts/stl/hlt/hlt_david4.py
new file mode 100755
index 00000000..9624c0bb
--- /dev/null
+++ b/scripts/stl/hlt/hlt_david4.py
@@ -0,0 +1,49 @@
+from trex_stl_lib.trex_stl_hltapi import STLHltStream
+
+
+class STLS1(object):
+
+ def create_streams (self, direction = 0):
+ mac_dst_count = 10
+ mac_src_count = 10
+ pkts_per_burst = 10
+ intf_traffic_dst_ip = '48.0.0.1'
+ intf_traffic_src_ip = '16.0.0.1'
+
+ return STLHltStream(
+ #enable_auto_detect_instrumentation = 1, # not supported
+ ip_dst_addr = intf_traffic_dst_ip,
+ ip_dst_count = mac_src_count,
+ ip_dst_mode = 'increment',
+ ip_dst_step = '0.0.1.0',
+ ip_src_addr = intf_traffic_src_ip,
+ ip_src_count = mac_src_count,
+ ip_src_mode = 'increment',
+ ip_src_step = '0.0.1.0',
+ l3_protocol = 'ipv4',
+ mac_dst_count = mac_dst_count,
+ #mac_dst_mode = 'discovery', # not supported
+ mac_dst_mode = 'increment',
+ mac_dst_step = 1,
+ mac_src_count = mac_src_count,
+ mac_src_mode = 'increment',
+ mac_src_step = 1,
+ pkts_per_burst = pkts_per_burst,
+ transmit_mode = 'continuous',
+ vlan_id = '50 50',
+ vlan_id_count = '2 2',
+ vlan_id_mode = 'increment fixed',
+ vlan_id_step = '1 1',
+ vlan_protocol_tag_ids = '{8100 8100}',
+ 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()
+
+
+