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 CF00E48B69 for ; Fri, 21 Nov 2025 12:23:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C91D4402E6; Fri, 21 Nov 2025 12:23:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CFC6E402E0 for ; Fri, 21 Nov 2025 12:23:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=leQnIglPvySkg6cUPRExkIm2yDBhEN4Ww/HoDNhWgf4=; b=RbX3BXBdMnp1i3S34fGMzZnUBdWCAOhBBglS4rnlm1ErkLZndKL7bNRpd0pB6oKtrvVC29 QR78HcyRqhgUmZjg1ynQzt0XVoS7Rvdq77r/iFqoydiVGG9/jE+D44a3NNQMlgxLtjSNjx OA8Sr/HLH6N2GS5+6qeNLWQ/TYjk9yI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-53-t4ufmziCPRWPpm4OyP2Ngw-1; Fri, 21 Nov 2025 06:23:44 -0500 X-MC-Unique: t4ufmziCPRWPpm4OyP2Ngw-1 X-Mimecast-MFC-AGG-ID: t4ufmziCPRWPpm4OyP2Ngw_1763724223 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 07933195609F; Fri, 21 Nov 2025 11:23:43 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DD9D430044DB; Fri, 21 Nov 2025 11:23:40 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Bruce Richardson , Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>, dpdk stable Subject: patch 'pdump: handle primary process exit' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:20:43 +0000 Message-ID: <20251121112128.485623-59-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FkOuMB3atIDU-lUIGGGMSDtr8vOez9tAnHYxvnYVtDY_1763724223 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/25. 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 This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/21344e6cc36bf127fdbe82f28fea62bdd5439987 Thanks. Kevin --- >From 21344e6cc36bf127fdbe82f28fea62bdd5439987 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 4 Nov 2025 10:07:05 -0800 Subject: [PATCH] pdump: handle primary process exit [ upstream commit cefd5edce236e69496693ea0ecbf3e61434ff348 ] If primary process exits, then it is not possible (or needed) to cleanup resources. Instead just exit after closing the capture file. Bugzilla ID: 1760 Fixes: a99a311ba101 ("app/pdump: exit with primary process") Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application") Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson Acked-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk> --- app/dumpcap/main.c | 4 ++++ app/pdump/main.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index 3d3c0dbc66..7b19c830b5 100644 --- a/app/dumpcap/main.c +++ b/app/dumpcap/main.c @@ -1059,4 +1059,8 @@ int main(int argc, char **argv) pcap_dump_close(out.dumper); + /* If primary has exited, do not try and communicate with it */ + if (!rte_eal_primary_proc_alive(NULL)) + return 0; + cleanup_pdump_resources(); diff --git a/app/pdump/main.c b/app/pdump/main.c index f3ac81cb80..49bac5025e 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -1027,12 +1027,14 @@ main(int argc, char **argv) disable_primary_monitor(); - cleanup_pdump_resources(); + /* dump debug stats */ print_pdump_stats(); - ret = rte_eal_cleanup(); - if (ret) - printf("Error from rte_eal_cleanup(), %d\n", ret); + /* If primary has exited, do not try and communicate with it */ + if (!rte_eal_primary_proc_alive(NULL)) + return 0; - return 0; + cleanup_pdump_resources(); + + return rte_eal_cleanup() ? EXIT_FAILURE : 0; } -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.450058105 +0000 +++ 0059-pdump-handle-primary-process-exit.patch 2025-11-21 11:05:09.536201481 +0000 @@ -1 +1 @@ -From cefd5edce236e69496693ea0ecbf3e61434ff348 Mon Sep 17 00:00:00 2001 +From 21344e6cc36bf127fdbe82f28fea62bdd5439987 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit cefd5edce236e69496693ea0ecbf3e61434ff348 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index e5ba36350b..3621c0ebe3 100644 +index 3d3c0dbc66..7b19c830b5 100644 @@ -27 +28 @@ -@@ -1060,4 +1060,8 @@ int main(int argc, char **argv) +@@ -1059,4 +1059,8 @@ int main(int argc, char **argv) @@ -37 +38 @@ -index 89347d70dc..7cbf1b8c34 100644 +index f3ac81cb80..49bac5025e 100644 @@ -40 +41 @@ -@@ -1028,12 +1028,14 @@ main(int argc, char **argv) +@@ -1027,12 +1027,14 @@ main(int argc, char **argv)