DPDK patches and discussions
 help / color / mirror / Atom feed
From: Renata Saiakhova <Renata.Saiakhova@ekinops.com>
Cc: dev@dpdk.org, Renata Saiakhova <Renata.Saiakhova@ekinops.com>
Subject: [dpdk-dev] [PATCH v2 0/1] pci_vfio_disable_notifier(): avoid race with unregister
Date: Mon, 17 Aug 2020 16:08:26 +0200	[thread overview]
Message-ID: <20200817140828.9769-1-Renata.Saiakhova@ekinops.com> (raw)

For pci_vfio, while removing the device by rte_dev_remove(),
pci_vfio_disable_notifier() will call rte_intr_callback_unregister(),
which may return -EAGAIN, if an interrupt source (kernel) has some active
callbacks right now. As a result, the callback (req notifier) can be never unregistered,
and the corresponding descriptor (vfio_req_intr_handle.fd) can be never closed.
The kernel will continuously try to notify the user space using req notifier, but as
the device is already removed, in this case it even cannot find a bus for that
device, the log is full of messages "EAL: Cannot find bus for device (XX:XX.X)"

v1->v2: Use only for pci-vfio in pci_vfio_disable_notifier()

Renata Saiakhova (1):
  librte_eal: rte_intr_callback_unregister_sync() - wrapper around
    rte_intr_callback_unregister().

 drivers/bus/pci/linux/pci_vfio.c        |  2 +-
 lib/librte_eal/freebsd/eal_interrupts.c | 12 ++++++++++++
 lib/librte_eal/include/rte_interrupts.h | 25 +++++++++++++++++++++++++
 lib/librte_eal/linux/eal_interrupts.c   | 12 ++++++++++++
 lib/librte_eal/rte_eal_version.map      |  1 +
 5 files changed, 51 insertions(+), 1 deletion(-)

-- 
2.17.2


             reply	other threads:[~2020-08-17 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 14:08 Renata Saiakhova [this message]
2020-08-17 14:08 ` [dpdk-dev] [PATCH v2 1/1] librte_eal: rte_intr_callback_unregister_sync() - wrapper around rte_intr_callback_unregister() Renata Saiakhova
2020-10-08  7:47   ` David Marchand
2020-10-20 13:40     ` David Marchand
2020-10-28 20:36   ` [dpdk-dev] [EXT] " Harman Kalra
2020-11-30 17:20     ` Renata Saiakhova
2021-02-11 10:48   ` [dpdk-dev] " 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=20200817140828.9769-1-Renata.Saiakhova@ekinops.com \
    --to=renata.saiakhova@ekinops.com \
    --cc=dev@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).