NFVBENCH-132 Upgrade to TRex v2.56
[nfvbench.git] / nfvbench / traffic_server.py
index d46a27d..91608dd 100644 (file)
@@ -49,8 +49,12 @@ class TRexTrafficServer(TrafficServer):
             mbuf_opt = "--mbuf-factor " + str(generator_config.mbuf_factor)
         else:
             mbuf_opt = ""
+        # --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)
         subprocess.Popen(['nohup', '/bin/bash', '-c',
-                          './t-rex-64 -i -c {} --iom 0 --no-scapy-server --close-at-end {} '
+                          './t-rex-64 -i -c {} --iom 0 --no-scapy-server '
+                          '--unbind-unused-ports --close-at-end {} '
                           '{} {} --cfg {} &> /tmp/trex.log & disown'.format(cores, sw_mode,
                                                                             vlan_opt,
                                                                             mbuf_opt, cfg)],