From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BFF67AFD6 for ; Thu, 1 May 2014 13:05:48 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 01 May 2014 04:05:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,964,1389772800"; d="scan'208";a="504218137" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 01 May 2014 04:05:51 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.249]) by IRSMSX104.ger.corp.intel.com ([169.254.5.98]) with mapi id 14.03.0123.003; Thu, 1 May 2014 12:05:51 +0100 From: "Burakov, Anatoly" To: "dev@dpdk.org" Thread-Topic: [PATCH 03/16] [RFC] [VFIO] Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING Thread-Index: Ac9lLDUsWAt1+/TgSJuIA7DqYsHY6w== Date: Thu, 1 May 2014 11:05:49 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 03/16] [RFC] [VFIO] Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING 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: Thu, 01 May 2014 11:05:49 -0000 Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic, retain old macro for backwards compatibility. Probably should be removed in one of the next releases. Signed-off-by: Anatoly Burakov diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 445cf57..e13f635 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -63,7 +63,7 @@ static int my_driver_init(struct rte_pci_driver *dr, struct rte_pci_device *dev); =20 /* - * To test cases where RTE_PCI_DRV_NEED_IGB_UIO is set, and isn't set, two + * To test cases where RTE_PCI_DRV_NEED_MAPPING is set, and isn't set, two * drivers are created (one with IGB devices, the other with IXGBE devices= ). */ =20 @@ -91,7 +91,7 @@ struct rte_pci_driver my_driver =3D { .name =3D "test_driver", .devinit =3D my_driver_init, .id_table =3D my_driver_id, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }; =20 struct rte_pci_driver my_driver2 =3D { diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/ea= l/eal_pci.c index 5e53e07..8f1b22f 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -471,7 +471,7 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,= struct rte_pci_device *d return 0; } =20 - if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) { + if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) { /* map resources for devices that use igb_uio */ if (pci_uio_map_resource(dev) < 0) return -1; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/commo= n/include/rte_pci.h index 3d8420d..62ed3b6 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -190,12 +190,14 @@ struct rte_pci_driver { uint32_t drv_flags; /**< Flags contolling handling of= device. */ }; =20 -/** Device needs igb_uio kernel module */ -#define RTE_PCI_DRV_NEED_IGB_UIO 0x0001 +/** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */ +#define RTE_PCI_DRV_NEED_MAPPING 0x0001 /** Device driver must be registered several times until failure */ #define RTE_PCI_DRV_MULTIPLE 0x0002 /** Device needs to be unbound even if no module is provided */ #define RTE_PCI_DRV_FORCE_UNBIND 0x0004 +/** Retain the old name for backwards-compatibility */ +#define RTE_PCI_DRV_NEED_IGB_UIO RTE_PCI_DRV_NEED_MAPPING =20 /**< Internal use only - Macro used by pci addr parsing functions **/ #define GET_PCIADDR_FIELD(in, fd, lim, dlm) \ diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxap= p/eal/eal_pci.c index 90b1b8f..dc21645 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -434,7 +434,7 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,= struct rte_pci_device *d return 1; } =20 - if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) { + if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) { /* map resources for devices that use igb_uio */ if ((ret =3D pci_uio_map_resource(dev)) !=3D 0) return ret; diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_eth= dev.c index d8c9a9b..ae8f54e 100644 --- a/lib/librte_pmd_e1000/em_ethdev.c +++ b/lib/librte_pmd_e1000/em_ethdev.c @@ -279,7 +279,7 @@ static struct eth_driver rte_em_pmd =3D { { .name =3D "rte_em_pmd", .id_table =3D pci_id_em_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_em_dev_init, .dev_private_size =3D sizeof(struct e1000_adapter), diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_e= thdev.c index 673b4de..d34a867 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -600,7 +600,7 @@ static struct eth_driver rte_igb_pmd =3D { { .name =3D "rte_igb_pmd", .id_table =3D pci_id_igb_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_igb_dev_init, .dev_private_size =3D sizeof(struct e1000_adapter), @@ -613,7 +613,7 @@ static struct eth_driver rte_igbvf_pmd =3D { { .name =3D "rte_igbvf_pmd", .id_table =3D pci_id_igbvf_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_igbvf_dev_init, .dev_private_size =3D sizeof(struct e1000_adapter), diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixg= be_ethdev.c index a5a7f9a..6cd2486 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -931,7 +931,7 @@ static struct eth_driver rte_ixgbe_pmd =3D { { .name =3D "rte_ixgbe_pmd", .id_table =3D pci_id_ixgbe_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_ixgbe_dev_init, .dev_private_size =3D sizeof(struct ixgbe_adapter), @@ -944,7 +944,7 @@ static struct eth_driver rte_ixgbevf_pmd =3D { { .name =3D "rte_ixgbevf_pmd", .id_table =3D pci_id_ixgbevf_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_ixgbevf_dev_init, .dev_private_size =3D sizeof(struct ixgbe_adapter), diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c b/lib/librte_pmd_vmxne= t3/vmxnet3_ethdev.c index 8259cfe..a08c2bf 100644 --- a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c +++ b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c @@ -267,7 +267,7 @@ static struct eth_driver rte_vmxnet3_pmd =3D { { .name =3D "rte_vmxnet3_pmd", .id_table =3D pci_id_vmxnet3_map, - .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, + .drv_flags =3D RTE_PCI_DRV_NEED_MAPPING, }, .eth_dev_init =3D eth_vmxnet3_dev_init, .dev_private_size =3D sizeof(struct vmxnet3_adapter), --=20 1.8.1.4