* [dpdk-stable] [PATCH] vfio: don't unregister callback in secondaries
@ 2019-01-10 16:30 Anatoly Burakov
2019-01-10 16:33 ` [dpdk-stable] [PATCH v2] " Anatoly Burakov
0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Burakov @ 2019-01-10 16:30 UTC (permalink / raw)
To: dev; +Cc: stable
Callbacks are only registered in the primary, so do not attempt to
unregister callbacks in secondary processes.
Fixes: 43e463137154 ("vfio: support memory event callbacks")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_vfio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 0516b1597..afc917ab3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -857,7 +857,8 @@ rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
/* if there are no active device groups, unregister the callback to
* avoid spurious attempts to map/unmap memory from VFIO.
*/
- if (vfio_cfg == default_vfio_cfg && vfio_cfg->vfio_active_groups == 0)
+ if (vfio_cfg == default_vfio_cfg && vfio_cfg->vfio_active_groups == 0 &&
+ rte_eal_process_type() != RTE_PROC_PRIMARY)
rte_mem_event_callback_unregister(VFIO_MEM_EVENT_CLB_NAME,
NULL);
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH v2] vfio: don't unregister callback in secondaries
2019-01-10 16:30 [dpdk-stable] [PATCH] vfio: don't unregister callback in secondaries Anatoly Burakov
@ 2019-01-10 16:33 ` Anatoly Burakov
2019-01-14 14:33 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Burakov @ 2019-01-10 16:33 UTC (permalink / raw)
To: dev; +Cc: stable
Callbacks are only registered in the primary, so do not attempt to
unregister callbacks in secondary processes.
Fixes: 43e463137154 ("vfio: support memory event callbacks")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v2:
- Skip secondaries instead of primaries
lib/librte_eal/linuxapp/eal/eal_vfio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 0516b1597..72cc65151 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -857,7 +857,8 @@ rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
/* if there are no active device groups, unregister the callback to
* avoid spurious attempts to map/unmap memory from VFIO.
*/
- if (vfio_cfg == default_vfio_cfg && vfio_cfg->vfio_active_groups == 0)
+ if (vfio_cfg == default_vfio_cfg && vfio_cfg->vfio_active_groups == 0 &&
+ rte_eal_process_type() != RTE_PROC_SECONDARY)
rte_mem_event_callback_unregister(VFIO_MEM_EVENT_CLB_NAME,
NULL);
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH v2] vfio: don't unregister callback in secondaries
2019-01-10 16:33 ` [dpdk-stable] [PATCH v2] " Anatoly Burakov
@ 2019-01-14 14:33 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-01-14 14:33 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: stable, dev
10/01/2019 17:33, Anatoly Burakov:
> Callbacks are only registered in the primary, so do not attempt to
> unregister callbacks in secondary processes.
>
> Fixes: 43e463137154 ("vfio: support memory event callbacks")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-14 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 16:30 [dpdk-stable] [PATCH] vfio: don't unregister callback in secondaries Anatoly Burakov
2019-01-10 16:33 ` [dpdk-stable] [PATCH v2] " Anatoly Burakov
2019-01-14 14:33 ` Thomas Monjalon
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).