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 98C2FA0C41 for ; Tue, 30 Nov 2021 17:41:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8718D410F7; Tue, 30 Nov 2021 17:41:26 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id A2F5C410F7 for ; Tue, 30 Nov 2021 17:41:25 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 78D4D3F044 for ; Tue, 30 Nov 2021 16:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290485; bh=Eg0NCrvdU5xo2xe7QWcR8hj10p67vJ5wpT+clqByGyQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U91NXq6oHRxmRdFvx8F3472XyAUlq8QJUo6d/RY7NNUVUvF5UgEum8wR4wTqVARD6 jI1CljEOppU93jlawKz2UOkypLYUQA0uZi1j/lnBiyAwY53e/6iQTrdMCIk9Lxu7z1 kpglozlsEdkLFRAFniUBhmpe9NfVBAPHxkP1WjTMVBvwUaUouQTcQTx4sqvQAYM9W/ tXfsU70/7EMxr4DimooTNVr/ZYy0vgB5WInuJ2mb2T3m3ooookPUJ0B6Eo2BiQRAEQ bP8VXOuO2R5lVBPwivfYOO0NxWn5RHmaMsqnMFVakJtRVrePon5wUP4KV0g5HIV7Mm jzqcDHz7bCreg== Received: by mail-ed1-f69.google.com with SMTP id k7-20020aa7c387000000b003e7ed87fb31so17582636edq.3 for ; Tue, 30 Nov 2021 08:41:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Eg0NCrvdU5xo2xe7QWcR8hj10p67vJ5wpT+clqByGyQ=; b=LdCPNX+NLeAd/9vJFGjRZqn8GzFTmuT9v7Kwe08iBNMAjgb1vuHKgbHfhwAHaGjj5K ZJ7FC1mCVUaOj5U2sGB850pFlrjzso/qr50k0P9FeoCMxe3D22ccch3YRDgvFA6/UBnD A4NbTd24TianxTXfQjAci08db2tGGZiC+xN3PBwTr/H+7WGFHk3nkvm20O9S11nfAlDJ aVWcN8wKfxEB7bI7YJ08wW9RNqz9XIeye4Tut8czJ+qMKQ7ZThpMtq8E7bMCJ9Z341KC NQ1ATo9Oi23K+03eWVnS0rvVRkZ1VYju+X3DZm35bCzwzMPgwHGnON52XCb2UKv1Gjn/ aCMQ== X-Gm-Message-State: AOAM532+IXxaknrz6P5ysH+k0b1gLy3y3bQ2osaDHudMfLdZvnnaF1cR h056ohJM/mVBKyqmag7EtVeHfZ5makLa5cr5FPZFeR9RWOLWssP4kBW4jm45ygEwomA2FehyxZT qDOy+g2FP2rJVS5wItYTt2Fem X-Received: by 2002:aa7:c915:: with SMTP id b21mr49921edt.195.1638290485162; Tue, 30 Nov 2021 08:41:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/SqcWTIW3ly4hwljICCvBxLibu1U9eWk1kUkL0XL3S4N+aNfWq6ghE3tAzQBQl7FUBKOjmg== X-Received: by 2002:aa7:c915:: with SMTP id b21mr49900edt.195.1638290484977; Tue, 30 Nov 2021 08:41:24 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id k21sm11317473edo.87.2021.11.30.08.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:41:24 -0800 (PST) From: christian.ehrhardt@canonical.com To: Honnappa Nagarahalli Cc: Ruifeng Wang , Feifei Wang , dpdk stable Subject: patch 'eal: reset lcore task callback and argument' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:05 +0100 Message-Id: <20211130163605.2460997-101-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/7cc60830205def25283b1be27ae5ab0f7dc6a8e6 Thanks. Christian Ehrhardt --- >From 7cc60830205def25283b1be27ae5ab0f7dc6a8e6 Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Sun, 24 Oct 2021 23:52:34 -0500 Subject: [PATCH] eal: reset lcore task callback and argument [ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ] In the rte_eal_remote_launch function, the lcore function pointer is checked for NULL. However, the pointer is never reset to NULL. Reset the lcore function pointer and argument after the worker has completed executing the lcore function. Fixes: af75078fece3 ("first public release") Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Reviewed-by: Feifei Wang --- lib/librte_eal/freebsd/eal/eal_thread.c | 2 ++ lib/librte_eal/linux/eal/eal_thread.c | 2 ++ lib/librte_eal/windows/eal/eal_thread.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c index 309b587266..76992e2164 100644 --- a/lib/librte_eal/freebsd/eal/eal_thread.c +++ b/lib/librte_eal/freebsd/eal/eal_thread.c @@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); lcore_config[lcore_id].state = FINISHED; } diff --git a/lib/librte_eal/linux/eal/eal_thread.c b/lib/librte_eal/linux/eal/eal_thread.c index 379773b683..4f7d97a0d2 100644 --- a/lib/librte_eal/linux/eal/eal_thread.c +++ b/lib/librte_eal/linux/eal/eal_thread.c @@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); /* when a service core returns, it should go directly to WAIT diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c index af1e7fe2ea..90797edb6d 100644 --- a/lib/librte_eal/windows/eal/eal_thread.c +++ b/lib/librte_eal/windows/eal/eal_thread.c @@ -124,6 +124,8 @@ eal_thread_loop(void *arg __rte_unused) fct_arg = lcore_config[lcore_id].arg; ret = lcore_config[lcore_id].f(fct_arg); lcore_config[lcore_id].ret = ret; + lcore_config[lcore_id].f = NULL; + lcore_config[lcore_id].arg = NULL; rte_wmb(); /* when a service core returns, it should go directly to WAIT -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:11.706181823 +0100 +++ 0101-eal-reset-lcore-task-callback-and-argument.patch 2021-11-30 16:50:05.902874352 +0100 @@ -1 +1 @@ -From 33969e9c61385fc397f1934324e231ece9750404 Mon Sep 17 00:00:00 2001 +From 7cc60830205def25283b1be27ae5ab0f7dc6a8e6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 33969e9c61385fc397f1934324e231ece9750404 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18,3 +19,3 @@ - lib/eal/freebsd/eal_thread.c | 2 ++ - lib/eal/linux/eal_thread.c | 2 ++ - lib/eal/windows/eal_thread.c | 2 ++ + lib/librte_eal/freebsd/eal/eal_thread.c | 2 ++ + lib/librte_eal/linux/eal/eal_thread.c | 2 ++ + lib/librte_eal/windows/eal/eal_thread.c | 2 ++ @@ -23,5 +24,5 @@ -diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c -index 1dce9b04f2..bbc3a8e985 100644 ---- a/lib/eal/freebsd/eal_thread.c -+++ b/lib/eal/freebsd/eal_thread.c -@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg) +diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c +index 309b587266..76992e2164 100644 +--- a/lib/librte_eal/freebsd/eal/eal_thread.c ++++ b/lib/librte_eal/freebsd/eal/eal_thread.c +@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg) @@ -36,5 +37,5 @@ -diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c -index 83c2034b93..8f3c0dafd6 100644 ---- a/lib/eal/linux/eal_thread.c -+++ b/lib/eal/linux/eal_thread.c -@@ -126,6 +126,8 @@ eal_thread_loop(__rte_unused void *arg) +diff --git a/lib/librte_eal/linux/eal/eal_thread.c b/lib/librte_eal/linux/eal/eal_thread.c +index 379773b683..4f7d97a0d2 100644 +--- a/lib/librte_eal/linux/eal/eal_thread.c ++++ b/lib/librte_eal/linux/eal/eal_thread.c +@@ -152,6 +152,8 @@ eal_thread_loop(__attribute__((unused)) void *arg) @@ -49,5 +50,5 @@ -diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c -index 9c3f6d69fd..df1df5d02c 100644 ---- a/lib/eal/windows/eal_thread.c -+++ b/lib/eal/windows/eal_thread.c -@@ -110,6 +110,8 @@ eal_thread_loop(void *arg __rte_unused) +diff --git a/lib/librte_eal/windows/eal/eal_thread.c b/lib/librte_eal/windows/eal/eal_thread.c +index af1e7fe2ea..90797edb6d 100644 +--- a/lib/librte_eal/windows/eal/eal_thread.c ++++ b/lib/librte_eal/windows/eal/eal_thread.c +@@ -124,6 +124,8 @@ eal_thread_loop(void *arg __rte_unused)