[dpdk-stable] patch 'vhost: enforce desc flags and content read ordering' has been queued to LTS release 18.11.1
Kevin Traynor
ktraynor at redhat.com
Fri Jan 4 14:24:48 CET 2019
Hi,
FYI, your patch has been queued to LTS release 18.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/11/19. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Kevin Traynor
---
>From 2c4f729dc4f13640432e61a28a94f2ac053fed8e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Wed, 19 Dec 2018 09:21:11 +0100
Subject: [PATCH] vhost: enforce desc flags and content read ordering
[ upstream commit 33e12d63d156b99aed2733e6aae97d53931e8e43 ]
A read barrier is required to ensure that the ordering between
descriptor's flags and content reads is enforced.
1. read flags = desc->flags
if (flags & AVAIL_BIT)
2. read desc->id
There is a control dependency between steps 1 and step 2.
2 could be speculatively executed before 1, which could result
in 'id' to not be updated yet.
Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")
Reported-by: Jason Wang <jasowang at redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
Acked-by: Tiwei Bie <tiwei.bie at intel.com>
---
lib/librte_vhost/virtio_net.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index f11ebb54f..68b72e7a5 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -521,4 +521,10 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
return -1;
+ /*
+ * The ordering between desc flags and desc
+ * content reads need to be enforced.
+ */
+ rte_smp_rmb();
+
*desc_count = 0;
*len = 0;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-01-04 13:23:09.053967513 +0000
+++ 0066-vhost-enforce-desc-flags-and-content-read-ordering.patch 2019-01-04 13:23:07.000000000 +0000
@@ -1,8 +1,10 @@
-From 33e12d63d156b99aed2733e6aae97d53931e8e43 Mon Sep 17 00:00:00 2001
+From 2c4f729dc4f13640432e61a28a94f2ac053fed8e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Wed, 19 Dec 2018 09:21:11 +0100
Subject: [PATCH] vhost: enforce desc flags and content read ordering
+[ upstream commit 33e12d63d156b99aed2733e6aae97d53931e8e43 ]
+
A read barrier is required to ensure that the ordering between
descriptor's flags and content reads is enforced.
@@ -15,7 +17,6 @@
in 'id' to not be updated yet.
Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")
-Cc: stable at dpdk.org
Reported-by: Jason Wang <jasowang at redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -27,10 +28,10 @@
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 7f37bbbed..a9b1bc55f 100644
+index f11ebb54f..68b72e7a5 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
-@@ -482,4 +482,10 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -521,4 +521,10 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
return -1;
+ /*
More information about the stable
mailing list