From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
anatoly.burakov@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 08/14] eal: vfio: cleanup the mp sync handle
Date: Fri, 3 Jan 2020 17:33:35 -0800 [thread overview]
Message-ID: <20200104013341.19809-9-stephen@networkplumber.org> (raw)
In-Reply-To: <20200104013341.19809-1-stephen@networkplumber.org>
When rte_eal_cleanup is called the rte_mp_action for VFIO
should be freed.
Fixes: edf73dd33072 ("ipc: handle unsupported IPC in action register")
Cc: anatoly.burakov@intel.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/linux/eal/eal.c | 3 +++
lib/librte_eal/linux/eal/eal_vfio.h | 1 +
lib/librte_eal/linux/eal/eal_vfio_mp_sync.c | 8 ++++++++
3 files changed, 12 insertions(+)
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index eb95f4f0c317..9ad81378f23c 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -1338,6 +1338,9 @@ rte_eal_cleanup(void)
}
rte_service_finalize();
+#ifdef VFIO_PRESENT
+ vfio_mp_sync_cleanup();
+#endif
rte_eal_intr_cleanup();
rte_eal_alarm_cleanup();
rte_mp_channel_cleanup();
diff --git a/lib/librte_eal/linux/eal/eal_vfio.h b/lib/librte_eal/linux/eal/eal_vfio.h
index cb2d35fb1206..bf7408a897a7 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.h
+++ b/lib/librte_eal/linux/eal/eal_vfio.h
@@ -132,6 +132,7 @@ int
vfio_has_supported_extensions(int vfio_container_fd);
int vfio_mp_sync_setup(void);
+void vfio_mp_sync_cleanup(void);
#define EAL_VFIO_MP "eal_vfio_mp_sync"
diff --git a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
index 5f2a5fc1d94e..b8ae9c65892e 100644
--- a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
@@ -120,4 +120,12 @@ vfio_mp_sync_setup(void)
return 0;
}
+void
+vfio_mp_sync_cleanup(void)
+{
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
+ rte_mp_action_unregister(EAL_VFIO_MP);
+}
#endif
--
2.20.1
next prev parent reply other threads:[~2020-01-04 1:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200104013341.19809-1-stephen@networkplumber.org>
2020-01-04 1:33 ` [dpdk-stable] [PATCH 06/14] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-27 15:37 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
2020-01-04 1:33 ` Stephen Hemminger [this message]
2020-04-27 12:12 ` [dpdk-stable] [PATCH 08/14] eal: vfio: cleanup the mp sync handle Burakov, Anatoly
2020-01-04 1:33 ` [dpdk-stable] [PATCH 10/14] tap: close netlink socket on device close Stephen Hemminger
2020-04-25 15:52 ` [dpdk-stable] [dpdk-dev] " David Marchand
[not found] ` <20200428231415.17985-1-stephen@networkplumber.org>
2020-04-28 23:14 ` [dpdk-stable] [PATCH v2 5/8] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-28 23:14 ` [dpdk-stable] [PATCH v2 6/8] eal: vfio: cleanup the mp sync handle Stephen Hemminger
[not found] ` <20200428235827.15383-1-stephen@networkplumber.org>
2020-04-28 23:58 ` [dpdk-stable] [PATCH v3 5/8] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-28 23:58 ` [dpdk-stable] [PATCH v3 6/8] eal: vfio: cleanup the mp sync handle Stephen Hemminger
[not found] ` <20211113002824.338343-1-stephen@networkplumber.org>
2021-11-13 0:28 ` [PATCH v4 3/5] " Stephen Hemminger
[not found] ` <20211113033209.341027-1-stephen@networkplumber.org>
2021-11-13 3:32 ` [PATCH v5 " Stephen Hemminger
[not found] ` <20211113172257.6543-1-stephen@networkplumber.org>
2021-11-13 17:22 ` [PATCH v6 " Stephen Hemminger
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=20200104013341.19809-9-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).