Fix T-rex profile base class bug 07/7307/2
authorPeter Mikus <pmikus@cisco.com>
Sun, 25 Jun 2017 11:24:38 +0000 (11:24 +0000)
committerPeter Mikus <pmikus@cisco.com>
Sun, 25 Jun 2017 11:26:13 +0000 (11:26 +0000)
- fixes the issue with COP whitelist and many others

Change-Id: I43962cdee19b42c316cec689336c341d30a56adf
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/tools/t-rex/stream_profiles/profile_trex_stateless_base_class.py

index 2d07e7f..a6cb974 100755 (executable)
@@ -134,7 +134,7 @@ class TrafficStreamsBaseClass(object):
                 vm=vm1)
             # Direction 1 --> 0
             pkt_b = STLPktBuilder(
-                pkt=base_pkt_a / self._gen_payload(payload_len),
+                pkt=base_pkt_b / self._gen_payload(payload_len),
                 vm=vm2)
 
             # Packets for latency measurement:
@@ -143,7 +143,7 @@ class TrafficStreamsBaseClass(object):
                 pkt=base_pkt_a / self._gen_payload(payload_len))
             # Direction 1 --> 0
             pkt_lat_b = STLPktBuilder(
-                pkt=base_pkt_a / self._gen_payload(payload_len))
+                pkt=base_pkt_b / self._gen_payload(payload_len))
 
             # Create the streams:
             # Direction 0 --> 1
@@ -173,13 +173,14 @@ class TrafficStreamsBaseClass(object):
             stream2 = []
 
             for stream in self.STREAM_TABLE[self.framesize]:
-                payload_len = max(0, stream['size'] - len(base_pkt_a) - 4)
+                payload_len_a = max(0, stream['size'] - len(base_pkt_a) - 4)
+                payload_len_b = max(0, stream['size'] - len(base_pkt_b) - 4)
                 # Create a base packet and pad it to size
                 pkt_a = STLPktBuilder(
-                    pkt=base_pkt_a / self._gen_payload(payload_len),
+                    pkt=base_pkt_a / self._gen_payload(payload_len_a),
                     vm=vm1)
                 pkt_b = STLPktBuilder(
-                    pkt=base_pkt_b / self._gen_payload(payload_len),
+                    pkt=base_pkt_b / self._gen_payload(payload_len_b),
                     vm=vm2)
 
                 # Create the streams:

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.