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>,
David Marchand <david.marchand@redhat.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [PATCH v2 3/5] ipc: fix mp channel closure to prevent message loss
Date: Thu, 7 Mar 2024 07:01:11 +0000 [thread overview]
Message-ID: <20240307070113.29580-4-artemyko@nvidia.com> (raw)
In-Reply-To: <20240307070113.29580-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:[~2024-03-07 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231212042517.164353-2-artemyko@nvidia.com>
[not found] ` <20240307070113.29580-1-artemyko@nvidia.com>
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 ` Artemy Kovalyov [this message]
2024-03-13 16:06 ` [PATCH v2 3/5] ipc: fix mp channel closure to prevent message loss 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
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=20240307070113.29580-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).