patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Xiao, QimaiX" <qimaix.xiao@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Ye, Xiaolong" <xiaolong.ye@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"Liu,  Yong" <yong.liu@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] vhost: fix packed ring zero-copy
Date: Mon, 23 Mar 2020 05:40:33 +0000	[thread overview]
Message-ID: <7fb0f1b6f17943368251628e16150486@intel.com> (raw)
In-Reply-To: <20200316153822.113182-1-yong.liu@intel.com>

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marvin Liu
> Sent: Monday, March 16, 2020 11:38 PM
> To: maxime.coquelin@redhat.com; Wang, Zhihong
> <zhihong.wang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Liu, Yong <yong.liu@intel.com>
> Subject: [dpdk-dev] [PATCH] vhost: fix packed ring zero-copy
> 
> Available buffer ID should be stored in the zmbuf in the packed-ring
> dequeue path. There's no guarantee that local queue avail index is equal to
> buffer ID.
> 
> Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single
> dequeue")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> Reported-by: Yinan Wang <yinan.wang@intel.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index
> 37c47c7dc..210415904 100644
> --- a/lib/librte_vhost/virtio_net.c
> +++ b/lib/librte_vhost/virtio_net.c
> @@ -2004,7 +2004,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct
> virtio_net *dev,
> 
>  	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
>  		zmbufs[i]->mbuf = pkts[i];
> -		zmbufs[i]->desc_idx = avail_idx + i;
> +		zmbufs[i]->desc_idx = ids[i];
>  		zmbufs[i]->desc_count = 1;
>  	}
> 
> @@ -2045,7 +2045,7 @@ virtio_dev_tx_single_packed_zmbuf(struct
> virtio_net *dev,
>  		return -1;
>  	}
>  	zmbuf->mbuf = *pkts;
> -	zmbuf->desc_idx = vq->last_avail_idx;
> +	zmbuf->desc_idx = buf_id;
>  	zmbuf->desc_count = desc_count;
> 
>  	rte_mbuf_refcnt_update(*pkts, 1);
> --
> 2.17.1


  reply	other threads:[~2020-03-23  5:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 15:38 [dpdk-stable] " Marvin Liu
2020-03-23  5:40 ` Xiao, QimaiX [this message]
2020-04-10 14:42 ` 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=7fb0f1b6f17943368251628e16150486@intel.com \
    --to=qimaix.xiao@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@intel.com \
    --cc=yong.liu@intel.com \
    --cc=zhihong.wang@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).