[dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 27 10:33:33 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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 02/29/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 238736d729ee8c509297836f80b41f0034239587 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Tue, 18 Feb 2020 18:22:40 +0100
Subject: [PATCH] net/vhost: prevent multiple setups on reconfiguration

[ upstream commit 366a0500f432a862f37ab2ca220e60f5654eadd7 ]

Ethdev's .dev_configure callback can be called multiple
time during a device life-time, but Vhost makes the
wrong assumption that it is not the case and try to
setup again the device on reconfiguration.

This patch ensures the device hasn't been already setup
before proceeding.

Fixes: 3d01b759d267 ("net/vhost: delay driver setup")

Reported-by: Yinan Wang <yinan.wang at intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Tested-by: Yinan Wang <yinan.wang at intel.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index c1b3dffeec..c5e3fa229a 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -877,6 +877,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
 	unsigned int numa_node = eth_dev->device->numa_node;
 	const char *name = eth_dev->device->name;
 
+	/* Don't try to setup again if it has already been done. */
+	list = find_internal_resource(internal->iface_name);
+	if (list)
+		return 0;
+
 	list = rte_zmalloc_socket(name, sizeof(*list), 0, numa_node);
 	if (list == NULL)
 		return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-27 09:31:56.272868935 +0000
+++ 0013-net-vhost-prevent-multiple-setups-on-reconfiguration.patch	2020-02-27 09:31:55.703945639 +0000
@@ -1,8 +1,10 @@
-From 366a0500f432a862f37ab2ca220e60f5654eadd7 Mon Sep 17 00:00:00 2001
+From 238736d729ee8c509297836f80b41f0034239587 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin at redhat.com>
 Date: Tue, 18 Feb 2020 18:22:40 +0100
 Subject: [PATCH] net/vhost: prevent multiple setups on reconfiguration
 
+[ upstream commit 366a0500f432a862f37ab2ca220e60f5654eadd7 ]
+
 Ethdev's .dev_configure callback can be called multiple
 time during a device life-time, but Vhost makes the
 wrong assumption that it is not the case and try to
@@ -12,7 +14,6 @@
 before proceeding.
 
 Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
-Cc: stable at dpdk.org
 
 Reported-by: Yinan Wang <yinan.wang at intel.com>
 Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -24,10 +25,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
-index 4a7b1b608c..458ed58f5f 100644
+index c1b3dffeec..c5e3fa229a 100644
 --- a/drivers/net/vhost/rte_eth_vhost.c
 +++ b/drivers/net/vhost/rte_eth_vhost.c
-@@ -876,6 +876,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
+@@ -877,6 +877,11 @@ vhost_driver_setup(struct rte_eth_dev *eth_dev)
  	unsigned int numa_node = eth_dev->device->numa_node;
  	const char *name = eth_dev->device->name;
  


More information about the stable mailing list