From: Artemy Kovalyov <artemyko@nvidia.com>
To: <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>, <stable@dpdk.org>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
David Marchand <david.marchand@redhat.com>
Subject: [PATCH 3/5] ipc: fix mp channel closure to prevent message loss
Date: Tue, 12 Dec 2023 06:25:14 +0200 [thread overview]
Message-ID: <20231212042517.164353-4-artemyko@nvidia.com> (raw)
In-Reply-To: <20231212042517.164353-1-artemyko@nvidia.com>
This commit addresses an issue related to the cleanup of the
multiprocess channel. Previously, when closing the channel, there was a
risk of losing trailing messages. This issue was particularly noticeable
when broadcast message from primary to secondary processes was sent
while a secondary process was closing it's mp channel. In this fix, we
delete mp socket file before stopping mp receive thread.
Fixes: e7885281ded1 ("ipc: stop mp control thread on cleanup")
Cc: stable@dpdk.org
Signed-off-by: Artemy Kovalyov <artemyko@nvidia.com>
---
lib/eal/common/eal_common_proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index 728815c..d34fdda 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -593,7 +593,7 @@ enum async_action {
}
static void
-close_socket_fd(int fd)
+remove_socket_fd(int fd)
{
char path[PATH_MAX];
@@ -672,9 +672,9 @@ enum async_action {
if (fd < 0)
return;
+ remove_socket_fd(fd);
pthread_cancel((pthread_t)mp_handle_tid.opaque_id);
rte_thread_join(mp_handle_tid, NULL);
- close_socket_fd(fd);
}
/**
--
1.8.3.1
next prev parent reply other threads:[~2023-12-12 4:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 4:25 [PATCH 0/5] addressing races in concurrent process startup Artemy Kovalyov
2023-12-12 4:25 ` [PATCH 1/5] app/test-pm: add multiprocess test Artemy Kovalyov
2023-12-12 17:09 ` Stephen Hemminger
2023-12-17 3:53 ` [PATCH v2 1/5] app/test-mp: " Artemy Kovalyov
2024-03-06 20:20 ` David Marchand
2024-03-07 6:59 ` [PATCH 0/5] addressing races in concurrent process startup Artemy Kovalyov
2024-03-07 7:01 ` Artemy Kovalyov
2024-03-07 7:01 ` [PATCH v2 1/5] app/test-mp: add multiprocess test Artemy Kovalyov
2024-03-13 16:05 ` Burakov, Anatoly
2024-03-07 7:01 ` [PATCH v2 2/5] eal: fix multiprocess hotplug race Artemy Kovalyov
2024-03-13 16:05 ` Burakov, Anatoly
2024-03-07 7:01 ` [PATCH v2 3/5] ipc: fix mp channel closure to prevent message loss Artemy Kovalyov
2024-03-13 16:06 ` Burakov, Anatoly
2024-03-07 7:01 ` [PATCH v2 4/5] eal: fix first time primary autodetect Artemy Kovalyov
2024-03-13 16:06 ` Burakov, Anatoly
2024-03-07 7:01 ` [PATCH v2 5/5] eal: fix memzone fbarray cleanup Artemy Kovalyov
2024-03-13 16:17 ` Burakov, Anatoly
2023-12-12 4:25 ` [PATCH 2/5] eal: fix multiprocess hotplug race Artemy Kovalyov
2023-12-12 4:25 ` Artemy Kovalyov [this message]
2023-12-12 4:25 ` [PATCH 4/5] eal: fix first time primary autodetect Artemy Kovalyov
2023-12-12 4:25 ` [PATCH 5/5] eal: fix memzone fbarray cleanup Artemy Kovalyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212042517.164353-4-artemyko@nvidia.com \
--to=artemyko@nvidia.com \
--cc=anatoly.burakov@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).