[dpdk-stable] patch 'vhost: fix packed ring zero-copy' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:03:24 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/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.

Thanks.

Luca Boccassi

---
>From b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu at intel.com>
Date: Mon, 24 Feb 2020 23:14:19 +0800
Subject: [PATCH] vhost: fix packed ring zero-copy

[ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ]

Available buffer ID should be stored in the zmbuf in the packed-ring
dequeue path. There's no guarantee that local queue avail index is
equal to buffer ID.

Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")

Signed-off-by: Marvin Liu <yong.liu at intel.com>
Reported-by: Yinan Wang <yinan.wang at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/virtio_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 33f10258cf..3f46f5c517 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
 
 	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
 		zmbufs[i]->mbuf = pkts[i];
-		zmbufs[i]->desc_idx = avail_idx + i;
+		zmbufs[i]->desc_idx = ids[i];
 		zmbufs[i]->desc_count = 1;
 	}
 
@@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
 		return -1;
 	}
 	zmbuf->mbuf = *pkts;
-	zmbuf->desc_idx = vq->last_avail_idx;
+	zmbuf->desc_idx = buf_id;
 	zmbuf->desc_count = desc_count;
 
 	rte_mbuf_refcnt_update(*pkts, 1);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.294164299 +0100
+++ 0069-vhost-fix-packed-ring-zero-copy.patch	2020-05-19 14:04:44.228648590 +0100
@@ -1,14 +1,15 @@
-From 2a0ff4d55445988629e1a00afdf542c5e62387fa Mon Sep 17 00:00:00 2001
+From b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu at intel.com>
 Date: Mon, 24 Feb 2020 23:14:19 +0800
 Subject: [PATCH] vhost: fix packed ring zero-copy
 
+[ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ]
+
 Available buffer ID should be stored in the zmbuf in the packed-ring
 dequeue path. There's no guarantee that local queue avail index is
 equal to buffer ID.
 
 Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
-Cc: stable at dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu at intel.com>
 Reported-by: Yinan Wang <yinan.wang at intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 37c47c7dc0..2104159047 100644
+index 33f10258cf..3f46f5c517 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
-@@ -2004,7 +2004,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
+@@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
  
  	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
  		zmbufs[i]->mbuf = pkts[i];
@@ -30,7 +31,7 @@
  		zmbufs[i]->desc_count = 1;
  	}
  
-@@ -2045,7 +2045,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
+@@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
  		return -1;
  	}
  	zmbuf->mbuf = *pkts;


More information about the stable mailing list