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 B4BCF48A44 for ; Fri, 31 Oct 2025 15:37:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACEC940150; Fri, 31 Oct 2025 15:37:29 +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 1018440678 for ; Fri, 31 Oct 2025 15:37:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921447; 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=fXfGBmlCqHcd0Snvhy4SbUQNmPfK4wvPPZLLqEUkqnQ=; b=dXJpodR3IFUX9M3Se/dX5DyOpQ6fpPDo+MF3vTDmsZTSu8bemu0OTzR7TIGu98QlYrMIU9 jkVg8wZad7vgamcgGfV5RdtYTVHM/X/xC1zEENcMFKfsqFb1X/+uTD2/SpkGEIul3K2cuh enZx4LAFG6FtIJywp4D6rFZIMb8fTaI= 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-529-WisUWZzCPs2NDAs1RmKjJg-1; Fri, 31 Oct 2025 10:37:23 -0400 X-MC-Unique: WisUWZzCPs2NDAs1RmKjJg-1 X-Mimecast-MFC-AGG-ID: WisUWZzCPs2NDAs1RmKjJg_1761921443 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 E7A3819560A3; Fri, 31 Oct 2025 14:37:22 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 51DFD18004D4; Fri, 31 Oct 2025 14:37:21 +0000 (UTC) From: Kevin Traynor To: Yang Ming Cc: Anatoly Burakov , dpdk stable Subject: patch 'eal: fix MP socket cleanup' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:32:55 +0000 Message-ID: <20251031143421.324432-53-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fFMH_DzDoc4J6Bv0uRqLdn1Kytg6UvqS4qerzbUoOJ8_1761921443 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/05/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/9d55450161260d6c3a707585b9448a9c4638d678 Thanks. Kevin --- >From 9d55450161260d6c3a707585b9448a9c4638d678 Mon Sep 17 00:00:00 2001 From: Yang Ming Date: Sat, 19 Jul 2025 23:32:25 +0800 Subject: [PATCH] eal: fix MP socket cleanup [ upstream commit 4bc53f8f0d64ceba6c4077aa31229f1e38e0d30f ] The secondary process should not close socket file for MP channel before performing MP request synchronization. This prevents error logs when the secondary process exits without any operation on the crypto device while the primary process starts the device. Case situation: eal_bus_cleanup has been added in rte_eal_cleanup. But for the secondary process, rte_eal_cleanup firstly performs rte_mp_channel_cleanup, which closes socket file for the MP channel, making mp_fd invalid. Subsequently, eal_bus_cleanup triggers vdev_cleanup, which calls mp_request_sync to send a message via the MP channel. Since mp_fd is invalid, error logs occur. Error logs occur as below when the secondary process exit: EAL: failed to send to (/tmp/dpdk/l2hicu/mp_socket) due to Bad file descriptor EAL: Fail to send request /tmp/dpdk/l2hicu/mp_socket: ipsec_mb_mp_msg USER1: Create MR request to primary process failed. Function call trace: 1. rte_eal_cleanup->rte_mp_channel_cleanup->close_socket_fd 2. rte_eal_cleanup->eal_bus_cleanup->vdev_cleanup-> rte_vdev_driver->ipsec_mb_remove->ipsec_mb_qp_release-> ipsec_mb_secondary_qp_op->rte_mp_request_sync->mp_request_sync-> send_msg->sendmsg(mp_fd, &msgh, 0); Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown") Signed-off-by: Yang Ming Acked-by: Anatoly Burakov --- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index 92d0b6be62..7aec41946c 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -904,6 +904,6 @@ rte_eal_cleanup(void) eal_get_internal_configuration(); rte_service_finalize(); - rte_mp_channel_cleanup(); eal_bus_cleanup(); + rte_mp_channel_cleanup(); rte_eal_alarm_cleanup(); rte_trace_save(); diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index a0111b50b9..a1e95c5c88 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1322,9 +1322,9 @@ rte_eal_cleanup(void) rte_service_finalize(); + eal_bus_cleanup(); #ifdef VFIO_PRESENT vfio_mp_sync_cleanup(); #endif rte_mp_channel_cleanup(); - eal_bus_cleanup(); rte_eal_alarm_cleanup(); rte_trace_save(); -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-31 13:53:53.919475744 +0000 +++ 0053-eal-fix-MP-socket-cleanup.patch 2025-10-31 13:53:52.163523765 +0000 @@ -1 +1 @@ -From 4bc53f8f0d64ceba6c4077aa31229f1e38e0d30f Mon Sep 17 00:00:00 2001 +From 9d55450161260d6c3a707585b9448a9c4638d678 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4bc53f8f0d64ceba6c4077aa31229f1e38e0d30f ] + @@ -36 +37,0 @@ -Cc: stable@dpdk.org @@ -46 +47 @@ -index 0f957919d3..1804b4cfd2 100644 +index 92d0b6be62..7aec41946c 100644 @@ -49 +50 @@ -@@ -910,6 +910,6 @@ rte_eal_cleanup(void) +@@ -904,6 +904,6 @@ rte_eal_cleanup(void) @@ -58 +59 @@ -index 3a0c9c9db6..caf22033d0 100644 +index a0111b50b9..a1e95c5c88 100644 @@ -61 +62 @@ -@@ -1334,9 +1334,9 @@ rte_eal_cleanup(void) +@@ -1322,9 +1322,9 @@ rte_eal_cleanup(void)