[dpdk-stable] patch 'vhost: do not limit packed ring size' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:02 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 12/17/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.

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/8b66c5008ebaeec8509d56c42957f1e0c9d54cd6

Thanks.

Kevin.

---
>From 8b66c5008ebaeec8509d56c42957f1e0c9d54cd6 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu at intel.com>
Date: Wed, 30 Oct 2019 17:24:21 +0800
Subject: [PATCH] vhost: do not limit packed ring size

[ upstream commit 3939255eeda47d9f70d5d54729ef94a27ae8b803 ]

Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Should not limit packed ring size to power of two.

Fixes: 708e14d8b9ac ("vhost: advertize packed ring layout support")

Signed-off-by: Marvin Liu <yong.liu at intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_vhost/vhost_user.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index b5de73b4f..23a6bf892 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -385,6 +385,18 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
 	 *   Queue Size value is always a power of 2. The maximum Queue Size
 	 *   value is 32768.
+	 *
+	 * VIRTIO 1.1 2.7 Virtqueues says:
+	 *
+	 *   Packed virtqueues support up to 2^15 entries each.
 	 */
-	if ((vq->size & (vq->size - 1)) || vq->size > 32768) {
+	if (!vq_is_packed(dev)) {
+		if (vq->size & (vq->size - 1)) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"invalid virtqueue size %u\n", vq->size);
+			return VH_RESULT_ERR;
+		}
+	}
+
+	if (vq->size > 32768) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"invalid virtqueue size %u\n", vq->size);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:13.564721484 +0000
+++ 0010-vhost-do-not-limit-packed-ring-size.patch	2019-12-11 21:24:12.589652829 +0000
@@ -1 +1 @@
-From 3939255eeda47d9f70d5d54729ef94a27ae8b803 Mon Sep 17 00:00:00 2001
+From 8b66c5008ebaeec8509d56c42957f1e0c9d54cd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3939255eeda47d9f70d5d54729ef94a27ae8b803 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 2a9fa7c6c..3f649c802 100644
+index b5de73b4f..23a6bf892 100644
@@ -23 +24 @@
-@@ -364,6 +364,18 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
+@@ -385,6 +385,18 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
@@ -36 +37 @@
-+			return RTE_VHOST_MSG_RESULT_ERR;
++			return VH_RESULT_ERR;



More information about the stable mailing list