DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M	packets
Date: Thu, 3 Jul 2014 10:07:32 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B0F2283B0@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1404377976-9231-1-git-send-email-yong.liu@intel.com>



> -----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
> 
>     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>
> ---
>  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

How about "mbufs += ret" rather than "mbufs = (struct rte_mbuf **)&mbufs[ret]"? 

  reply	other threads:[~2014-07-03 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03  8:59 Yong Liu
2014-07-03 10:07 ` Xie, Huawei [this message]
2014-07-03 10:54   ` Dumitrescu, Cristian
2014-07-03 10:55 ` Dumitrescu, Cristian
2014-07-03 14:43 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C37D651A908B024F974696C65296B57B0F2283B0@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).