DPDK patches and discussions
 help / color / mirror / Atom feed
From: Santosh Shukla <sshukla@mvista.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v7 08/10] virtio_pci: do not parse if interface is vfio
Date: Wed, 27 Jan 2016 23:09:46 +0530	[thread overview]
Message-ID: <1453916386-27000-1-git-send-email-sshukla@mvista.com> (raw)

If virtio interface attached to vfio driver then do not parse for virtio
resource. Instead exit with return 0;

Note: Applicable for virtio spec 0.95.

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
v5-->v6:
- Replaced pci_dev->kdrv check from __noiommu to default;
  This is because patch [1] in v5 series not required.
  [1] http://dpdk.org/dev/patchwork/patch/9984/

v6--> v7:
- Removed noiommu reference from commit message.

 drivers/net/virtio/virtio_pci.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 0c29f1d..deec306 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -514,7 +514,9 @@ virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
 static int
 legacy_virtio_resource_init(struct rte_pci_device *pci_dev)
 {
-	if (virtio_resource_init_by_uio(pci_dev) == 0)
+	if (pci_dev->kdrv == RTE_KDRV_VFIO)
+		return 0;
+	else if (virtio_resource_init_by_uio(pci_dev) == 0)
 		return 0;
 	else
 		return virtio_resource_init_by_ioports(pci_dev);
-- 
1.7.9.5

                 reply	other threads:[~2016-01-27 17:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1453916386-27000-1-git-send-email-sshukla@mvista.com \
    --to=sshukla@mvista.com \
    --cc=dev@dpdk.org \
    /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).