From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9907AA0554 for ; Mon, 17 Feb 2020 18:46:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8269A1DAAE; Mon, 17 Feb 2020 18:46:54 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 0A3911DA9E for ; Mon, 17 Feb 2020 18:46:53 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id z7so20759008wrl.13 for ; Mon, 17 Feb 2020 09:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s+CBn5gquhyY711+UvB/STMdMPLwJvHXqhjx/MZH2Js=; b=RAZzijf85edtdXl10TgQhuWcFSVtPI/3zbbaZ6GitnpoQmWORfrsgDal6Olqp6GdP9 AE1m4f4VLVURiF2uqLc2MhKnybSBlR/CCzNa6Fp7B9PSBmVqjx1JJG8XqPBvBYH+6sND u237+YKI44Hy2FlGnWggagopkNBekpwivhv+wzC+ziyCQGkKj1NrEOi4FAj969I55mEs o5eP9YIgdZp7lixczcJFNW7n9earPMRTY0W6889qmcf8UaC4FGJCQswHE0Sv+OdsmKe6 RRxY8KBp0B3TkleBIeAdmwJQSGxGQje0F97u+ZQrEvlwGsz7FawyFTlfK2z8WZPnRK+/ UgFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s+CBn5gquhyY711+UvB/STMdMPLwJvHXqhjx/MZH2Js=; b=jiZON70z3mJusVpTWLNcBLjbWHu+noWnrlUF+Xi6f/jo28Qlvlj2YaKe+uQZLm84fK Oc0GVcZb6rdZf7hD9hCi8ZRnIgLAiHxGtlvJDxY31XGNyYZIZcItA5AnlPS4D/6P31IB O+sleVofy4u1RcizkoIitBLmZBf6J0nTMtlOV7bnK8pqFkn6tpM2wOHVe9DuatEfr/wy OCgYWpJlfFl2nFddRMldFvHaviR6/I+MFbAmex8pmWRItdcdI315dDhCZGLyLN9ca2xR jKdC7fuM7R8Vz9vZAg70yJOO+LWZmHmJ2r+2By9V80DdeWqatgTJn3qeqokFSaHL/Y30 +Rrg== X-Gm-Message-State: APjAAAU7eiKzqClA7ZxEXqmWuKy7MW1SMhfwCB/aZC8dh7Dn5rVco6cv Pqu8HL/1U4Gu4ZiikiWomJQ= X-Google-Smtp-Source: APXvYqzI8FwY/VVtzzKdn+RQ7QMpdkpdxmJubJZKqAG68OLQaXxDr5zJf8uCTqk37FQVkwQcANkHsQ== X-Received: by 2002:a5d:5706:: with SMTP id a6mr23373587wrv.108.1581961612777; Mon, 17 Feb 2020 09:46:52 -0800 (PST) Received: from localhost (userh634.uk.uudial.com. [194.69.103.7]) by smtp.gmail.com with ESMTPSA id a22sm206596wmd.20.2020.02.17.09.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:46:52 -0800 (PST) From: luca.boccassi@gmail.com To: Itsuro Oda Cc: Maxime Coquelin , dpdk stable Date: Mon, 17 Feb 2020 17:45:30 +0000 Message-Id: <20200217174546.25334-38-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200217174546.25334-1-luca.boccassi@gmail.com> References: <20200211112216.3929-190-luca.boccassi@gmail.com> <20200217174546.25334-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/vhost: allocate interface name from heap' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Reviewed-by: Maxime Coquelin --- 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 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@dpdk.org Signed-off-by: Itsuro Oda Reviewed-by: Maxime Coquelin