DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Patrick Fu <patrick.fu@intel.com>, dev@dpdk.org, chenbo.xia@intel.com
Cc: jiayu.hu@intel.com
Subject: Re: [dpdk-dev] [PATCH v1] vhost: fix async inflight packet counter
Date: Mon, 9 Nov 2020 10:18:57 +0100	[thread overview]
Message-ID: <68f0667e-d40e-444f-8fb9-e6604abd65d1@redhat.com> (raw)
In-Reply-To: <20201103053501.2805-1-patrick.fu@intel.com>



On 11/3/20 6:35 AM, Patrick Fu wrote:
> Async inflight packet counter should take failed packets into account.
> Failed packets will be deducted in the error handling logic.
> 
> Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion")
> Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
> 
> Signed-off-by: Patrick Fu <patrick.fu@intel.com>
> ---
>  lib/librte_vhost/virtio_net.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index 10dec5e54..6c5128665 100644
> --- a/lib/librte_vhost/virtio_net.c
> +++ b/lib/librte_vhost/virtio_net.c
> @@ -1567,7 +1567,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
>  			src_it = it_pool;
>  			dst_it = it_pool + 1;
>  			segs_await = 0;
> -			vq->async_pkts_inflight_n += n_pkts;
> +			vq->async_pkts_inflight_n += pkt_burst_idx;
>  
>  			if (unlikely(n_pkts < (int)pkt_burst_idx)) {
>  				/*
> @@ -1587,7 +1587,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
>  	if (pkt_burst_idx) {
>  		n_pkts = vq->async_ops.transfer_data(dev->vid,
>  				queue_id, tdes, 0, pkt_burst_idx);
> -		vq->async_pkts_inflight_n += n_pkts;
> +		vq->async_pkts_inflight_n += pkt_burst_idx;
>  
>  		if (unlikely(n_pkts < (int)pkt_burst_idx))
>  			pkt_err = pkt_burst_idx - n_pkts;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2020-11-09  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  5:35 Patrick Fu
2020-11-09  9:18 ` Maxime Coquelin [this message]
2020-11-09 16:32 ` Maxime Coquelin

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=68f0667e-d40e-444f-8fb9-e6604abd65d1@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=patrick.fu@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).