summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-01-19 10:01:34 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-01-19 10:01:34 +0200
commit88da2ed71d5f9f5a318f82776e13d2dd394e2755 (patch)
treee339e7e447a0380b622c6d83c1edf137c5ba1b1e
parent8901340e51335d3b9e52e9f6851eeea6b6b2ed9d (diff)
Fix issue of --learn-mode ignored if --learn-verify was set before it in command line
-rwxr-xr-xsrc/main_dpdk.cpp7
1 files 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;