NFVBENCH-140 Retrieve High Dynamic Range latency histograms with TRex v2.59 36/68236/2 3.5.0
authorahothan <ahothan@cisco.com>
Sun, 14 Jul 2019 04:47:20 +0000 (21:47 -0700)
committerahothan <ahothan@cisco.com>
Sun, 14 Jul 2019 04:57:04 +0000 (21:57 -0700)
Change-Id: I48ac8c0cf920139bad966cb477e8ba1ae0d0fd43
Signed-off-by: ahothan <ahothan@cisco.com>
docker/Dockerfile
docs/testing/user/userguide/hw_requirements.rst
nfvbench/cfg.default.yaml
nfvbench/traffic_client.py
nfvbench/traffic_server.py
test/test_nfvbench.py

index 920e3a3..ead9253 100644 (file)
@@ -1,7 +1,7 @@
 # docker file for creating a container that has nfvbench installed and ready to use
 FROM ubuntu:16.04
 
-ENV TREX_VER "v2.56"
+ENV TREX_VER "v2.59"
 ENV VM_IMAGE_VER "0.9"
 
 # Note: do not clone with --depth 1 as it will cause pbr to fail extracting the nfvbench version
index 4fc6e21..124e8a0 100644 (file)
@@ -67,4 +67,4 @@ Finally, the correct iommu options and huge pages to be configured on the Linux
 - enable intel_iommu and iommu pass through: "intel_iommu=on iommu=pt"
 - for Trex, pre-allocate 1024 huge pages of 2MB each (for a total of 2GB): "hugepagesz=2M hugepages=1024"
 
-More detailed instructions can be found in the DPDK documentation (https://media.readthedocs.org/pdf/dpdk/latest/dpdk.pdf).
+More detailed instructions can be found in the DPDK documentation (https://buildmedia.readthedocs.org/media/pdf/dpdk/latest/dpdk.pdf).
index 0d6edd8..01097a0 100755 (executable)
@@ -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
 
index d69da0e..ec885f8 100755 (executable)
@@ -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
index ac23265..94e5694 100644 (file)
@@ -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)
index 7c5fb83..0c38fe9 100644 (file)
@@ -329,7 +329,9 @@ def _get_dummy_tg_config(chain_type, rate, scc=1, fc=10, step_ip='0.0.0.1',
         'measurement': {'NDR': 0.001, 'PDR': 0.1, 'load_epsilon': 0.1},
         'l2_loopback': False,
         'cores': None,
-        'mbuf_factor': None
+        'mbuf_factor': None,
+        'disable_hdrh': None
+
     })
 
 def _get_traffic_client():