On Thu, Nov 14, 2019 at 1:10 PM Vamsi Krishna Attunuru
<vattun...@marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: David Marchand <david.march...@redhat.com>
> > Sent: Thursday, November 14, 2019 4:43 PM
> > To: Vamsi Krishna Attunuru <vattun...@marvell.com>
> > Cc: dev <dev@dpdk.org>; Thomas Monjalon <tho...@monjalon.net>; Jerin
> > Jacob Kollanukkaran <jer...@marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankum...@marvell.com>; Olivier Matz <olivier.m...@6wind.com>; Yigit,
> > Ferruh <ferruh.yi...@intel.com>; Burakov, Anatoly
> > <anatoly.bura...@intel.com>; Andrew Rybchenko
> > <arybche...@solarflare.com>; Stephen Hemminger
> > <step...@networkplumber.org>; Luca Boccassi <bl...@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.march...@redhat.com> wrote:
> > > On Tue, Nov 5, 2019 at 12:05 PM <vattun...@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

Reply via email to