From: Stephen Hemminger <stephen@networkplumber.org>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] vfio: don't silently drop VFIO support
Date: Wed, 22 Apr 2015 12:01:33 -0700 [thread overview]
Message-ID: <20150422120133.44b27408@urahara> (raw)
In-Reply-To: <C6ECDF3AB251BE4894318F4E4512369780C908FF@IRSMSX109.ger.corp.intel.com>
On Wed, 22 Apr 2015 08:59:51 +0000
"Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:
> Hi Stephen,
>
> > > Hi Stephen,
> > >
> > > > The VFIO_PRESENT #define was a landmine and we hit it.
> > > > The DPDK has a config system and it should be used rather than
> > > > silently dropping a feature during build only to have it fail at run time.
> > > >
> > > > If VFIO is configured, and the kernel headers are not present the
> > > > build should fail. Rather than leaving developers puzzling why the
> > > > build system (with old kernel headers) produced non functioning DPDK
> > > > and their system (with new kernel headers) produced correctly working
> > DPDK.
> > > >
> > > > As a matter of policy, really no code should be looking at
> > > > <linux/version.h> except for kernel drivers with compat files.
> > >
> > > In theory, I agree with you. In practice however, this change will
> > unconditionally break builds on pre-VFIO kernels (<3.6).
> >
> > If someone is building with an older kernel, then they should change the
> > config.
> >
>
> Well, it's not like this is immediately obvious to anyone building DPDK. With your patch, the "out-of-the-box" experience is no longer there, since one now has to figure out why it's not building, go edit config files, et al, which is easy for you and me, but may not be easy for someone dealing with DPDK for the first time.
>
> I agree that both situations aren't ideal, it just seems to me that not building VFIO by default is better in that sense (EAL will show a warning message saying that VFIO isn't enabled, but the code will actually compile). Of course, the best of both worlds would be something like a configure script.
>
> Thanks,
> Anatoly
What we ended up doing is a second patch to have a "compat_vfio.h" file to allow
building on older systems. I will send that as a follow on.
The problem is compounded by the fact that VFIO or not has to be decided by startup
scripts prior to starting the DPDK application. The startup scripts have no way of knowing
that the DPDK application was built with broken VFIO support. That is why I think
the original method with VFIO_PRESENT was not the correct way to handle this.
next prev parent reply other threads:[~2015-04-22 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 18:32 Stephen Hemminger
2015-04-21 9:34 ` Burakov, Anatoly
2015-04-21 17:34 ` Stephen Hemminger
2015-04-22 8:59 ` Burakov, Anatoly
2015-04-22 19:01 ` Stephen Hemminger [this message]
2015-04-23 8:51 ` 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=20150422120133.44b27408@urahara \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.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).