examples: fix draining all queues in l3fwd derivatives
[dpdk.git] / examples / l3fwd-power / main.c
index 5934efe..cb42bfb 100644 (file)
@@ -1546,7 +1546,6 @@ main(int argc, char **argv)
        uint32_t n_tx_queue, nb_lcores;
        uint32_t dev_rxq_num, dev_txq_num;
        uint8_t portid, nb_rx_queue, queue, socketid;
-       uint8_t nb_tx_port;
 
        /* catch SIGINT and restore cpufreq governor to ondemand */
        signal(SIGINT, signal_exit_now);
@@ -1582,7 +1581,6 @@ main(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "check_port_config failed\n");
 
        nb_lcores = rte_lcore_count();
-       nb_tx_port = 0;
 
        /* initialize all ports */
        for (portid = 0; portid < nb_ports; portid++) {
@@ -1675,12 +1673,10 @@ main(int argc, char **argv)
                        qconf->tx_queue_id[portid] = queueid;
                        queueid++;
 
-                       qconf->n_tx_port = nb_tx_port;
                        qconf->tx_port_id[qconf->n_tx_port] = portid;
+                       qconf->n_tx_port++;
                }
                printf("\n");
-
-               nb_tx_port++;
        }
 
        for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {