summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/dpdk_setup_ports.py10
-rw-r--r--src/dpdk22/drivers/net/ixgbe/ixgbe_rxtx.c2
-rw-r--r--src/main_dpdk.cpp29
3 files changed, 14 insertions, 27 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py
index 8dfd742e..5cd42a8f 100755
--- a/scripts/dpdk_setup_ports.py
+++ b/scripts/dpdk_setup_ports.py
@@ -83,13 +83,15 @@ Other network devices
if int(self.m_cfg_dict[0]['version'])<2 :
self.raise_error ("Configuration file %s is old, should include version field with value greater than 2" % fcfg)
-
if not self.m_cfg_dict[0].has_key('interfaces') :
- self.raise_error ("Configuration file %s is old, should include interfaces field with 2,4,6,8 number of elemets" % fcfg)
+ self.raise_error ("Configuration file %s is old, should include interfaces field even number of elemets" % fcfg)
if_list=self.m_cfg_dict[0]['interfaces']
- if not (len(if_list) in [2,4,6,8]):
- self.raise_error ("Configuration file %s should include interfaces field with 2,4,6,8 number of elemets" % fcfg)
+ l=len(if_list);
+ if (l>20):
+ self.raise_error ("Configuration file %s should include interfaces field with maximum of number of elemets" % (fcfg,l))
+ if ((l % 2)==1):
+ self.raise_error ("Configuration file %s should include even number of interfaces " % (fcfg,l))
def do_bind_one (self,key):
cmd='./dpdk_nic_bind.py --force --bind=igb_uio %s ' % ( key)
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;