summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-24 14:55:59 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-24 14:55:59 +0200
commit5a844c9d72411435842e5a0674c6fdc04e5d4e84 (patch)
treedc2738fe0638ac0ed856c70564bc7096bb33868e /scripts/stl
parent9e616d8eecaefbf538174328edfce8fd96336ce6 (diff)
parent3eb4f868ef5bc728a46c8012c914f6a9381f4cdb (diff)
Merge GARP example
Diffstat (limited to 'scripts/stl')
-rwxr-xr-xscripts/stl/hlt/hlt_david1.py2
-rwxr-xr-xscripts/stl/hlt/hlt_david3.py2
-rwxr-xr-xscripts/stl/hlt/hlt_tcp_ranges.py1
-rwxr-xr-xscripts/stl/hlt/hlt_udp_inc_dec_len_9k.py2
-rw-r--r--scripts/stl/rx_stats.py19
-rw-r--r--scripts/stl/yaml/imix_1pkt_2.yaml10
6 files changed, 29 insertions, 7 deletions
diff --git a/scripts/stl/hlt/hlt_david1.py b/scripts/stl/hlt/hlt_david1.py
index 879ea527..922bb632 100755
--- a/scripts/stl/hlt/hlt_david1.py
+++ b/scripts/stl/hlt/hlt_david1.py
@@ -26,7 +26,7 @@ class STLS1(object):
mac_src = '00.00.c0.a8.00.03',
mac_src2 = '00.00.c0.a8.01.03',
pkts_per_burst = '200000',
- #rate_percent = '0.4', # not supported yet
+ rate_percent = '0.4',
transmit_mode = 'continuous',
vlan_id = '1',
direction = direction,
diff --git a/scripts/stl/hlt/hlt_david3.py b/scripts/stl/hlt/hlt_david3.py
index 01bf2431..af41b3d4 100755
--- a/scripts/stl/hlt/hlt_david3.py
+++ b/scripts/stl/hlt/hlt_david3.py
@@ -16,7 +16,7 @@ class STLS1(object):
ip_dst_count = 1,
l3_length = 474,
ip_dscp = 10,
- #rate_bps = 256000000, # not supported yet
+ rate_bps = 256000000,
mac_src_mode = 'fixed',
mac_src_step = 1,
mac_src_count = 1,
diff --git a/scripts/stl/hlt/hlt_tcp_ranges.py b/scripts/stl/hlt/hlt_tcp_ranges.py
index 31edc61a..b720e1e2 100755
--- a/scripts/stl/hlt/hlt_tcp_ranges.py
+++ b/scripts/stl/hlt/hlt_tcp_ranges.py
@@ -12,6 +12,7 @@ class STLS1(object):
tcp_dst_port = 1234,
name = 'test_tcp_ranges',
direction = direction,
+ rate_pps = 1,
),
]
diff --git a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
index e7ee5b3d..e8766da4 100755
--- a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
+++ b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
@@ -11,6 +11,7 @@ class STLS1(object):
l4_protocol = 'udp',
udp_src_port = 1025,
udp_dst_port = 12,
+ rate_pps = 1,
),
STLHltStream(length_mode = 'decrement',
frame_size_max = 9*1024,
@@ -19,6 +20,7 @@ class STLS1(object):
l4_protocol = 'udp',
udp_src_port = 1025,
udp_dst_port = 12,
+ rate_pps = 1,
)
]
diff --git a/scripts/stl/rx_stats.py b/scripts/stl/rx_stats.py
new file mode 100644
index 00000000..892fe1a0
--- /dev/null
+++ b/scripts/stl/rx_stats.py
@@ -0,0 +1,19 @@
+from trex_stl_lib.api import *
+
+# stream from pcap file. continues pps 10 in sec
+
+class STLS1(object):
+
+ def get_streams (self, direction = 0):
+ return [STLStream(packet = STLPktBuilder(pkt ="stl/yaml/udp_64B_no_crc.pcap"), # path relative to pwd
+ mode = STLTXCont(pps=10),
+ rx_stats = STLRxStats(user_id = 7))
+ ]
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+
diff --git a/scripts/stl/yaml/imix_1pkt_2.yaml b/scripts/stl/yaml/imix_1pkt_2.yaml
index 07fd481d..dc1a457b 100644
--- a/scripts/stl/yaml/imix_1pkt_2.yaml
+++ b/scripts/stl/yaml/imix_1pkt_2.yaml
@@ -1,6 +1,6 @@
### Single stream UDP packet, 64B ###
#####################################
-- name: udp_64B
+- name: udp_64B_1
stream:
self_start: True
packet:
@@ -10,7 +10,7 @@
pps: 100
rx_stats: []
vm: []
-- name: udp_64B
+- name: udp_64B_2
stream:
self_start: True
packet:
@@ -20,7 +20,7 @@
pps: 100
rx_stats: []
vm: []
-- name: udp_64B
+- name: udp_64B_3
stream:
self_start: True
packet:
@@ -30,7 +30,7 @@
pps: 100
rx_stats: []
vm: []
-- name: udp_64B
+- name: udp_64B_4
stream:
self_start: True
packet:
@@ -39,4 +39,4 @@
type: continuous
pps: 100
rx_stats: []
- vm: [] \ No newline at end of file
+ vm: []