DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] bus/pci: set intr_handle type for secondary processes
Date: Fri, 19 Oct 2018 15:57:30 +0100	[thread overview]
Message-ID: <CAD+H992rqoVSaTFW-2vdcN8RW369GFbMW3WH=KjkswB0V9ujkQ@mail.gmail.com> (raw)
In-Reply-To: <db49b85a-2d3b-8f12-2977-73d71a6fe774@intel.com>

On Fri, Oct 19, 2018 at 9:02 AM Burakov, Anatoly <anatoly.burakov@intel.com>
wrote:

> On 18-Oct-18 5:41 PM, Alejandro Lucero wrote:
> >
> >
> > On Thu, Oct 18, 2018 at 5:26 PM Burakov, Anatoly
> > <anatoly.burakov@intel.com <mailto:anatoly.burakov@intel.com>> wrote:
> >
> >     On 27-Sep-18 1:30 PM, Alejandro Lucero wrote:
> >      > Invoking rte_pci_read/write_config functions requires device with
> >      > a intr_handle type for using VFIO or UIO driver related functions.
> >      >
> >      > Secondary processes rely on primary processes for device
> >     initialization
> >      > so they do not usually require using these functions. However,
> >     some PMDs,
> >      > like NFP PMD, require using these functions even for secondary
> >     processes.
> >      >
> >      > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com
> >     <mailto:alejandro.lucero@netronome.com>>
> >      > ---
> >
> >     Hi Alejandro,
> >
> >     I’m curious of consequences of setting intr handle to a valid value
> >     when
> >     we don’t have an interrupt thread. Something may try to use it
> >     (although
> >     I couldn’t find any such usage).
> >
> >
> > The point is secondary processes do not deal with interrupts so I assume
> > setting the type does not change anything but it allows to use PCI
> > read/write functions by secondary processes.
> >
> >     PCI config read really uses intr handle type to discover userspace
> >     driver type – this seems ever so slightly wrong, and looks like
> >     something that should be part of rte_device somewhere, independent of
> >     interrupt types. Do we have any other alternative to do the same
> thing
> >     (i.e. know what userspace driver is used for a particular PCI
> device)?
> >
> >
> > I agree current way not being specially good.
> >
> > Your comment has reminded me there is another way: just using the kdrv
> > field from the rte_pci_device struct. I have code using that field for
> > doing a different thing in the NFP PMD depending on the driver in use,
> > UIO or VFIO. So I think a better patch would be just to modify those pci
> > functions for using kdrv field instead.
> >
> > Adding Ferruh in the thread for commenting on this potential change.
> >
>
> I definitely think the way you describe would be a better way to fix
> this (i.e. use kdrv in PCI config functions rather than intr handle type).
>
>
I will send another patch then.

Thanks!


> --
> Thanks,
> Anatoly
>

      reply	other threads:[~2018-10-19 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 12:30 Alejandro Lucero
2018-10-18 16:26 ` Burakov, Anatoly
2018-10-18 16:41   ` Alejandro Lucero
2018-10-19  8:02     ` Burakov, Anatoly
2018-10-19 14:57       ` Alejandro Lucero [this message]

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='CAD+H992rqoVSaTFW-2vdcN8RW369GFbMW3WH=KjkswB0V9ujkQ@mail.gmail.com' \
    --to=alejandro.lucero@netronome.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).