summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierrick Louin <pierrick.louin@orange.com>2020-11-10 03:34:40 +0100
committerfmenguy <francoisregis.menguy@orange.com>2021-03-05 09:44:27 +0100
commitc1fc46a270a9e0e266f67f3e5a49c1fc66ec8c10 (patch)
treef3044c0f214d75aff933c839b548c68871bd7abb
parent8eb504093d45737a4411f997022b7e67f217aefd (diff)
NFVBENCH-202: Generalize auto T-Rex restart on every command line related parameter change.
Signed-off-by: Pierrick Louin <pierrick.louin@orange.com> Change-Id: Ia8e572e8ebea37bb7fb2c898d6a311b522dec0b4 Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
-rw-r--r--nfvbench/traffic_server.py39
1 files changed, 25 insertions, 14 deletions
diff --git a/nfvbench/traffic_server.py b/nfvbench/traffic_server.py
index 6074a6e..03c0182 100644
--- a/nfvbench/traffic_server.py
+++ b/nfvbench/traffic_server.py
@@ -90,27 +90,38 @@ class TRexTrafficServer(TrafficServer):
# should be forciby restarted each time the value of a
# parameter, specified as one of the starting command line
# arguments, has been modified since the last launch.
- # Hence we add some extra fields to the config file (nb_cores,
- # use_vlan) which will serve as a memory between runs -
+ # Hence we add some extra fields to the config file
+ # (nb_cores, use_vlan, mbuf_factor, i40e_mixed, hdrh)
+ # which will serve as a memory between runs -
# while being actually ignored by the T-Rex server.
result = """# Config generated by NFVbench
- - port_limit : 2
- version : 2
+ - port_limit : 2
+ version : 2
zmq_pub_port : {zmq_pub_port}
zmq_rpc_port : {zmq_rpc_port}
prefix : {prefix}
limit_memory : {limit_memory}
- nb_cores : {nb_cores}
- use_vlan : {use_vlan}
- interfaces : [{ifs}]""".format(zmq_pub_port=generator_config.zmq_pub_port,
- zmq_rpc_port=generator_config.zmq_rpc_port,
- prefix=generator_config.name,
- limit_memory=generator_config.limit_memory,
- nb_cores=generator_config.cores,
- use_vlan=generator_config.gen_config.get('vtep_vlan') or
- generator_config.vlan_tagging,
- ifs=ifs)
+ command_line :
+ sw_mode : {sw_mode}
+ mbuf_factor: {mbuf_factor}
+ hdrh : {hdrh}
+ nb_cores : {nb_cores}
+ use_vlan : {use_vlan}
+ i40e_mixed : {i40e_mixed}
+ interfaces : [{ifs}]""".format(
+ zmq_pub_port=generator_config.zmq_pub_port,
+ zmq_rpc_port=generator_config.zmq_rpc_port,
+ prefix=generator_config.name,
+ limit_memory=generator_config.limit_memory,
+ sw_mode=generator_config.software_mode,
+ mbuf_factor=generator_config.mbuf_factor,
+ hdrh=generator_config.hdrh,
+ nb_cores=generator_config.cores,
+ use_vlan=generator_config.gen_config.get('vtep_vlan') or
+ generator_config.vlan_tagging,
+ i40e_mixed=generator_config.config.i40e_mixed,
+ ifs=ifs)
if hasattr(generator_config, 'mbuf_64') and generator_config.mbuf_64:
result += """