From 4a80fac56ca122a34de5d03c0876e424cc7c6c56 Mon Sep 17 00:00:00 2001 From: ahothan Date: Mon, 26 Nov 2018 15:52:42 -0800 Subject: NFVBENCH-113 Add direct support for trex cores as an cli/config option Change-Id: Ic930b605a0eb821487ca4620bc7231794b9add08 Signed-off-by: ahothan --- nfvbench/traffic_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nfvbench/traffic_client.py') 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 -- cgit 1.2.3-korg