From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FB8042CBC for ; Thu, 15 Jun 2023 03:33:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A5C442D33; Thu, 15 Jun 2023 03:33:54 +0200 (CEST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 6264140DDA for ; Thu, 15 Jun 2023 03:33:53 +0200 (CEST) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-30fc42fcbc7so3157572f8f.1 for ; Wed, 14 Jun 2023 18:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686792833; x=1689384833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u3rm+8wbwgqHBFjyG0qJbPYafS8us7pOR4OgeMBV+nI=; b=jhrg4TzHDf9AGgDWGZrQAlCFB3YQptNaWbFPKokemZgFiRu6cekpdJwfgEGMMRZbld m9yGYknFQL2OflyKToyNTJBurI0bjlixZ99lJGsy6OpnyY5flf4e7iaZNsfZfhvpmKxa soLXqJqJ8Tu9pbM4/83K3lGDaU9H7Gj9dNMA0StxGIdJNaYqcXb35Xac+rblPrV4I5B1 KXhwkKgrEy6IQNTs8AAMk45biINi6nQpjkdlq06remARjc3QDDg3KSEH0xnb53zVRGW+ 3H2UU2hicRMy4CE1qmz9/0qCXx24WxG+cTUHqY2jCapzXaccnLjp6o3lnTYj6rkvj5La JuSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686792833; x=1689384833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u3rm+8wbwgqHBFjyG0qJbPYafS8us7pOR4OgeMBV+nI=; b=N58DbLeY9QwtLrM0bp+G0jQskuPr9th5sxZo7UwMyZBrl2FF91t6h77KXKozOdMCKC Vk1k5SqVAJCgbj5A+a19i9HMNe62OgJ8g2ohYbPHqpBJClCIcXxbMxMX6wcFzG1jkha+ ouqoksW48U2etFAdXzxFMvC6yGYe5yupDm7781oYrP/cyQjjloR6VhDcjQk6+J8oe/oU pm1lPeU+BwYbBX/iO0N2HEKmZzMvgH+ltQS34PvuMrfmQP5W8xSaevbXotN5g3zQS5pU WTIXfGddiAGg8qQ2IKoM736AuchnxBxYzH/gBLTM9eH+jNI0YfThXaRJcNBCrLCEgsgW tXXg== X-Gm-Message-State: AC+VfDwGudBmhdhwPz1RptlEMQ9VakN57+/lIHGp1tIZxTzNULcJbme/ PB3cWuJDvQOcSwQ9qQkxEkw= X-Google-Smtp-Source: ACHHUZ52Xi1pCEqVe34RHeE+xAsM7n8AKSXXGkF1FJwelYiFSe00w1vQDwLuBb7O3aJS33uWtraukQ== X-Received: by 2002:adf:e110:0:b0:309:3bc3:7d25 with SMTP id t16-20020adfe110000000b003093bc37d25mr9242520wrz.62.1686792833076; Wed, 14 Jun 2023 18:33:53 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id z6-20020a5d4d06000000b0030fb98484f6sm12618468wrt.114.2023.06.14.18.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 18:33:52 -0700 (PDT) From: luca.boccassi@gmail.com To: Zhihong Wang Cc: Anatoly Burakov , dpdk stable Subject: patch 'eal/linux: fix secondary process crash for mp hotplug' has been queued to stable release 20.11.9 Date: Thu, 15 Jun 2023 02:32:13 +0100 Message-Id: <20230615013258.1439718-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230615013258.1439718-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/17/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/39aa5011a932fb0049c015ea447269af695246af Thanks. Luca Boccassi --- >From 39aa5011a932fb0049c015ea447269af695246af Mon Sep 17 00:00:00 2001 From: Zhihong Wang Date: Thu, 8 Jun 2023 15:25:53 +0800 Subject: [PATCH] eal/linux: fix secondary process crash for mp hotplug requests [ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ] Secondary would crash if it tries to handle mp requests before memory init, since globals such as eth_dev_shared_data_lock are not accessible to it at this moment. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Signed-off-by: Zhihong Wang Acked-by: Anatoly Burakov --- lib/librte_eal/linux/eal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c index 04942854a3..30dbdda38e 100644 --- a/lib/librte_eal/linux/eal.c +++ b/lib/librte_eal/linux/eal.c @@ -1058,12 +1058,6 @@ rte_eal_init(int argc, char **argv) } } - /* register multi-process action callbacks for hotplug */ - if (eal_mp_dev_hotplug_init() < 0) { - rte_eal_init_alert("failed to register mp callback for hotplug"); - return -1; - } - if (rte_bus_scan()) { rte_eal_init_alert("Cannot scan the buses for devices"); rte_errno = ENODEV; @@ -1202,6 +1196,12 @@ rte_eal_init(int argc, char **argv) return -1; } + /* register multi-process action callbacks for hotplug after memory init */ + if (eal_mp_dev_hotplug_init() < 0) { + rte_eal_init_alert("failed to register mp callback for hotplug"); + return -1; + } + if (rte_eal_tailqs_init() < 0) { rte_eal_init_alert("Cannot init tail queues for objects"); rte_errno = EFAULT; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-15 01:56:35.711215787 +0100 +++ 0018-eal-linux-fix-secondary-process-crash-for-mp-hotplug.patch 2023-06-15 01:56:34.535540604 +0100 @@ -1 +1 @@ -From 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 Mon Sep 17 00:00:00 2001 +From 39aa5011a932fb0049c015ea447269af695246af Mon Sep 17 00:00:00 2001 @@ -6,0 +7,2 @@ +[ upstream commit 66f7ee3f7ab1a7d0295464ab236d4ada08eedee3 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/eal/linux/eal.c | 12 ++++++------ + lib/librte_eal/linux/eal.c | 12 ++++++------ @@ -20,4 +21,4 @@ -diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c -index 90e05fe4de..99b0a59706 100644 ---- a/lib/eal/linux/eal.c -+++ b/lib/eal/linux/eal.c +diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c +index 04942854a3..30dbdda38e 100644 +--- a/lib/librte_eal/linux/eal.c ++++ b/lib/librte_eal/linux/eal.c @@ -37 +38 @@ -@@ -1221,6 +1215,12 @@ rte_eal_init(int argc, char **argv) +@@ -1202,6 +1196,12 @@ rte_eal_init(int argc, char **argv)