[dpdk-stable] patch 'net/vhost: check creation failure' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:09 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/13/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 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Tue, 7 Jan 2020 11:25:48 +0800
Subject: [PATCH] net/vhost: check creation failure

[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ]

The function eth_dev_vhost_create() could return errors,
the return value need to be checked.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 46f01a7f46..a63588986f 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1302,7 +1302,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	}
 
 	rte_eth_dev_probing_finish(eth_dev);
-	return data->port_id;
+	return 0;
 
 error:
 	if (internal) {
@@ -1455,8 +1455,10 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 	if (dev->device.numa_node == SOCKET_ID_ANY)
 		dev->device.numa_node = rte_socket_id();
 
-	eth_dev_vhost_create(dev, iface_name, queues, dev->device.numa_node,
-		flags, disable_flags);
+	ret = eth_dev_vhost_create(dev, iface_name, queues,
+				   dev->device.numa_node, flags, disable_flags);
+	if (ret == -1)
+		VHOST_LOG(ERR, "Failed to create %s\n", name);
 
 out_free:
 	rte_kvargs_free(kvlist);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:41.227581606 +0000
+++ 0063-net-vhost-check-creation-failure.patch	2020-02-11 11:17:38.456002394 +0000
@@ -1,13 +1,14 @@
-From f04513bc89d90c2ad425f1be1e4716bb3c790fb2 Mon Sep 17 00:00:00 2001
+From 92a68be7471f9f79bb9f146f390767a83c50539f Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Tue, 7 Jan 2020 11:25:48 +0800
 Subject: [PATCH] net/vhost: check creation failure
 
+[ upstream commit f04513bc89d90c2ad425f1be1e4716bb3c790fb2 ]
+
 The function eth_dev_vhost_create() could return errors,
 the return value need to be checked.
 
 Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>


More information about the stable mailing list