From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 24DE391C9 for ; Tue, 19 Jan 2016 12:47:04 +0100 (CET) Received: by mail-pf0-f175.google.com with SMTP id 65so174250511pff.2 for ; Tue, 19 Jan 2016 03:47:04 -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=jHgJsQqNu5OZSP5KBSUya1v7Kg+zJlOwFTK7RTzn/MU=; b=pInRdac2rJG23H9rl5djLon7rLiXodUm00Ubg4TtnSgHahg/NPqp2yERFli5TpfhWm klPRWEx6PGbHsj0m2WYdhXRsEGNaJKUZ1Y9xQ7Wa2Jx9WoYNlNBsAABanqOKFgfG1bmv 3/oXWgR5QSZjrTE2vhf1mIHjXOuMeEVkbuB+ZjjFjN1Ym2KUfa5NfdCv5kMplVQ0IVPn yJQ6kpB7JwwH6ptMKfY40khWSXeFlqPoDYgsV2eML8rDHDXkE7/Rk+2U5XLGbKsq5KbX TP1vYlqHjQqx4Fd6qgsYylpFhLyQgMjZqdlGsK173Ru63iInVN3zJd/h9Q9lAVGqLPgB M9kA== 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=jHgJsQqNu5OZSP5KBSUya1v7Kg+zJlOwFTK7RTzn/MU=; b=HcCDhEoqy64A3Q2JXgERvEyFdnDesS5FSjFlQHfgeqiXAnPp0rCgj93qrzghLM60kJ ZAL9I1eqsBkVpjKWZyxlNeLEFyb+rNNu4OtAsEYBvBBRSffDpcP1scf//ZwUpZHuA23J K3a0+84tbhX9NsJpLPBg8xa0XcSWPKcPQqFjXL8tTnwiWHJh7npUfXIB9IdSybjFgUIp swWs5Dv16VevEcLUGCpnAN8esZEt6EFfc/Eu0FWiw5EgVdxH08IJkwK1vOeytgvJFGlN B7bFmOKmKUPhqto40BaNAn4DkukCcJbuE+U4efmJXtUMq0g/j22UOtkOnKWpIhxGariS dF/Q== X-Gm-Message-State: ALoCoQm3Mczz4erug9aNoXf2ix0UGP5VGvmapkt75Qqwk1Wl2EGbjdzVCuYR/E7eKgh9IdbIT8pZWZDzwB6vSu8GByG/NjSwRA== X-Received: by 10.98.1.21 with SMTP id 21mr43621388pfb.8.1453204023586; Tue, 19 Jan 2016 03:47:03 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([111.93.218.67]) by smtp.gmail.com with ESMTPSA id 75sm41014170pfj.20.2016.01.19.03.47.00 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jan 2016 03:47:02 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Tue, 19 Jan 2016 17:16:10 +0530 Message-Id: <1453203972-24855-10-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1453203972-24855-1-git-send-email-sshukla@mvista.com> References: <1453203972-24855-1-git-send-email-sshukla@mvista.com> Subject: [dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu 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: Tue, 19 Jan 2016 11:47:04 -0000 If virtio interface attached to vfio-noiommu 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 --- v4-->v5: - added _NOIOMMU drv check for lagecy virtio. No need for resource_init in vfio case. And resource_pasrsing/interface validation done by pci_eal module for pmd driver. 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 537c552..520e540 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_NOIOMMU) + 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