DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	"Xia, Chenbo" <chenbo.xia@intel.com>,
	David Marchand <david.marchand@redhat.com>,
	"Ferruh Yigit" <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent
Date: Thu, 28 Oct 2021 09:38:24 -0700	[thread overview]
Message-ID: <20211028093824.39232a46@hermes.local> (raw)
In-Reply-To: <3db19e94-dd25-e9ca-80ee-e4fea233f1cd@intel.com>

On Thu, 28 Oct 2021 16:40:28 +0100
"Burakov, Anatoly" <anatoly.burakov@intel.com> wrote:

> On 28-Oct-21 3:53 PM, Thomas Monjalon wrote:
> > 28/10/2021 13:32, Ferruh Yigit:  
> >> On 10/28/2021 12:11 PM, Xia, Chenbo wrote:  
> >>>> -----Original Message-----
> >>>> From: Burakov, Anatoly <anatoly.burakov@intel.com>
> >>>> Sent: Thursday, October 28, 2021 6:30 PM
> >>>> To: Xia, Chenbo <chenbo.xia@intel.com>; dev@dpdk.org
> >>>> Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent
> >>>>
> >>>> Hi Chenbo,
> >>>>  
> >>>>> And do we need backport? As 'return -1' does not align with the API doxygen.
> >>>>>
> >>>>> Thanks,
> >>>>> Chenbo
> >>>>>  
> >>>> Maybe it's the FreeBSD implementation that needs to be adjusted then,
> >>>> because none of those functions are valid on FreeBSD, and the
> >>>> documentation for VFIO functions explicitly mentions that on FreeBSD,
> >>>> they should return an error. I went with adjusting Linux implementation
> >>>> to minimize the amount of changes we have to make (and only change code
> >>>> path that no one uses in the first place), but maybe that was a wrong
> >>>> decision.
> >>>>
> >>>> I'm not sure if changing the API return value to match what was
> >>>> documented counts as an API change, so maybe backport to stable is not
> >>>> advised here.  
> >>>
> >>> It's not a API change. My point is whether VFIO is present, users just use
> >>> the API to check if vfio support is there. In a kernel version that does not
> >>> support VFIO, he uses 'if(rte_vfio_is_enabled(XXX))' to check as the doxygen
> >>> says its return value should be 1 as true or 0 as false. He will get true (-1)
> >>> but VFIO is not there. That's why I think it's a bug and should be backported.
> >>>
> >>> But I think we can first discuss if we should drop the dummy implementation
> >>> as DPDK requires Linux kernel version >= 4.4 now so VFIO is always present.
> >>> I think it depends on by saying 'DPDK requires kernel version >= 4.4'. It's
> >>> a real _requirement_ or only a recommendation?
> >>>
> >>> Ferruh, David & Thomas, What do you think?
> >>>  
> >>
> >> My understanding is, it is a requirement. DPDK does not guarantee support for
> >> kernels < 4.4.  
> > 
> > Do we have a kernel version check at runtime?
> > I think we should add a warning if running too old kernel.
> >   
> 
> Perhaps we should (there's a `uname()` call, should be fairly 
> straightforward to implement), but obviously this would be outside the 
> scope for this patchset.
> 

Checking kernel version at runtime with uname() is a bad idea because
enterprise distro vendors support things without updating the kernel version.
It is always better to try for the feature and handle errors that could be
reported by older kernels.

Also DPDK System Requirements says kernel >= 4.4 on Linux.




  reply	other threads:[~2021-10-28 16:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 10:36 Anatoly Burakov
2021-09-16 10:36 ` [dpdk-dev] [PATCH v1 2/2] vfio: add errno on unsupported platforms Anatoly Burakov
2021-09-16 10:39   ` Bruce Richardson
2021-09-22  3:31   ` Xia, Chenbo
2021-09-22  3:30 ` [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent Xia, Chenbo
2021-09-22  9:26   ` Ferruh Yigit
2021-09-22 11:30     ` Xia, Chenbo
2021-10-28  8:21       ` David Marchand
2021-10-28 10:29   ` Burakov, Anatoly
2021-10-28 11:11     ` Xia, Chenbo
2021-10-28 11:32       ` Ferruh Yigit
2021-10-28 13:00         ` Burakov, Anatoly
2021-10-28 14:53         ` Thomas Monjalon
2021-10-28 15:40           ` Burakov, Anatoly
2021-10-28 16:38             ` Stephen Hemminger [this message]
2021-10-28 13:49 ` [dpdk-dev] [PATCH v2 1/4] vfio: drop fallback Linux implementation Anatoly Burakov
2021-10-28 13:49   ` [dpdk-dev] [PATCH v2 2/4] vfio: fix wrong return value for FreeBSD Anatoly Burakov
2021-10-28 13:49   ` [dpdk-dev] [PATCH v2 3/4] vfio: fix documentation to match intended behavior Anatoly Burakov
2021-10-28 13:49   ` [dpdk-dev] [PATCH v2 4/4] vfio: add errno on unsupported platforms Anatoly Burakov
2021-10-28 14:13     ` Burakov, Anatoly
2021-10-28 14:15   ` [dpdk-dev] [PATCH v3 1/4] vfio: drop fallback Linux implementation Anatoly Burakov
2021-10-28 14:15     ` [dpdk-dev] [PATCH v3 2/4] vfio: fix wrong return value for FreeBSD Anatoly Burakov
2021-11-05  2:50       ` Xia, Chenbo
2021-10-28 14:15     ` [dpdk-dev] [PATCH v3 3/4] vfio: fix documentation to match intended behavior Anatoly Burakov
2021-11-05  2:57       ` [dpdk-dev] [dpdk-stable] " Xia, Chenbo
2021-10-28 14:15     ` [dpdk-dev] [PATCH v3 4/4] vfio: add errno on unsupported platforms Anatoly Burakov
2021-11-08 15:55       ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-11-01  6:27     ` [dpdk-dev] [PATCH v3 1/4] vfio: drop fallback Linux implementation Xia, Chenbo
2021-11-01 13:57       ` Burakov, Anatoly
2021-11-05  2:48         ` Xia, Chenbo

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=20211028093824.39232a46@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).