diff options
author | 2016-02-28 13:25:54 +0200 | |
---|---|---|
committer | 2016-02-28 13:25:54 +0200 | |
commit | c218fe2330d758bf44e2c80caf61e49a965e2028 (patch) | |
tree | eb82c6dba6fddf0dd9ba1bd84733af75032d119b /src | |
parent | 23532d37dd0f8e23ec59e36eb96dd766e65cb6b6 (diff) |
m_max_ports->12, base on RaminNietzsche fix. set defult DPDK error to 4
Diffstat (limited to 'src')
-rw-r--r-- | src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c | 2 | ||||
-rw-r--r-- | src/main_dpdk.cpp | 29 |
2 files changed, 8 insertions, 23 deletions
diff --git a/src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c b/src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c index 52a263c2..4c2e72fd 100644 --- a/src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c @@ -4537,7 +4537,7 @@ ixgbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx)); } while (--poll_ms && (rxdctl | IXGBE_RXDCTL_ENABLE)); if (!poll_ms) - PMD_INIT_LOG(ERR, "Could not disable Rx Queue %d", + PMD_INIT_LOG(DEBUG, "Could not disable Rx Queue %d", rx_queue_id); rte_delay_us(RTE_IXGBE_WAIT_100_US); diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 25c10e5d..8dad5f5a 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -1050,11 +1050,6 @@ static int parse_options(int argc, char *argv[], CParserOption* po, bool first_t int main_test(int argc , char * argv[]); -//static const char * default_argv[] = {"xx","-c", "0x7", "-n","2","-b","0000:0b:01.01"}; -//static int argv_num = 7; - - - #define RX_PTHRESH 8 /**< Default values of RX prefetch threshold reg. */ #define RX_HTHRESH 8 /**< Default values of RX host threshold reg. */ #define RX_WTHRESH 4 /**< Default values of RX write-back threshold reg. */ @@ -3138,7 +3133,10 @@ int CGlobalTRex::ixgbe_prob_init(void){ printf(" Number of ports found: %d \n",m_max_ports); - + if ( m_max_ports %2 !=0 ) { + rte_exit(EXIT_FAILURE, " Number of ports %d should be even, mask the one port in the configuration file \n, ", + m_max_ports); + } if ( CGlobalInfo::m_options.get_expected_ports() >BP_MAX_PORTS ){ rte_exit(EXIT_FAILURE, " Maximum ports supported are %d, use the configuration file to set the expected number of ports \n",BP_MAX_PORTS); @@ -3155,12 +3153,6 @@ int CGlobalTRex::ixgbe_prob_init(void){ } assert(m_max_ports <= BP_MAX_PORTS); - if ( m_max_ports %2 !=0 ) { - rte_exit(EXIT_FAILURE, " Number of ports %d should be even, mask the one port in the configuration file \n, ", - m_max_ports); - - } - struct rte_eth_dev_info dev_info; rte_eth_dev_info_get((uint8_t) 0,&dev_info); @@ -3222,18 +3214,11 @@ int CGlobalTRex::cores_prob_init(){ int CGlobalTRex::queues_prob_init(){ if (m_max_cores < 2) { - rte_exit(EXIT_FAILURE, "number of cores should be at least 3 \n"); - } - - if ( !( (m_max_ports == 4) || (m_max_ports == 2) || (m_max_ports == 8) || (m_max_ports == 6) ) ){ - rte_exit(EXIT_FAILURE, "supported number of ports are 2-8 you have %d \n",m_max_ports); + rte_exit(EXIT_FAILURE, "number of cores should be at least 2 \n"); } assert((m_max_ports>>1) <= get_cores_tx() ); - - - m_cores_mul = CGlobalInfo::m_options.preview.getCores(); m_cores_to_dual_ports = m_cores_mul; @@ -4183,7 +4168,7 @@ int update_dpdk_args(void){ if ( CGlobalInfo::m_options.preview.getVMode() == 0 ) { global_dpdk_args[5]=(char *)"--log-level"; - sprintf(global_loglevel_str,"%d",1); + sprintf(global_loglevel_str,"%d",4); global_dpdk_args[6]=(char *)global_loglevel_str; }else{ global_dpdk_args[5]=(char *)"--log-level"; @@ -4282,7 +4267,7 @@ int main_test(int argc , char * argv[]){ if (update_dpdk_args() < 0) { - return -1; + return -1; } CParserOption * po=&CGlobalInfo::m_options; |