[dpdk-dev] [EXT] Re: [PATCH v12 1/2] kni: add IOVA=VA mode support

David Marchand david.marchand at redhat.com
Thu Nov 14 13:25:22 CET 2019


On Thu, Nov 14, 2019 at 1:10 PM Vamsi Krishna Attunuru
<vattunuru at marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: David Marchand <david.marchand at redhat.com>
> > Sent: Thursday, November 14, 2019 4:43 PM
> > To: Vamsi Krishna Attunuru <vattunuru at marvell.com>
> > Cc: dev <dev at dpdk.org>; Thomas Monjalon <thomas at monjalon.net>; Jerin
> > Jacob Kollanukkaran <jerinj at marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankumark at marvell.com>; Olivier Matz <olivier.matz at 6wind.com>; Yigit,
> > Ferruh <ferruh.yigit at intel.com>; Burakov, Anatoly
> > <anatoly.burakov at intel.com>; Andrew Rybchenko
> > <arybchenko at solarflare.com>; Stephen Hemminger
> > <stephen at networkplumber.org>; Luca Boccassi <bluca at debian.org>
> > Subject: [EXT] Re: [dpdk-dev] [PATCH v12 1/2] kni: add IOVA=VA mode support
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On Thu, Nov 14, 2019 at 11:57 AM David Marchand
> > <david.marchand at redhat.com> wrote:
> > > On Tue, Nov 5, 2019 at 12:05 PM <vattunuru at marvell.com> wrote:
> > > > diff --git a/lib/librte_eal/linux/eal/eal.c
> > > > b/lib/librte_eal/linux/eal/eal.c index 9e2d50c..a1c5bf6 100644
> > > > --- a/lib/librte_eal/linux/eal/eal.c
> > > > +++ b/lib/librte_eal/linux/eal/eal.c
> > > > @@ -922,6 +922,19 @@ static int rte_eal_vfio_setup(void)  }  #endif
> > > >
> > > > +static enum rte_iova_mode
> > > > +rte_eal_kni_get_iova_mode(enum rte_iova_mode iova_mode) {
> > > > +       if (iova_mode == RTE_IOVA_VA) { #if KERNEL_VERSION(4, 6, 0)
> > > > +> LINUX_VERSION_CODE
> > >
> > > I understood that IOVA as VA is possible with kernel >= 4.6.
> > > Should it be < ?
> >
> > I meant "Should the #if check be < ?".
> >
> > I did not mention this first, but thinking again, don't we have an issue here?
> > This won't work for distributions that ship dpdk with kni built with dkms.
> >
>
> Hi David,
>
> Are you referring the following problem, like if dpdk was build with some older kernel (<4.6) version and shipped, later kernel was updated to 4.8 and kni module got build with newer kernel.?, In this case, kni application will continue work in PA mode without any issues. KNI module decides it's iova mode that application has communicated during kni allocation. If the user expectation is to make KNI application work in VA mode, the check has to be dynamic than. Please correct me if the issue that is anticipated is something different.

The dpdk application will request PA (since compiled in with no regard
to the actual kni capabilities) and will refuse to run as non root
user.
Which is already the case before this change.
Ok, maybe something to improve later if people wants to use kni as non root.


My other comments still apply though.

--
David Marchand



More information about the dev mailing list