Latency stream 1kpps -> 10kpps
[csit.git] / resources / tools / t-rex / t-rex-stateless.py
index 6c7579d..867d095 100755 (executable)
@@ -48,7 +48,7 @@ import string
 import struct
 import sys
 
-sys.path.insert(0, "/opt/trex-core-2.06/scripts/automation/"+\
+sys.path.insert(0, "/opt/trex-core-2.07/scripts/automation/"+\
                    "trex_control_plane/stl/")
 from trex_stl_lib.api import *
 
@@ -134,19 +134,19 @@ def create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size):
             max(0, fsize_no_fcs-len(base_pkt_b))))
         lat_stream1 = STLStream(packet=pkt_lat_a,
                                 flow_stats=STLFlowLatencyStats(pg_id=0),
-                                mode=STLTXCont(pps=1000))
+                                mode=STLTXCont(pps=10000))
         # second traffic stream with a phase of 10ns (inter stream gap)
         lat_stream2 = STLStream(packet=pkt_lat_b,
                                 isg=10.0,
                                 flow_stats=STLFlowLatencyStats(pg_id=1),
-                                mode=STLTXCont(pps=1000))
+                                mode=STLTXCont(pps=10000))
 
         stream1 = STLStream(packet=pkt_a,
-                            mode=STLTXCont(pps=1000))
+                            mode=STLTXCont(pps=10000))
         # second traffic stream with a phase of 10ns (inter stream gap)
         stream2 = STLStream(packet=pkt_b,
                             isg=10.0,
-                            mode=STLTXCont(pps=1000))
+                            mode=STLTXCont(pps=10000))
     elif type(frame_size) is str:
         lat_stream1 = []
         lat_stream2 = []
@@ -347,8 +347,8 @@ def simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b, duration, rate,
     total_sent = 0
     lost_a = 0
     lost_b = 0
-    lat_a = 'NA'
-    lat_b = 'NA'
+    lat_a = "0/0/0"
+    lat_b = "0/0/0"
 
     try:
         # turn this off if too many logs
@@ -380,7 +380,7 @@ def simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b, duration, rate,
 
             if client.get_warnings():
                 for warning in client.get_warnings():
-                    print_error(warning)
+                    print(warning)
 
             # read the stats after the test
             stats = client.get_stats()
@@ -408,7 +408,7 @@ def simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b, duration, rate,
 
             if client.get_warnings():
                 for warning in client.get_warnings():
-                    print_error(warning)
+                    print(warning)
 
             # read the stats after the test
             stats = client.get_stats()
@@ -542,10 +542,6 @@ def main():
             _traffic_options[attr] = getattr(args, attr)
 
     if _use_ipv6:
-        # WARNING: Trex limitation to IPv4 only. IPv6 is not yet supported.
-        print_error('IPv6 latency is not supported yet. Running without lat.')
-        _latency = False
-
         stream_a, stream_b, stream_lat_a, stream_lat_b = create_streams_v6(
             _traffic_options, frame_size=_frame_size)
     else: