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 A68EA489EF for ; Mon, 27 Oct 2025 17:21:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0C6D4066B; Mon, 27 Oct 2025 17:21:36 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id B08984066B for ; Mon, 27 Oct 2025 17:21:35 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3ee64bc6b85so5055723f8f.3 for ; Mon, 27 Oct 2025 09:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582095; x=1762186895; darn=dpdk.org; 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=DdjWT3G+NZCo1XleOiEUuw4BY9dAq9T/B7QoP+JSaAM=; b=m5mOWMhXj1Tel7W1H88J0CD9MVsMuNMA+zOYFmuAUx5FU4at3O35dAwFnmsk+u7bq2 4nnMMLFFHnP9Utgzlr0iWA+LS7AvaQLsLRZO5oymZ4p1zfoskzMcTna2IEQvuIV6dlRd 56wzA4FUGwxiQMtNC4sE0I0lwg/3DHjnXHxUVR9di/XuuNb31vF76AUDdam2xz9ck1LE 9aA/aKZbyIKUpMDHD7wnQ6tUlA5Wwmzs4bjhjOEPSnNteyOj3PcHDLmCNLK8v1l1raBa XxnyWwpNRr1fFqkdV+6oBqYMqIok/jgq5wYRbp5hixsYnVEp8OH6z5m89Rg9Cf1et6Ww ljsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582095; x=1762186895; 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=DdjWT3G+NZCo1XleOiEUuw4BY9dAq9T/B7QoP+JSaAM=; b=f9QucGayQ8Ri6tMxMw0Dyw/e1rcNrQ89oxp09/2JcWhiAKat68Z3Nzyoe4s5K0DeCL waIDFwccwNid1xPpKmcspzMZbjzVrTI5ZQNShLNbliwUQC3l4PPazauKbH2iPtY/YkeH eGg1rYEdMP2KGF5AA70oIARMFh+9ckeNHiIFfgWABvaTN3r2DqyRE6E++fHDF0qPg0qD ea5ItROdbLPAn6CFi5aTaELGAoSY4Y2ZOcHKiozi4O1qUKiSJ+/Eu5H0Ma/a2hom7TpO 8yBYPgxsUdGTP1HhXKbxuGSrcZl9AFNQwQnfUX1yykLu3COLzN3Q7z1WfabsSkVbQ4wx K61g== X-Forwarded-Encrypted: i=1; AJvYcCUeQNuZpvWiwkBMIqUmSW7lbvGczNj8S7/R9Iu7Gu4vlz5sp86a+hUSLeNdB32nUGiQHbAxlUA=@dpdk.org X-Gm-Message-State: AOJu0Ywvj/vI5Q9IaOTNLYgU+3kd702ijbYzXDCqe+pacBA1vWmnb+j5 8EWKtCMcljn45dhtVDRSTOgzWghKJxHQFH9vGG8eY4EUQlUit8TnrWcFQllYQw== X-Gm-Gg: ASbGncsz0n6m1Vu3leeuDK/vAKW637i7giXmn8sGq5bwQCBSsqM+c8RYjkJKRk5bVcW qsRnaf67K9wJAMPWvo6RPw9B3wLbwlTf9dkUXdAl7jwreh/F/xwAxqd1C123z8Ch4Okfw3u3QoM HeRNdUVXkDW60jqvD8f60FX3AQpiN31NoDItaOBooYAaJZWUyAgwDuXEY1PCKhJxacfripPs6Bh uFELeHggT+V+HLCOOLbuOX4rtYPeMw1JQ6mFwRX0wsUjCT/3E35tJxi4Bu4rcjdtoCGR4LKPTY7 6swRo22GubMT9DpXGMtBImW6bDYpvqRpj37kqWKjT3ckK2qlCLNGev7iAjzYydIcwhNMiFeiBxS pos4kZgs3P4qHn6aL182k5HH7Y3Y5mNcdtfmlB71rGg37sfGBbdIMQeJa0diG/LRRZLYVJ40yyA Puc8VnJw== X-Google-Smtp-Source: AGHT+IEOY2AETRXkvLqwqX2jdXQLy2Vn6ldiY1NE/jSUGyd1hljNMUXrzwQgRF5ikyKg7pn2yacuQA== X-Received: by 2002:a05:6000:2203:b0:428:1475:6a0f with SMTP id ffacd0b85a97d-429a7e7afc4mr293754f8f.54.1761582095200; Mon, 27 Oct 2025 09:21:35 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-429952cbc55sm15777710f8f.10.2025.10.27.09.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:21:34 -0700 (PDT) From: luca.boccassi@gmail.com To: Yang Ming Cc: Anatoly Burakov , dpdk stable Subject: patch 'eal: fix MP socket cleanup' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:19:07 +0000 Message-ID: <20251027162001.3710450-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-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 22.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 10/29/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/039a4ac228e9a844bcc8bf3e078684f04078e3e5 Thanks. Luca Boccassi --- >From 039a4ac228e9a844bcc8bf3e078684f04078e3e5 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 aa9f85c647..3da8dec76a 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -906,8 +906,8 @@ rte_eal_cleanup(void) struct internal_config *internal_conf = 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(); eal_trace_fini(); diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 9f9a03bcf7..de30e521bd 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1378,11 +1378,11 @@ rte_eal_cleanup(void) rte_memseg_walk(mark_freeable, NULL); 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(); eal_trace_fini(); -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:35.944878334 +0000 +++ 0029-eal-fix-MP-socket-cleanup.patch 2025-10-27 15:54:34.803949751 +0000 @@ -1 +1 @@ -From 4bc53f8f0d64ceba6c4077aa31229f1e38e0d30f Mon Sep 17 00:00:00 2001 +From 039a4ac228e9a844bcc8bf3e078684f04078e3e5 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 aa9f85c647..3da8dec76a 100644 @@ -49 +50 @@ -@@ -909,8 +909,8 @@ rte_eal_cleanup(void) +@@ -906,8 +906,8 @@ rte_eal_cleanup(void) @@ -60 +61 @@ -index 3a0c9c9db6..caf22033d0 100644 +index 9f9a03bcf7..de30e521bd 100644 @@ -63 +64 @@ -@@ -1333,11 +1333,11 @@ rte_eal_cleanup(void) +@@ -1378,11 +1378,11 @@ rte_eal_cleanup(void)