From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-we0-f180.google.com (mail-we0-f180.google.com
 [74.125.82.180]) by dpdk.org (Postfix) with ESMTP id B9E062E88
 for <dev@dpdk.org>; Fri, 21 Mar 2014 14:49:02 +0100 (CET)
Received: by mail-we0-f180.google.com with SMTP id p61so1604903wes.39
 for <dev@dpdk.org>; Fri, 21 Mar 2014 06:50:34 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:date:message-id;
 bh=vTVvHNenSPgzmTiiYOZ0nD6M8LaxZ4GG/U7PsAmTzWQ=;
 b=O23Wx0AOZI2N0flUDY1qiefIJtCod/5nkgACo2fXonfWT3jN7QC27/6W9VdLpdkcMi
 9XoiHK46ddgFnr/hoc+6CuPFCvjG81I8mzmo+iXRUXYM4hGg+2z84jrSkk6PT0aUUHbS
 nedqRpG0CfGsqkEqbqg2W/yUNTPH9UJskseQtl+1gziXg+GjFQLsKqOXlGHGMVXG7l9s
 3GOO/WD+4Y/DYD0lpBspVFzwdAvK4oaFr7jHV/TVxtsKgqy4tZhAu6L82fmK9OhqXp39
 mMdxbVFlaxQXFbA6/9gu8MoIJfrgJPqxrMyiddheOaZNVHd5cMYHTzXFEi7da9IxVlpC
 u3fQ==
X-Gm-Message-State: ALoCoQm2hQIkFJLkfMRHC+2G1J5LAVrm32TAEmt6pmAo9UQ6fRIRuDv05t+WYlGEJA/VElmzfH6Y
X-Received: by 10.180.98.71 with SMTP id eg7mr2217469wib.31.1395409834581;
 Fri, 21 Mar 2014 06:50:34 -0700 (PDT)
Received: from XPS13.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237])
 by mx.google.com with ESMTPSA id h9sm13423051wjz.16.2014.03.21.06.50.33
 for <dev@dpdk.org>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 21 Mar 2014 06:50:33 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Date: Fri, 21 Mar 2014 14:50:19 +0100
Message-Id: <1395409819-3133-1-git-send-email-thomas.monjalon@6wind.com>
X-Mailer: git-send-email 1.9.0
Subject: [dpdk-dev] [PATCH] pci: fix igb_uio mapping for virtio_uio and
	vmxnet3_uio
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Mar 2014 13:49:03 -0000

Since commit 10ed994 (pci: use igb_uio mapping only when needed),
the flag RTE_PCI_DRV_NEED_IGB_UIO must be set even if RTE_EAL_UNBIND_PORTS
is disabled.
It was not the case for virtio_uio and vmxnet3_uio so the uio resources were
not mapped.

Reported-by: Daniel Kan <dan@nyansa.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_virtio/virtio_ethdev.c   | 2 --
 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 1cd921b..f107161 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -474,9 +474,7 @@ static struct eth_driver rte_virtio_pmd = {
 	{
 		.name = "rte_virtio_pmd",
 		.id_table = pci_id_virtio_map,
-#ifdef RTE_EAL_UNBIND_PORTS
 		.drv_flags = RTE_PCI_DRV_NEED_IGB_UIO,
-#endif
 	},
 	.eth_dev_init = eth_virtio_dev_init,
 	.dev_private_size = sizeof(struct virtio_adapter),
diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
index 6757aa2..8259cfe 100644
--- a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
+++ b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c
@@ -267,9 +267,7 @@ static struct eth_driver rte_vmxnet3_pmd = {
 	{
 		.name = "rte_vmxnet3_pmd",
 		.id_table = pci_id_vmxnet3_map,
-#ifdef RTE_EAL_UNBIND_PORTS
 		.drv_flags = RTE_PCI_DRV_NEED_IGB_UIO,
-#endif
 	},
 	.eth_dev_init = eth_vmxnet3_dev_init,
 	.dev_private_size = sizeof(struct vmxnet3_adapter),
-- 
1.9.0