summaryrefslogtreecommitdiffstats
path: root/nfvbench/traffic_gen/traffic_base.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-11-13 15:34:29 -0800
committerahothan <ahothan@cisco.com>2018-11-13 15:34:29 -0800
commit9527113c350f92b2293f596b6153f9c9d626f2af (patch)
tree192c3687ff689fc961b5874298b3d940675e781d /nfvbench/traffic_gen/traffic_base.py
parent7a90e74a1390794b72fc5c3629e141f2def908d7 (diff)
NFVBENCH-108 Adjust exact frame size to take into account FCS field2.0.5
Minimum L2 frame size is now set to 64 bytes. If VLAN tagging, min frame size for the latency stream is 68 bytes. Also fix issue with interface baseline. Change-Id: If6ff7515c0112ab419070c86f7094ff88930d33b Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/traffic_gen/traffic_base.py')
-rw-r--r--nfvbench/traffic_gen/traffic_base.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/nfvbench/traffic_gen/traffic_base.py b/nfvbench/traffic_gen/traffic_base.py
index 459af0f..0360591 100644
--- a/nfvbench/traffic_gen/traffic_base.py
+++ b/nfvbench/traffic_gen/traffic_base.py
@@ -18,6 +18,7 @@ import sys
from nfvbench.log import LOG
import traffic_utils
+
class Latency(object):
"""A class to hold latency data."""
@@ -50,14 +51,11 @@ class TrafficGeneratorException(Exception):
class AbstractTrafficGenerator(object):
+
def __init__(self, traffic_client):
self.traffic_client = traffic_client
self.generator_config = traffic_client.generator_config
self.config = traffic_client.config
- self.imix_l2_sizes = [64, 594, 1518]
- self.imix_ratios = [7, 4, 1]
- self.imix_avg_l2_size = 0
- self.adjust_imix_min_size(64)
@abc.abstractmethod
def get_version(self):
@@ -134,11 +132,3 @@ class AbstractTrafficGenerator(object):
return: a list of speed in Gbps indexed by the port#
"""
pass
-
- def adjust_imix_min_size(self, min_size):
- # assume the min size is always the first entry
- self.imix_l2_sizes[0] = min_size
- self.imix_avg_l2_size = sum(
- [1.0 * imix[0] * imix[1] for imix in zip(self.imix_l2_sizes, self.imix_ratios)]) / sum(
- self.imix_ratios)
- traffic_utils.imix_avg_l2_size = self.imix_avg_l2_size