DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] net/virtio-user: fix used ring update in cvq handling
Date: Wed, 23 Jan 2019 01:01:43 +0800	[thread overview]
Message-ID: <20190122170143.5650-5-tiwei.bie@intel.com> (raw)
In-Reply-To: <20190122170143.5650-1-tiwei.bie@intel.com>

When updating used ring, the id in used element should be the
index of the first desc in the desc chain.

Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 89d287a74..d1157378d 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -722,7 +722,7 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
 
 		/* Update used ring */
 		uep = &vring->used->ring[avail_idx];
-		uep->id = avail_idx;
+		uep->id = desc_idx;
 		uep->len = n_descs;
 
 		vring->used->idx++;
-- 
2.17.1

  parent reply	other threads:[~2019-01-22 17:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 17:01 [dpdk-dev] [PATCH 0/4] Virtio fixes Tiwei Bie
2019-01-22 17:01 ` [dpdk-dev] [PATCH 1/4] net/virtio: fix the control vq support Tiwei Bie
     [not found]   ` <CGME20190123130903eucas1p2730776e71039a79024dd7602b5dcad7d@eucas1p2.samsung.com>
2019-01-23 13:09     ` [dpdk-dev] [1/4] " Ilya Maximets
     [not found]       ` <CGME20190123163323eucas1p1baaec2c637cdc656ab9b26dbfd455bae@eucas1p1.samsung.com>
2019-01-23 16:33         ` Ilya Maximets
2019-01-23 22:02           ` Maxime Coquelin
2019-01-23 22:03   ` [dpdk-dev] [PATCH 1/4] " Maxime Coquelin
2019-01-22 17:01 ` [dpdk-dev] [PATCH 2/4] net/virtio-user: " Tiwei Bie
2019-01-23 22:07   ` Maxime Coquelin
2019-01-22 17:01 ` [dpdk-dev] [PATCH 3/4] net/virtio: use virtio barrier in packed ring Tiwei Bie
     [not found]   ` <CGME20190123155232eucas1p28bdd3a5c220452b81e21e48c19f3e5a7@eucas1p2.samsung.com>
2019-01-23 15:52     ` [dpdk-dev] [3/4] " Ilya Maximets
2019-01-23 22:09   ` [dpdk-dev] [PATCH 3/4] " Maxime Coquelin
2019-01-22 17:01 ` Tiwei Bie [this message]
2019-01-23 22:08   ` [dpdk-dev] [PATCH 4/4] net/virtio-user: fix used ring update in cvq handling Maxime Coquelin
2019-01-23 22:25 ` [dpdk-dev] [PATCH 0/4] Virtio fixes 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=20190122170143.5650-5-tiwei.bie@intel.com \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --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).