From 3159743120d9e1033c5ed809c1031b814204fd8f Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 3 Aug 2016 16:18:50 +0300 Subject: set default stateful duration 1 hour, forbid duration in stateless add "add_profile"stateless Python API command fix trex_perf.py --- src/main_dpdk.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 31e77c92..b961f653 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -659,7 +659,7 @@ static int usage(){ printf(" \n"); printf(" --nc : If set, will not wait for all the flows to be closed, terminate faster- see manual for more information \n"); printf(" \n"); - printf(" -d : duration of the test in sec. look for --nc \n"); + printf(" -d : duration of the test in sec (default is 3600). look also at --nc \n"); printf(" \n"); printf(" -pm : platform factor ,in case you have splitter in the setup you can multiply the total results in this factor \n"); printf(" e.g --pm 2.0 will multiply all the results bps in this factor \n"); @@ -1045,6 +1045,10 @@ static int parse_options(int argc, char *argv[], CParserOption* po, bool first_t } if ( get_is_stateless() ) { + if ( po->m_duration ) { + parse_err("Duration is not supported with interactive mode "); + } + if ( po->preview.get_is_rx_check_enable() ) { parse_err("Rx check is not supported with interactive mode "); } @@ -1058,6 +1062,11 @@ static int parse_options(int argc, char *argv[], CParserOption* po, bool first_t } } + else { + if ( !po->m_duration ) { + po->m_duration = 3600.0; + } + } return 0; } @@ -1422,12 +1431,7 @@ void CPhyEthIF::tx_queue_setup(uint16_t tx_queue_id, void CPhyEthIF::stop(){ -#if 0 - // allowing this causes bad things to happen. Especially on X710 cards. - // See trex-237 for details rte_eth_dev_stop(m_port_id); - rte_eth_dev_close(m_port_id); -#endif } -- cgit 1.2.3-korg