[dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:21 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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 0461fa1134443efb3378c41746d210408ead2c19 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Thu, 1 Oct 2020 12:11:54 +0200
Subject: [PATCH] vhost: fix virtio-net header length with packed ring

[ upstream commit 22eaf2613537ba6b0e79f656195eeeaa3dd14666 ]

In case packed ring layout has been negotiated, but neither
Version 1 nor mergeable buffers, the Virtio-net header len
is assigned to the legacy devices value, which is wrong.

This patch fixes this with using the proper len as devices
using packed ring are not legacy devices.

Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")

Reported-by: Marvin Liu <yong.liu at intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
---
 lib/librte_vhost/vhost_user.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 4cc0ce21e0..647f0e9cde 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -350,7 +350,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
 
 	dev->features = features;
 	if (dev->features &
-		((1 << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VIRTIO_F_VERSION_1))) {
+		((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
+		 (1ULL << VIRTIO_F_VERSION_1) |
+		 (1ULL << VIRTIO_F_RING_PACKED))) {
 		dev->vhost_hlen = sizeof(struct virtio_net_hdr_mrg_rxbuf);
 	} else {
 		dev->vhost_hlen = sizeof(struct virtio_net_hdr);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.757555512 +0000
+++ 0162-vhost-fix-virtio-net-header-length-with-packed-ring.patch	2020-10-28 10:35:11.760833792 +0000
@@ -1,8 +1,10 @@
-From 22eaf2613537ba6b0e79f656195eeeaa3dd14666 Mon Sep 17 00:00:00 2001
+From 0461fa1134443efb3378c41746d210408ead2c19 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin at redhat.com>
 Date: Thu, 1 Oct 2020 12:11:54 +0200
 Subject: [PATCH] vhost: fix virtio-net header length with packed ring
 
+[ upstream commit 22eaf2613537ba6b0e79f656195eeeaa3dd14666 ]
+
 In case packed ring layout has been negotiated, but neither
 Version 1 nor mergeable buffers, the Virtio-net header len
 is assigned to the legacy devices value, which is wrong.
@@ -12,7 +14,6 @@
 
 Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
 Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")
-Cc: stable at dpdk.org
 
 Reported-by: Marvin Liu <yong.liu at intel.com>
 Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -22,10 +23,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 4deceb3e00..5d1fb9e863 100644
+index 4cc0ce21e0..647f0e9cde 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -341,7 +341,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -350,7 +350,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
  
  	dev->features = features;
  	if (dev->features &


More information about the stable mailing list