From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B8E0132A5; Tue, 22 Jan 2019 18:04:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2019 09:04:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,507,1539673200"; d="scan'208";a="313846128" Received: from unknown (HELO dpdk-tbie.sh.intel.com) ([10.67.104.173]) by fmsmga005.fm.intel.com with ESMTP; 22 Jan 2019 09:04:34 -0800 From: Tiwei Bie To: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org Cc: stable@dpdk.org Date: Wed, 23 Jan 2019 01:01:43 +0800 Message-Id: <20190122170143.5650-5-tiwei.bie@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190122170143.5650-1-tiwei.bie@intel.com> References: <20190122170143.5650-1-tiwei.bie@intel.com> Subject: [dpdk-stable] [PATCH 4/4] net/virtio-user: fix used ring update in cvq handling X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 17:04:36 -0000 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 --- 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