From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Liu Subject: [PATCH] examples/qos_sched: fix flow pause after 2M packets Date: Thu, 3 Jul 2014 16:59:36 +0800 Message-ID: <1404377976-9231-1-git-send-email-yong.liu@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 Acked-by: Cristian Dumitrescu Tested-by: Waterman Cao --- examples/qos_sched/app_thread.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index 7501147..59c4014 100755 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -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); } -- 1.7.7.6