diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-12-25 14:50:14 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-12-25 14:50:31 +0200 |
commit | dc66a3a82aab2ce41aa6ded38087e02b1eeb9493 (patch) | |
tree | 6d9eb5a917f613c6cc7862ae2316abeb181c7f12 /src/main_dpdk.cpp | |
parent | c25e1862e21807ee2d4f1f356e5a6970fd598edf (diff) |
add a way to change tw configuration
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r-- | src/main_dpdk.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index e1ddc021..4c448063 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -1171,11 +1171,22 @@ static int parse_options(int argc, char *argv[], CParserOption* po, bool first_t parse_err("Single core is not supported with interactive (stateless) mode "); } - } - else { + } else { if ( !po->m_duration ) { po->m_duration = 3600.0; } + if ( global_platform_cfg_info.m_tw.m_info_exist ){ + + CTimerWheelYamlInfo *lp=&global_platform_cfg_info.m_tw; + std::string err; + if (!lp->Verify(err)){ + parse_err(err); + } + + po->set_tw_bucket_time_in_usec(lp->m_bucket_time_usec); + po->set_tw_buckets(lp->m_buckets); + po->set_tw_levels(lp->m_levels); + } } return 0; } @@ -3815,6 +3826,10 @@ bool CGlobalTRex::Create(){ m_stats_cnt =0; if (!get_is_stateless()) { pre_yaml_info.load_from_yaml_file(CGlobalInfo::m_options.cfg_file); + if ( CGlobalInfo::m_options.preview.getVMode() > 0){ + CGlobalInfo::m_options.dump(stdout); + CGlobalInfo::m_memory_cfg.Dump(stdout); + } } if ( !m_zmq_publisher.Create( CGlobalInfo::m_options.m_zmq_port, |