DPDK patches and discussions
 help / color / mirror / Atom feed
From: vijay mohan <vijay1054@gmail.com>
To: dev@dpdk.org, ferruh.yigit@intel.com, john.griffin@intel.com
Subject: Re: [dpdk-dev] pci device access from dpdk secondary process with igb_uio
Date: Thu, 2 Jan 2020 10:58:14 -0800	[thread overview]
Message-ID: <CAJ++VZPjnjFQxNdCMe7WPgQr2rn05DwU0XfhVocEHiZs2_oaCQ@mail.gmail.com> (raw)
In-Reply-To: <CAJ++VZOZd38KC0r02XrOLhsTiDCHBKcayeGT9LP8YeNdj14ZWg@mail.gmail.com>

On Thu, 26 Dec 2019 at 16:58, vijay mohan <vijay1054@gmail.com> wrote:
>
> Hi All,
> I am trying to use pci vf device with secondary process in a multiple process mode and finding pci_dev->mem_resource[0].addr to be NULL. This happens when the pci device is attached to igb_uio.ko but with vfio_pci it works fine.
>
> Looking at the pci device initialization part for secondary process, when device is presented through igb_uio, (in pci_uio_map_secondary), it doesn't seems to update pci_dev->mem_resource[X].addr. For vfio-pci, it updates the addresses in pci_vfio_map_resource_secondary. With the following patch, i am able to use the device from secondary process but would like to know if I am missing something.
>
> diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
> index 7ea73db..f4dca9d 100644
> --- a/drivers/bus/pci/pci_common_uio.c
> +++ b/drivers/bus/pci/pci_common_uio.c
> @@ -70,6 +70,7 @@
>                                 }
>                                 return -1;
>                         }
> +                       dev->mem_resource[i].addr = mapaddr;
>                 }
>                 return 0;
>         }

Hi Ferruh Yigit/John Griffin,
I am trying to use QAT crypto VF device attached to igb_uio.ko with
secondary process and has observed following errors while setting up
the queues due to pci_dev->mem_resource[0].addr check from
qat_qp_setup. mem_resource[0].addr happens to be NULL when the device
is presented to dpdk through igb_uio but works fine with vfio_pci.ko.
Could you please let me know if the fix mentioned above is sufficient
for the device to work with secondary process.

CRYPTODEV: Initialisation parameters - name: BDF_qat_sym,socket id: 0,
max queue pairs: 0
qat_sym_dev_create(): Created QAT SYM device BDF_qat_sym as cryptodev instance 0
qat_comp_dev_create(): Creating QAT COMP device BDF_qat_comp
qat_comp_dev_create(): Created QAT COMP device BDF_qat_comp as
compressdev instance 0
Dev config
Setting up queues
qat_qp_setup(): Setup qp 0 on qat pci device 0 gen 2
qat_qp_setup(): Could not find VF config space (UIO driver attached?).
Crypto device queue pair init failed

Thanks,
Vijay

  reply	other threads:[~2020-01-02 18:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27  0:58 vijay mohan
2020-01-02 18:58 ` vijay mohan [this message]
2020-01-22 17:19   ` Trahe, Fiona
2020-02-25 15:09     ` Trahe, Fiona
2020-02-25 19:45       ` vijay mohan
2020-03-04 12:32   ` Ferruh Yigit

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=CAJ++VZPjnjFQxNdCMe7WPgQr2rn05DwU0XfhVocEHiZs2_oaCQ@mail.gmail.com \
    --to=vijay1054@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.griffin@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).