From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E557D30E for ; Thu, 3 Jul 2014 12:55:25 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 03 Jul 2014 03:55:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,594,1400050800"; d="scan'208";a="556889117" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 03 Jul 2014 03:55:43 -0700 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 3 Jul 2014 11:55:37 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.76]) by IRSMSX153.ger.corp.intel.com ([169.254.9.233]) with mapi id 14.03.0123.003; Thu, 3 Jul 2014 11:55:33 +0100 From: "Dumitrescu, Cristian" To: "Liu, Yong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M packets Thread-Index: AQHPlp07xaDHe+/dLku0rDJXODiZLJuOLUjA Date: Thu, 3 Jul 2014 10:55:32 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891262D69A967@IRSMSX102.ger.corp.intel.com> References: <1404377976-9231-1-git-send-email-yong.liu@intel.com> In-Reply-To: <1404377976-9231-1-git-send-email-yong.liu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [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 10:55:26 -0000 Acked-by: Cristian Dumitrescu -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yong Liu Sent: Thursday, July 3, 2014 10:00 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M pac= kets 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_threa= d.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 =3D 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 -=3D ret; - mbufs =3D (struct rte_mbuf **)&mbufs[ret]; - /* limit number of retries to avoid endless loop */ - /* reset retry counter if some packets were sent */ - if (likely(ret !=3D 0)) { - continue; - } - } - } while (ret !=3D n); + /* we cannot drop the packets, so re-send */ + /* update number of packets to be sent */ + n -=3D ret; + mbufs =3D (struct rte_mbuf **)&mbufs[ret]; + } while (n); } = = -- = 1.7.7.6 -------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others = is strictly prohibited. If you are not the intended recipient, please conta= ct the sender and delete all copies.