From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id 21974C5C4 for ; Fri, 29 Jan 2016 19:24:19 +0100 (CET) Received: by mail-pf0-f181.google.com with SMTP id o185so41262120pfb.1 for ; Fri, 29 Jan 2016 10:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oYTwlge+UT0J2MXbBeHKZuzV3zybqH5xj+d7D7D8/jU=; b=pnBjhStjNbb87yMt6sfw3AUmNvWeSV1QlgYQrgN4ZUrLukJtlpEyJJV645MKaCzdIu i9xhPJiNFvVJ3I1fxjKLl26V3HFW+N6kyb6//RpdK4u9O6S8csl1UyKtPZmuwbyOyb6Z O0CnG+tUz7wjttUTe2N7q4d5xhxtmQFT8yBf8nKZdvNOyIH0of2lXQhFaMFSoz9mviuf 9NjyOe1CaiTP4di45rq56FZQc6+enrkB59X92IboB5xcd/l5OfMs4bUmbReLYbzpQrpr izGCt8F/AbWnriyPy6pG674fB3Gd9p//Wt5AXQsav+BCyb+tkneXRvgtAprWDmoeoaK/ qn+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oYTwlge+UT0J2MXbBeHKZuzV3zybqH5xj+d7D7D8/jU=; b=XDC6bILCCtsZTESTWfqBFwRpgT+PTm9vO1nvEEWqw030RdQM+bTN5t8QGeVkpdVRnG HU84g0k1W+9BBx6AmEb2PHXlZ4fxIGp4qYyE+Xqc8iR2Df5/FA9MBWBkzknjEZCYvSrt 7+BJv3HNJf7VU2tSDdIKyr5THBuwlGHpj44I1iMG1Fj4V++mzJdiLE3sJMA6OLHvQOXx Jtcrnt/y9zbdgr813Bz1OUupSjby5T19ZAnORF6dKwbpRcv3t0sohx5Hi166k6bzX+3k Isg7ABEQob6iruGyPTmVmz73XpLPqVu/uS75ynJDoRE46WkhnSlm/5aYLXe5U3SbNzlT sMiQ== X-Gm-Message-State: AG10YOTGCY73qlwN5N1wFZi6gRCcMsuXrgyKaaEiGOlwFCNt0KuhyvwOAKK0qu+ONIvVV9aZ X-Received: by 10.98.70.17 with SMTP id t17mr15232757pfa.107.1454091858580; Fri, 29 Jan 2016 10:24:18 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([106.51.29.23]) by smtp.gmail.com with ESMTPSA id 85sm11161750pfl.18.2016.01.29.10.24.07 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jan 2016 10:24:17 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Fri, 29 Jan 2016 23:51:57 +0530 Message-Id: <1454091717-32251-8-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1454091717-32251-1-git-send-email-sshukla@mvista.com> References: <0000-cover-letter.patch> <1454091717-32251-1-git-send-email-sshukla@mvista.com> Subject: [dpdk-dev] [PATCH v6 8/8] virtio: do not parse if interface is vfio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2016 18:24:19 -0000 If virtio interface attached to vfio driver then do not parse for virtio resource. Instead exit with return 0; Signed-off-by: Santosh Shukla --- v5-->v6: - Removed _noimmu and using deafult rte_kdrv_vfio for drv check. 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 71d4a07..d73a3ad 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -515,7 +515,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