aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbench/traffic_client.py
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-11-26 15:52:42 -0800
committerahothan <ahothan@cisco.com>2018-11-26 16:01:40 -0800
commit4a80fac56ca122a34de5d03c0876e424cc7c6c56 (patch)
treeca6b2cdf2112c5e58c0385c144fa7bb65f3761e6 /nfvbench/traffic_client.py
parent52d4e575fe1bd6a02ad4ecda649a8350ecff3931 (diff)
NFVBENCH-113 Add direct support for trex cores as an cli/config option3.0.2
Change-Id: Ic930b605a0eb821487ca4620bc7231794b9add08 Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench/traffic_client.py')
-rwxr-xr-xnfvbench/traffic_client.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index c9daf40..093a02d 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -328,7 +328,12 @@ class GeneratorConfig(object):
# copy over fields from the dict
self.tool = gen_config.tool
self.ip = gen_config.ip
- self.cores = gen_config.get('cores', 1)
+ # overrides on config.cores and config.mbuf_factor
+ if config.cores:
+ self.cores = config.cores
+ else:
+ self.cores = gen_config.get('cores', 1)
+ self.mbuf_factor = config.mbuf_factor
if gen_config.intf_speed:
# interface speed is overriden from config
self.intf_speed = bitmath.parse_string(gen_config.intf_speed.replace('ps', '')).bits