examples/qos_sched: fix flow pause after 2M packets

After enable vector pmd, qos_sched only send 32 packets every burst.
That will cause some packets not transmitted and therefore mempool
will be drain after a while.
App qos_sched now will re-send the packets which failed to send out in
previous tx function.

Signed-off-by: Yong Liu <yong.liu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
This commit is contained in:
Yong Liu 2014-07-03 16:59:36 +08:00 committed by Thomas Monjalon
parent 91873a6527
commit d827c2695e

View File

@ -139,17 +139,11 @@ app_send_burst(struct thread_conf *qconf)
do {
ret = rte_eth_tx_burst(qconf->tx_port, qconf->tx_queue, mbufs, (uint16_t)n);
if (unlikely(ret < n)) { /* we cannot drop the packets, so re-send */
/* update number of packets to be sent */
n -= ret;
mbufs = (struct rte_mbuf **)&mbufs[ret];
/* limit number of retries to avoid endless loop */
/* reset retry counter if some packets were sent */
if (likely(ret != 0)) {
continue;
}
}
} while (ret != n);
/* we cannot drop the packets, so re-send */
/* update number of packets to be sent */
n -= ret;
mbufs = (struct rte_mbuf **)&mbufs[ret];
} while (n);
}