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

Kevin Traynor ktraynor at redhat.com
Thu Feb 27 18:37:59 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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.

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/68a347bf099a80eb7e4e4ddc756c6e8d89440f02

Thanks.

Kevin.

---
>From 68a347bf099a80eb7e4e4ddc756c6e8d89440f02 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 47d0102e0e..45e9d5cae4 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1006,5 +1006,5 @@ eth_dev_close(struct rte_eth_dev *dev)
 
 	free(internal->dev_name);
-	free(internal->iface_name);
+	rte_free(internal->iface_name);
 	rte_free(internal);
 
@@ -1247,7 +1247,9 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_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;
@@ -1291,5 +1293,5 @@ 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);
 	}
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-27 17:26:24.144104345 +0000
+++ 0008-net-vhost-allocate-interface-name-from-heap.patch	2020-02-27 17:26:23.643831243 +0000
@@ -1 +1 @@
-From e045e858444349323cb02e0951cd977d4a0edd0d Mon Sep 17 00:00:00 2001
+From 68a347bf099a80eb7e4e4ddc756c6e8d89440f02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e045e858444349323cb02e0951cd977d4a0edd0d ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index a63588986f..cea2ead2da 100644
+index 47d0102e0e..45e9d5cae4 100644
@@ -22 +23 @@
-@@ -1010,5 +1010,5 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -1006,5 +1006,5 @@ eth_dev_close(struct rte_eth_dev *dev)
@@ -29 +30 @@
-@@ -1257,7 +1257,9 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
+@@ -1247,7 +1247,9 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
@@ -40 +41 @@
-@@ -1307,5 +1309,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
+@@ -1291,5 +1293,5 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,



More information about the stable mailing list