From 88da2ed71d5f9f5a318f82776e13d2dd394e2755 Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Tue, 19 Jan 2016 10:01:34 +0200 Subject: Fix issue of --learn-mode ignored if --learn-verify was set before it in command line --- src/main_dpdk.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 7cbe7f2b..7c25b2e2 100755 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -121,8 +121,6 @@ static inline int get_is_latency_thread_enable(){ } struct port_cfg_t; -//class CPhyEthIF; -//class CPhyEthIFStats ; class CTRexExtendedDriverBase { public: @@ -808,7 +806,10 @@ static int parse_options(int argc, char *argv[], CParserOption* po, bool first_t break; case OPT_LEARN_VERIFY : - po->m_learn_mode = CParserOption::LEARN_MODE_IP_OPTION; + // must configure learn_mode for learn verify to work. If different learn mode will be given later, it will be set instead. + if (po->m_learn_mode == 0) { + po->m_learn_mode = CParserOption::LEARN_MODE_IP_OPTION; + } po->preview.set_learn_and_verify_mode_enable(true); break; -- cgit 1.2.3-korg