From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7788B58F9 for ; Thu, 3 Jul 2014 10:59:26 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 03 Jul 2014 01:59:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,594,1400050800"; d="scan'208";a="567735353" Received: from shilc102.sh.intel.com ([10.239.39.44]) by orsmga002.jf.intel.com with ESMTP; 03 Jul 2014 01:59:45 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s638xfCY008763; Thu, 3 Jul 2014 16:59:43 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s638xcta009340; Thu, 3 Jul 2014 16:59:40 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s638xcFM009336; Thu, 3 Jul 2014 16:59:38 +0800 From: Yong Liu To: dev@dpdk.org Date: Thu, 3 Jul 2014 16:59:36 +0800 Message-Id: <1404377976-9231-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2014 08:59:26 -0000 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