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 977CBA055A for ; Thu, 27 Feb 2020 10:34:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E3AC1F1C; Thu, 27 Feb 2020 10:34:38 +0100 (CET) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 8097E1BFE1 for ; Thu, 27 Feb 2020 10:34:36 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id j16so868118wrt.3 for ; Thu, 27 Feb 2020 01:34:36 -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=25neEq/UOEhijr15vZtYWTtSHEqoQDtsYFrJ2qMajDk=; b=Y9yem/B+n3i7a2+yIbbCkiOIImzC6yM6IZO/wPv/QI+GQkfFIw4nI1BboTUZ+RhJ4H QXyZ3lkXPahOXPvYxbHZTP6cTbnEAIVcyQVVgBVA0wxI9Z77TOaOxaVx6WxghSRcnEw1 onOtIjKvuOfjFQ/aj030lWuYybvq3hib8pjKFCpTQRWZUtC92smdufsKAsm9G0SBaSAn b2onb0VDX/6gEEMqWHIZ02sZSFgczk26FxzY44/vGHrJ9lm3GzeWnL8x0JqlbaNa5FxL pzjNdojhUnrFvLyf37mp4YegH9mCocMHabVXZtbC66+cX+9Bg0noeHekfjmy0P+odFOO BDeQ== 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=25neEq/UOEhijr15vZtYWTtSHEqoQDtsYFrJ2qMajDk=; b=shWCKxcqOEy7nnQwCzxghU3i3EddSLpe7E9DQ1poWb9tT0dOg28FrqRiatKpOs37Yw Hj1wc8g0TkvUCkd8zh4pbcDA28L1rOqp4Q5/ncaOXUFpbrD9Gqz8pMcbn7EpdC/pJWh0 R2iODXJqg7haHWhyi86IAmf8q3T3JIsbrw+10vmXc3N+0yaJH/ffqWDTje5KOOw2lUL9 HS2rjZAO6div0ClZkSF0rnxhzQDhMYSHFOoAsEMlXQYKm6U/wNmOLDOXDNwAIJR7NXU6 9VNvOCSP4Aq/fqOQ69XKlLMKU+XNHccdZJuYm2Vg5ba+1v8VzHzylogVi1dKQ7OG3yCD C2tw== X-Gm-Message-State: APjAAAVdIUD96s+FjUe4vi58xkIqf0bKdoTHiXRpHb8SSOAfqaxPeIGn 9rE9WWgCUiwRoxrnjPRY+Oh/+St+Ps0= X-Google-Smtp-Source: APXvYqwL+iLtR8c2WMAtFX6Iqf5vbUv7FTHRQA6LfyQyy7v9O8DxW3IvDNZ9Wk59DXngL7Rdck1LVQ== X-Received: by 2002:a5d:4c41:: with SMTP id n1mr3628234wrt.183.1582796076201; Thu, 27 Feb 2020 01:34:36 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h10sm7009938wml.18.2020.02.27.01.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 01:34:35 -0800 (PST) From: luca.boccassi@gmail.com To: Maxime Coquelin Cc: Yinan Wang , David Marchand , Tiwei Bie , dpdk stable Date: Thu, 27 Feb 2020 09:33:33 +0000 Message-Id: <20200227093402.17690-13-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227093402.17690-1-luca.boccassi@gmail.com> References: <20200217174546.25334-54-luca.boccassi@gmail.com> <20200227093402.17690-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/vhost: prevent multiple setups on reconfiguration' 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/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 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 Signed-off-by: Maxime Coquelin Tested-by: Yinan Wang Reviewed-by: David Marchand Reviewed-by: Tiwei Bie --- 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 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@dpdk.org Reported-by: Yinan Wang Signed-off-by: Maxime Coquelin @@ -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;