DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xia, Chenbo" <chenbo.xia@intel.com>
To: "Hu, Jiayu" <jiayu.hu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"He, Xingguang" <xingguang.he@intel.com>
Subject: RE: [PATCH v2] vhost: fix packed ring descriptor update in async enqueue
Date: Tue, 16 Nov 2021 06:27:14 +0000	[thread overview]
Message-ID: <SN6PR11MB35042292F8D00A28DB2187149C999@SN6PR11MB3504.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211110124009.2250592-1-jiayu.hu@intel.com>

> -----Original Message-----
> From: Hu, Jiayu <jiayu.hu@intel.com>
> Sent: Wednesday, November 10, 2021 8:40 PM
> To: dev@dpdk.org
> Cc: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>; He,
> Xingguang <xingguang.he@intel.com>; Hu, Jiayu <jiayu.hu@intel.com>
> Subject: [PATCH v2] vhost: fix packed ring descriptor update in async enqueue
> 
> If the packet uses multiple descrptors and its descriptor indices are

descrptors -> descriptors

With this fixed:

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

> wrapped, the first descriptor flag is not updated last, which may cause
> virtio read the incomplete packet. For example, given a packet uses 64
> descriptors, and virtio ring size is 256, and its descriptor indices is
> 224~255 and 0~31, current implementation will update 224~255 descriptor
> flags earlier than 0~31 descriptor flags.
> 
> This patch fixes this issue by updating descriptor flags in one loop,
> so that the first descriptor flag is always updated last.
> 
> Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")
> 
> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
> v2:
> * update commit log
> ---
>  lib/vhost/virtio_net.c | 122 ++++++++++++++++++-----------------------
>  1 file changed, 54 insertions(+), 68 deletions(-)


  reply	other threads:[~2021-11-16  6:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 10:19 [dpdk-dev] [PATCH] " Jiayu Hu
2021-11-08  8:42 ` Maxime Coquelin
2021-11-10 12:40 ` [dpdk-dev] [PATCH v2] " Jiayu Hu
2021-11-16  6:27   ` Xia, Chenbo [this message]
2021-11-16 15:17   ` [PATCH v3] " Jiayu Hu
2021-11-16  9:59     ` Maxime Coquelin
2021-11-16 10:25     ` 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=SN6PR11MB35042292F8D00A28DB2187149C999@SN6PR11MB3504.namprd11.prod.outlook.com \
    --to=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=xingguang.he@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).