X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest-pmd%2Ftestpmd.c;h=bfb2f8efd9ee6f272170f68f90740ac370ffed20;hb=14c66a451ef7c710595fd152a9f7435995089d5d;hp=6185be68d5cabe5e3b6839d687254fa4186071f0;hpb=2a977b891f994d0e216812275af2156fb8566944;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 6185be68d5..bfb2f8efd9 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -78,6 +78,7 @@ #ifdef RTE_LIBRTE_PDUMP #include #endif +#include #include "testpmd.h" @@ -1545,6 +1546,8 @@ close_port(portid_t pid) continue; } + if (port->flow_list) + port_flow_flush(pi); rte_eth_dev_close(pi); if (rte_atomic16_cmpset(&(port->port_status), @@ -1599,6 +1602,9 @@ detach_port(uint8_t port_id) return; } + if (ports[port_id].flow_list) + port_flow_flush(port_id); + if (rte_eth_dev_detach(port_id, name)) return; @@ -2002,8 +2008,13 @@ init_port_dcb_config(portid_t pid, * and has the same number of rxq and txq in dcb mode */ if (dcb_mode == DCB_VT_ENABLED) { - nb_rxq = rte_port->dev_info.max_rx_queues; - nb_txq = rte_port->dev_info.max_tx_queues; + if (rte_port->dev_info.max_vfs > 0) { + nb_rxq = rte_port->dev_info.nb_rx_queues; + nb_txq = rte_port->dev_info.nb_tx_queues; + } else { + nb_rxq = rte_port->dev_info.max_rx_queues; + nb_txq = rte_port->dev_info.max_tx_queues; + } } else { /*if vt is disabled, use all pf queues */ if (rte_port->dev_info.vmdq_pool_base == 0) {