[dpdk-stable] patch 'net/vhost: allocate interface name from heap' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Feb 17 18:45:30 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/19/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 598ff73b843608b5bd1f5e2cace2822d12b6eebc Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda at valinux.co.jp>
Date: Thu, 6 Feb 2020 10:39:33 +0900
Subject: [PATCH] net/vhost: allocate interface name from heap

[ upstream commit e045e858444349323cb02e0951cd977d4a0edd0d ]

This patch allocates iface_name of pmd_internal from heap
in order to be able to refer from secondary processes.

Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")

Signed-off-by: Itsuro Oda <oda at valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.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 a63588986f..cea2ead2da 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1009,7 +1009,7 @@ eth_dev_close(struct rte_eth_dev *dev)
 			rte_free(dev->data->tx_queues[i]);
 
 	free(internal->dev_name);
-	free(internal->iface_name);
+	rte_free(internal->iface_name);
 	rte_free(internal);
 
 	dev->data->dev_private = NULL;
@@ -1256,9 +1256,11 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	internal->dev_name = strdup(name);
 	if (internal->dev_name == NULL)
 		goto error;
-	internal->iface_name = strdup(iface_name);
+	internal->iface_name = rte_malloc_socket(name, strlen(iface_name) + 1,
+						 0, numa_node);
 	if (internal->iface_name == NULL)
 		goto error;
+	strcpy(internal->iface_name, iface_name);
 
 	list->eth_dev = eth_dev;
 	pthread_mutex_lock(&internal_list_lock);
@@ -1306,7 +1308,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 
 error:
 	if (internal) {
-		free(internal->iface_name);
+		rte_free(internal->iface_name);
 		free(internal->dev_name);
 	}
 	rte_free(vring_state);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-17 17:00:16.379268602 +0000
+++ 0038-net-vhost-allocate-interface-name-from-heap.patch	2020-02-17 17:00:15.359951192 +0000
@@ -1,13 +1,14 @@
-From e045e858444349323cb02e0951cd977d4a0edd0d Mon Sep 17 00:00:00 2001
+From 598ff73b843608b5bd1f5e2cace2822d12b6eebc Mon Sep 17 00:00:00 2001
 From: Itsuro Oda <oda at valinux.co.jp>
 Date: Thu, 6 Feb 2020 10:39:33 +0900
 Subject: [PATCH] net/vhost: allocate interface name from heap
 
+[ upstream commit e045e858444349323cb02e0951cd977d4a0edd0d ]
+
 This patch allocates iface_name of pmd_internal from heap
 in order to be able to refer from secondary processes.
 
 Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
-Cc: stable at dpdk.org
 
 Signed-off-by: Itsuro Oda <oda at valinux.co.jp>
 Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>


More information about the stable mailing list