DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 370] Cannot hotplug VFIO devices if VFIO driver was not loaded at init
Date: Fri, 22 Nov 2019 12:40:11 +0000	[thread overview]
Message-ID: <bug-370-3@http.bugs.dpdk.org/> (raw)

https://bugs.dpdk.org/show_bug.cgi?id=370

            Bug ID: 370
           Summary: Cannot hotplug VFIO devices if VFIO driver was not
                    loaded at init
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: anatoly.burakov@intel.com
  Target Milestone: ---

Currently, VFIO device initialization depends upon checking if VFIO is enabled.
That code looks like this:

> int
> rte_vfio_is_enabled(const char *modname)
> {
>     const int mod_available = rte_eal_check_module(modname) > 0;
>     return default_vfio_cfg->vfio_enabled && mod_available;
> }

The `default_vfio_cfg->vfio_enabled` is set at initialization time with
`rte_vfio_enable` function, and is never rechecked afterwards. This makes it so
that if `vfio` driver was not loaded at EAL initialization time, any subsequent
VFIO device initialization will fail.

To fix that, we would have to re-check the existence of a `vfio` driver every
time, however the current API gets in the way, because even though it stores
global state, it is implemented in a way that looks like it is supposed to be
generic and support multiple driver names (and is never used that way - the
only time this API is used is in the EAL initialization when checking for a
specific `vfio` driver - i think it's a safe assumption to make that whatever
implementation of VFIO is in use, it will depend upon the `vfio` kernel
module).

So, current API will need to be changed (it makes no sense anyway) before this
bug can be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2019-11-22 12:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-370-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --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).