summaryrefslogtreecommitdiffstats
path: root/nfvbench
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2019-07-13 21:47:20 -0700
committerahothan <ahothan@cisco.com>2019-07-13 21:57:04 -0700
commit4ddc4d367bb5484906eada4f21260efed4fdf1a7 (patch)
tree98ebf08013cc23f0d24c88d1cc446f1aa70b0b16 /nfvbench
parent547b10033d41b2b9f8445816fceab87ebc4a03cb (diff)
NFVBENCH-140 Retrieve High Dynamic Range latency histograms with TRex v2.593.5.0
Change-Id: I48ac8c0cf920139bad966cb477e8ba1ae0d0fd43 Signed-off-by: ahothan <ahothan@cisco.com>
Diffstat (limited to 'nfvbench')
-rwxr-xr-xnfvbench/cfg.default.yaml4
-rwxr-xr-xnfvbench/traffic_client.py1
-rw-r--r--nfvbench/traffic_server.py4
3 files changed, 8 insertions, 1 deletions
diff --git a/nfvbench/cfg.default.yaml b/nfvbench/cfg.default.yaml
index 0d6edd8..01097a0 100755
--- a/nfvbench/cfg.default.yaml
+++ b/nfvbench/cfg.default.yaml
@@ -303,6 +303,10 @@ cores:
# mbuffer ratio to use for TRex (see TRex documentation for more details)
mbuf_factor: 0.2
+# A switch to disable hdrh
+# hdrh is enabled by default and requires TRex v2.58 or higher
+disable_hdrh: false
+
# -----------------------------------------------------------------------------
# These variables are not likely to be changed
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index d69da0e..ec885f8 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -341,6 +341,7 @@ class GeneratorConfig(object):
else:
self.cores = gen_config.get('cores', 1)
self.mbuf_factor = config.mbuf_factor
+ self.hdrh = not config.disable_hdrh
if gen_config.intf_speed:
# interface speed is overriden from config
self.intf_speed = bitmath.parse_string(gen_config.intf_speed.replace('ps', '')).bits
diff --git a/nfvbench/traffic_server.py b/nfvbench/traffic_server.py
index ac23265..94e5694 100644
--- a/nfvbench/traffic_server.py
+++ b/nfvbench/traffic_server.py
@@ -49,14 +49,16 @@ class TRexTrafficServer(TrafficServer):
mbuf_opt = "--mbuf-factor " + str(generator_config.mbuf_factor)
else:
mbuf_opt = ""
+ hdrh_opt = "--hdrh" if generator_config.hdrh else ""
# --unbind-unused-ports: for NIC that have more than 2 ports such as Intel X710
# this will instruct trex to unbind all ports that are unused instead of
# erroring out with an exception (i40e only)
cmd = ['nohup', '/bin/bash', '-c',
'./t-rex-64 -i -c {} --iom 0 --no-scapy-server '
- '--unbind-unused-ports --close-at-end {} '
+ '--unbind-unused-ports --close-at-end {} {} '
'{} {} --cfg {} &> /tmp/trex.log & disown'.format(cores, sw_mode,
vlan_opt,
+ hdrh_opt,
mbuf_opt, cfg)]
LOG.info(' '.join(cmd))
subprocess.Popen(cmd, cwd=self.trex_dir)