Code Review
/
nfvbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NFVBENCH-113 Add direct support for trex cores as an cli/config option
[nfvbench.git]
/
nfvbench
/
traffic_client.py
diff --git
a/nfvbench/traffic_client.py
b/nfvbench/traffic_client.py
index
c9daf40
..
093a02d
100755
(executable)
--- 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
# 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
if gen_config.intf_speed:
# interface speed is overriden from config
self.intf_speed = bitmath.parse_string(gen_config.intf_speed.replace('ps', '')).bits