[dpdk-stable] patch 'vhost: prevent zero-copy with incompatible client mode' has been queued to LTS release 18.11.9
Kevin Traynor
ktraynor at redhat.com
Fri Jun 5 20:24:09 CEST 2020
Hi,
FYI, your patch has been queued to LTS release 18.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/10/20. 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.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/06b2fe9781c3cb251b2ac4255f2578636ace2b54
Thanks.
Kevin.
---
>From 06b2fe9781c3cb251b2ac4255f2578636ace2b54 Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding at intel.com>
Date: Wed, 29 Apr 2020 02:59:46 +0000
Subject: [PATCH] vhost: prevent zero-copy with incompatible client mode
[ upstream commit 715070ea10e6da1169deef2a3ea77ae934b4c333 ]
In server mode, virtio-user inits under the assumption that vhost-user
supports a list of features. However, this could be problematic when
in_order feature is negotiated but not supported by vhost-user when
enables dequeue_zero_copy later.
Add handling when vhost-user enables dequeue_zero_copy as client.
Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode")
Signed-off-by: Xuan Ding <xuan.ding at intel.com>
Tested-by: Yinan Wang <yinan.wang at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
lib/librte_vhost/socket.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 75f6703f56..fb946e8c54 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -891,4 +891,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
*/
if (vsocket->dequeue_zero_copy) {
+ if (!vsocket->is_server) {
+ RTE_LOG(ERR, VHOST_CONFIG,
+ "error: zero copy is incompatible with vhost client mode\n");
+ ret = -1;
+ goto out_mutex;
+ }
vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
--
2.21.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-06-05 19:20:51.605232045 +0100
+++ 0012-vhost-prevent-zero-copy-with-incompatible-client-mod.patch 2020-06-05 19:20:50.725042744 +0100
@@ -1 +1 @@
-From 715070ea10e6da1169deef2a3ea77ae934b4c333 Mon Sep 17 00:00:00 2001
+From 06b2fe9781c3cb251b2ac4255f2578636ace2b54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 715070ea10e6da1169deef2a3ea77ae934b4c333 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 7c80121790..bb8d0d7801 100644
+index 75f6703f56..fb946e8c54 100644
@@ -27,3 +28,3 @@
-@@ -927,4 +927,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
- goto out_mutex;
- }
+@@ -891,4 +891,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
+ */
+ if (vsocket->dequeue_zero_copy) {
@@ -31 +32 @@
-+ VHOST_LOG_CONFIG(ERR,
++ RTE_LOG(ERR, VHOST_CONFIG,
More information about the stable
mailing list