From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 6895830E for ; Thu, 3 Jul 2014 12:07:43 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 03 Jul 2014 03:08:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,594,1400050800"; d="scan'208";a="452875375" Received: from fmsmsx107.amr.corp.intel.com ([10.19.9.54]) by azsmga001.ch.intel.com with ESMTP; 03 Jul 2014 03:07:35 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.19.17.220) by FMSMSX107.amr.corp.intel.com (10.19.9.54) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 3 Jul 2014 03:07:34 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.19.17.220) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 3 Jul 2014 03:07:34 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.81]) by shsmsx102.ccr.corp.intel.com ([169.254.2.21]) with mapi id 14.03.0123.003; Thu, 3 Jul 2014 18:07:32 +0800 From: "Xie, Huawei" To: "Liu, Yong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M packets Thread-Index: AQHPlp07yQiD+hPv50a129ZEwkpwGZuOHb/g Date: Thu, 3 Jul 2014 10:07:32 +0000 Message-ID: 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: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:07:47 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yong Liu > Sent: Thursday, July 03, 2014 5:00 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M > packets >=20 > 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 i= n > previous tx function. >=20 > 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(-) >=20 > 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) >=20 > 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); > } >=20 >=20 > -- > 1.7.7.6 How about "mbufs +=3D ret" rather than "mbufs =3D (struct rte_mbuf **)&mbuf= s[ret]"?=20