From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0065.outbound.protection.outlook.com [104.47.33.65]) by dpdk.org (Postfix) with ESMTP id 45D025591 for ; Tue, 12 Jul 2016 08:01:42 +0200 (CEST) Received: from BY2PR03CA075.namprd03.prod.outlook.com (10.141.249.48) by BY2PR0301MB1991.namprd03.prod.outlook.com (10.163.196.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Tue, 12 Jul 2016 06:01:40 +0000 Received: from BN1AFFO11FD015.protection.gbl (2a01:111:f400:7c10::160) by BY2PR03CA075.outlook.office365.com (2a01:111:e400:2c5d::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.539.14 via Frontend Transport; Tue, 12 Jul 2016 06:01:40 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD015.mail.protection.outlook.com (10.58.52.75) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Tue, 12 Jul 2016 06:01:39 +0000 Received: from Tophie.ap.freescale.net (Tophie.ap.freescale.net [10.232.14.199]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6C60qWp006202; Mon, 11 Jul 2016 23:01:37 -0700 From: Shreyansh Jain To: CC: , , Date: Tue, 12 Jul 2016 11:31:22 +0530 Message-ID: <1468303282-2806-18-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468303282-2806-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1468303282-2806-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131127769001266372; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(5890100001)(92566002)(77096005)(305945005)(575784001)(50226002)(11100500001)(85426001)(81166006)(8676002)(356003)(97736004)(81156014)(4326007)(2906002)(19580395003)(19580405001)(86362001)(7846002)(68736007)(104016004)(76176999)(586003)(47776003)(48376002)(50466002)(2950100001)(5003940100001)(105606002)(36756003)(33646002)(189998001)(50986999)(110136002)(229853001)(8936002)(106466001)(2351001)(6806005)(87936001)(26583001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB1991; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD015; 1:dAJ27JmiXEt+uy88raUUb7jlEt5zH4BkW8sw0Tx8UvPBQ3ErhG1WaYyKhdct/3PPcoVMUeG1QPyQ+8ghTPAtHDc3kPrHezJ/Zps4okJzAkAPnj+RwsD3mxIeDjh1xxboYv13dJ8Q+JOHUKXD0ro06gZwstDobDy+MaqC9WeDCwf3bsipbO+SAXsc4NfQisihr0QMOzoAcJk6Lp7EuE6EH+d9PuPFfzK700LoUwuQMnEwxR9FJx4ol/aNxeKFIiP5jXKidZbLmBcPPQTER3YzenQv9sONu35WHvQxnkf09dRmd6cMUYAnMdzGu4WhCrs5t3J5bkC5A5WhkpJKISEd1nQ157Z1nHDjH/kMvKQDxL8PskpgpGtmRipVDw4PRsz8FNFth3XfWZKrlJdrsoN400csl5DHrDYme8v1UkzEPcYaU/Ag6CCY+m0vqYtNnSP2OTG46WyLoxp2QJTfZ474A6S62kgWUf6jTjpia35k/16COjHLhJe0F3bcskcS189V1gbUe5mBpOJm0coQlheZmsGhcHp8VK9EEldwgUjj5Ir00pQ9a6OgQr/VuKHYN0djFgSwOemgrrbLObD0Sh+DQ+B5fDaKn3AVG1/pGwtvSR79ssOZvEN9FMtudZzxm9by MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: ca59c782-4d2b-4793-2b65-08d3aa19fdf7 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1991; 2:XmASzYBSMETcuZ9o0q7c3OQ92ak0vQd2taZfnhPWKvykGF9xkd/7anbMeRiNIrgHfYAAaFeRThyEAMmUhtNbF2bg3lh0Vrb/U1uRhdIcu1dK+hyJZ11msREYcDeu9gO9ZX7ipxT9WoUyU4bapYMdC6tJ61icd7mduSb7B+C8J7ZAjmhSALEG4rYbZMoOKo14; 3:yKjBxjDJwBLZAsVV8RxIYNfIllV9oNIIKW2DAOlK9GfIKWIHsZZlr5Kl0urAmIuC7gzQqbwb1mwSBVO4YnkiAUWBa6Sa6oQTIv4oGpJ3bcqtZHXxw908iaQB3vkfPHCefoH3VbAC6a/XJR+FIGHZmdVmWWRwu1tQSTPMsj2t4pPry3ek6V2ZTxGNRZf64D+yauNKYKWfUW/SbREqJVD8Zxcec27YHxaB/yiGQ4nh4MY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB1991; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1991; 25:lsrQW3bElLu+Umx72pdMOC7jnFOEil3YC0NOdMkyMF6Ee71OwZNwo1vBxBb7Vct3ShRImK9rJxtatawkx9PUTp9nDNWKn9Nsy+kiWMRNr56hgCWvIFXuaMFq4Kb6jJN/G4UYEvbI83WwImEwTXdhvWqwX43Yb+BI0Sxv3p2WB5M15EjPLn8zJE9BuvMLG3h1y4QVT6eIZuKSWrHLwsUZGFtQKWMRcahQS1i4BocYZZqS8CXBEQ1GgQY+GDrW00pnwqJIktVPu5fd9OmryjllgFhukL/N0PqyvqFnyUYmvBXix7xvvs2WmuM/HGDCFJU0IPuYQETgCd6wCWXfdCLCGV2I5FhBbq4qFaeiBikqPo9bwliAQ1nUMk6Lcej5mCYXT7npf7Qk60mIfbpeVVkOsXj+mWU2K2GgIYGB6Dh/BPcwkyWCFnFUSQY8iUM79XQDns7qYI1ursNxc5v1Ptg7H/3IMVan/8NzsWtXvOkWH8rUHreaL5YHq+Q/Ie1suyQ79PVZQxzjPvOppIstGXTO6E4wxDfac/8q9IQFsBEhVnaM6+YN8mILFgWUqIK51y56i9RqhZN31ZmchAtImtuHeaQ25pvoJrNfY6m+FXBNyuIZUGqWvv/uFK1vMVngzXWPALb/Tl1iaVm+yfLv4SsVVOm1opGts6om6s2AKgpNmG7Oo3pwLSX9DZwDry9v4CobbG1kXHnd5bZ1c8PDQhI0KnHyf+ZMGUyhi6bLexIrfMvftDRNq1eSlufe6ePvv5pI X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1991; 31:NlYK8I/oXmYe7bfmxagk/di7DlUaqMeKRqztim895m4tCOsjRM6MlLp/wfwwJG+GdM/HyIdYpd++/HnqAKlE6cW+H/CKDRu1xMLJksNES3j4cxXOch58jMkj28+iLWuFcw2jDGjPHfZKYERlBwkjFO31Ga+8YIYFwqtrJUEAm0YNwm28Io13m3g8IEDXUo3OKwZI5qEcmapMXrxtzpW2RA==; 4:7OtfEmFs33lI510KEWgeBxUNBrLML8FnwnOW02CyM2J9ZTegoL4Q21kKtxfRrJZGIlwIgEAG3lU4tgb+pcdvH6OswWx+C9qACJ7ndBehlNGpkqVyFyLqPl4sVT0rktJBY7WIArL+KVGXb92gNNkht9GPTSt/l+f/iwUVSvtcGa1v3BI2/LxqLhOyo7KNZCsyNSXhzLlDBiMimuHv7Anwul5TIETrISnY44bxVe4Ffa0MWSjN0AASNzvy/GmTugXg88T5GZDuxj7gdJThx4hRd8XN6VYhp6pLSfoVFy0t2VYaqQC7w0tOEEIpszfP4EKiNeLomenP4KgmNw/jSfI3ohlGre+io4aTz6VhY9uaJaxvUjPKcqVdvD7z/Wv+GRKvY9R4wwouWHr7m0cr6qTz4Y3DwdHWEZe49VlDGI5IapxaKNQ3A0ida3Bobfn3cpIgbQ0Ego2OWGJQx43MJ0DJ9HdkNQZlztwn31d1RQh3qNEFYitM0ni1HraQhOm6MT/kppxsO3MhqwXjdFs9HxW9WA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13018025)(13024025)(13017025)(13023025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BY2PR0301MB1991; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB1991; X-Forefront-PRVS: 0001227049 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB1991; 23:iefPyFjXitXN7ZXDbJtkopLEV62lcA03KE9PAAx?= =?us-ascii?Q?b+Hmqc6eSkxU2OOdNoR4DbafEhV++iIetTMcOMEYmlkSfGp2IMWJU3MH5Em5?= =?us-ascii?Q?+fYcsr0PWLrS8IawFkunAJ3NCYyrGsiE/xyeJCDTnMPE9sTeEN5msT1PRi+e?= =?us-ascii?Q?xZux9lwuwgeStefjbqX4xSxhPmha8Ee18zs+AbCD83oZJagl4ptB35Vzgvm0?= =?us-ascii?Q?drIxRivbkwi5BnOTmdyJ2zBcS14Cf//YIGlHPxWtGJudqRcxWnhY9woXqVNR?= =?us-ascii?Q?A1kRzvOeS01lP4kzfJxR7G5yl6Imz65lcvtMs/84/tyHlU2mHCOFiBb8YmYO?= =?us-ascii?Q?XvI1r7v3eQpwpkj1tqP8tNgtZhICnm7otjl/UuX3WTbNDyu2j10cZVPisPjy?= =?us-ascii?Q?COwf9ahUyF5FfaY3PkNfVHOLuTUU3n7hc9+aOuBjTqJCfPTLUdiPTRpD40EE?= =?us-ascii?Q?t8ztJwsYqNYkUlQ3ooe4yFxpBxMCLoh0w9fgbpcV2eOtBSlqsdwC82fgTm0I?= =?us-ascii?Q?LDIy4CVMjvwbmU4TEBe2VJZzt7SFWYUYp8MAJnsG8SSzI+SWn5yv9KIf+38q?= =?us-ascii?Q?98dSmVthGUM6tdkKZmRNantsw9jJNeqwTYWvR0SFJofaomEMRlOumqpeJKNd?= =?us-ascii?Q?ig/L597Qn3cmD1/OzDl/LyoyFpUL2/BM9GQgNZlXSsmOf5eBc5B+/VIt9McS?= =?us-ascii?Q?JWlAW9DPoZCLjwBUSl520qkpk2TqIUgN/qVln7by0vj6kwxv70N3LKpM0i1/?= =?us-ascii?Q?a3l7OB31hflL3iRst8tsv2YCVsI5SkemZwd20dfYZotH9sncFdhjXf9l6Wdt?= =?us-ascii?Q?S0tQ4l5242Wlmvhv/bIW5cYzw4K9catMMYkMlxAa8sm0tfoxVznYSIxjDx8j?= =?us-ascii?Q?RSrLC/M099/FfYUej9/cHR5kcf+7NybRA7k7pWyWTY8zJI9e6217SeQAtx9I?= =?us-ascii?Q?mb0Y8kW8zQAQr9SVJLw6khSAr0uv6IZ4Usiz248YlC63Crkgq1tW2h1TernN?= =?us-ascii?Q?LwFZlq12+RkwJ99iD45z3q8X/OSBgH0/RXVX2uHfERAce4d18fgEDrCWE2eP?= =?us-ascii?Q?ZyvAhpNbXnfGNPb8JdaYGhjGAz8WefFmDlP/o7/4HnOYD11svSBq/pq27uZ3?= =?us-ascii?Q?N64WfJWo7oL4B/RXY0eoDRD4FWTcV/hubU75frHNs1/kGmJR5CCyxEnVt2T7?= =?us-ascii?Q?kVZfGe11/fqrT1Ro=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1991; 6:0eLUZKBjqFy3dZMT+JyZ2Asc3mPEd5EZrstMIEKLRb5m9vKRMwPLgcMhwCxWkyWajSBC/2V9zixKR1LDe23x5Ao7sFL+RvtHMeXtoFNZjtVkStmzLWD6jR6BdLhz9GLuANsOW1kmarrOFQNKtARMT9+BJt2MewIifukaC8SE75xyfod1FqEN8eqzti3oNely4sWRnbfgtJSz5WPBz3KGoKgy3EU98ncVC3UTKYKUCoTBtWQwDTwZBECxcBTccaBrUbwOpw8rbdekooJw+lRPPZ/Un4Eo+P+iW1ePfxoq3cQ=; 5:eVaAYKvKgacWYFr9b0B/MkWGSwAquPmF9rocuHcWEoKSF6hyD6S+biUA+qM9b0YXPBlHFekcMjsIMasJErjG6Je9hXG0Uj29Qk35hNse/SoaSo5t45PNWXATT7DJ8FB280T7jdwRQPXwU5HXCDYLoy9pWod1Da9BeNHKLaGBAII=; 24:sc2Jv6eU0K0FNQOc+mOPCBmnF3OQl2IUcNO4kxw8Mzk2+Ow9oRfBOlChClq0EYJx7FMKDeALwlMcgoRYKkXge3rtvReKWhRQm4mvWesDxsM=; 7:KNSNWZvDFHTIl6up415P6KSJBt2x6TRHKr7jT95TAMWvysNyJlN1KcQ0UYGGJEyxq8KZPnQ0bMHuhmSdCK/aR3ErxLEhXTJzFhtcUY3yXh5PtQlSlrg2KB2pmw+OEqrhCHTSgHg94OwN3GFlUhtz5StK03Y/W6Jghv00HDOZJqmpIzeWU+ygp3cKN4OqNL40rEGLwEqovoGpqFmDzq9H3c709vDZDFJRLw389Ya/TGV9MQhLsMLH/53R/XjifgHu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2016 06:01:39.9238 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB1991 Subject: [dpdk-dev] [PATCH v6 17/17] ethdev: get rid of device type 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, 12 Jul 2016 06:01:42 -0000 Now that hotplug has been moved to eal, there is no reason to keep the device type in this layer. Signed-off-by: David Marchand Signed-off-by: Shreyansh Jain --- app/test/virtual_pmd.c | 2 +- drivers/net/af_packet/rte_eth_af_packet.c | 2 +- drivers/net/bonding/rte_eth_bond_api.c | 2 +- drivers/net/cxgbe/cxgbe_main.c | 2 +- drivers/net/mlx4/mlx4.c | 2 +- drivers/net/mlx5/mlx5.c | 2 +- drivers/net/mpipe/mpipe_tilegx.c | 2 +- drivers/net/null/rte_eth_null.c | 2 +- drivers/net/pcap/rte_eth_pcap.c | 2 +- drivers/net/ring/rte_eth_ring.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/xenvirt/rte_eth_xenvirt.c | 2 +- examples/ip_pipeline/init.c | 22 ---------------------- lib/librte_ether/rte_ethdev.c | 5 ++--- lib/librte_ether/rte_ethdev.h | 15 +-------------- 16 files changed, 16 insertions(+), 52 deletions(-) diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index b4bd2f2..8a1f0d0 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -581,7 +581,7 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, goto err; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) goto err; diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index f795566..d629ee3 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -666,7 +666,7 @@ rte_pmd_init_internals(const char *name, } /* reserve an ethdev entry */ - *eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + *eth_dev = rte_eth_dev_allocate(name); if (*eth_dev == NULL) goto error; diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index 203ebe9..8514652 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -189,7 +189,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id) } /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) { RTE_BOND_LOG(ERR, "Unable to allocate rte_eth_dev"); goto err; diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index ceaf5ab..922155b 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -1150,7 +1150,7 @@ int cxgbe_probe(struct adapter *adapter) */ /* reserve an ethdev entry */ - pi->eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + pi->eth_dev = rte_eth_dev_allocate(name); if (!pi->eth_dev) goto out_free; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 2bed4de..b333ad6 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5803,7 +5803,7 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) snprintf(name, sizeof(name), "%s port %u", ibv_get_device_name(ibv_dev), port); - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name); } if (eth_dev == NULL) { ERROR("can not allocate rte ethdev"); diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3658769..ebad7cb 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -617,7 +617,7 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) snprintf(name, sizeof(name), "%s port %u", ibv_get_device_name(ibv_dev), port); - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name); } if (eth_dev == NULL) { ERROR("can not allocate rte ethdev"); diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 93f8730..c0d0e3b 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1587,7 +1587,7 @@ rte_pmd_mpipe_devinit(const char *ifname, return -ENODEV; } - eth_dev = rte_eth_dev_allocate(ifname, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(ifname); if (!eth_dev) { RTE_LOG(ERR, PMD, "%s: Failed to allocate device.\n", ifname); rte_free(priv); diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 7a24884..ce49945 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -517,7 +517,7 @@ eth_dev_null_create(const char *name, goto error; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) goto error; diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 7e213eb..7fbc60e 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -822,7 +822,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues, goto error; /* reserve an ethdev entry */ - *eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + *eth_dev = rte_eth_dev_allocate(name); if (*eth_dev == NULL) goto error; diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index a7048c7..5690dcd 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -303,7 +303,7 @@ do_eth_dev_ring_create(const char *name, } /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) { rte_errno = ENOSPC; goto error; diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 7539cd4..2bb761b 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -714,7 +714,7 @@ eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues, goto error; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) goto error; diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 782d7d3..17d5848 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -277,7 +277,7 @@ virtio_user_eth_dev_alloc(const char *name) struct virtio_hw *hw; struct virtio_user_dev *dev; - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (!eth_dev) { PMD_INIT_LOG(ERR, "cannot alloc rte_eth_dev"); return NULL; diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index 99f6cc8..6b15381 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -654,7 +654,7 @@ eth_dev_xenvirt_create(const char *name, const char *params, goto err; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name); if (eth_dev == NULL) goto err; diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index cd167f6..0dbc332 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -606,29 +606,12 @@ app_link_set_tcp_syn_filter(struct app_params *app, struct app_link_params *cp) } } -static int -app_link_is_virtual(struct app_link_params *p) -{ - uint32_t pmd_id = p->pmd_id; - struct rte_eth_dev *dev = &rte_eth_devices[pmd_id]; - - if (dev->dev_type == RTE_ETH_DEV_VIRTUAL) - return 1; - - return 0; -} - void app_link_up_internal(struct app_params *app, struct app_link_params *cp) { uint32_t i; int status; - if (app_link_is_virtual(cp)) { - cp->state = 1; - return; - } - /* For each link, add filters for IP of current link */ if (cp->ip != 0) { for (i = 0; i < app->n_links; i++) { @@ -736,11 +719,6 @@ app_link_down_internal(struct app_params *app, struct app_link_params *cp) uint32_t i; int status; - if (app_link_is_virtual(cp)) { - cp->state = 0; - return; - } - /* PMD link down */ status = rte_eth_dev_set_link_down(cp->pmd_id); if (status < 0) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 8d14fd7..58e174e 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -191,7 +191,7 @@ rte_eth_dev_find_free_port(void) } struct rte_eth_dev * -rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type) +rte_eth_dev_allocate(const char *name) { uint8_t port_id; struct rte_eth_dev *eth_dev; @@ -216,7 +216,6 @@ rte_eth_dev_allocate(const char *name, enum rte_eth_dev_type type) snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name); eth_dev->data->port_id = port_id; eth_dev->attached = DEV_ATTACHED; - eth_dev->dev_type = type; eth_dev_last_created_port = port_id; nb_ports++; return eth_dev; @@ -248,7 +247,7 @@ rte_eth_dev_pci_probe(struct rte_pci_driver *pci_drv, rte_eal_pci_device_name(&pci_dev->addr, ethdev_name, sizeof(ethdev_name)); - eth_dev = rte_eth_dev_allocate(ethdev_name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(ethdev_name); if (eth_dev == NULL) return -ENOMEM; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index d2718b5..f5bee39 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1603,17 +1603,6 @@ struct rte_eth_rxtx_callback { }; /** - * The eth device type. - */ -enum rte_eth_dev_type { - RTE_ETH_DEV_UNKNOWN, /**< unknown device type */ - RTE_ETH_DEV_PCI, - /**< Physical function and Virtual function of PCI devices */ - RTE_ETH_DEV_VIRTUAL, /**< non hardware device */ - RTE_ETH_DEV_MAX /**< max value of this enum */ -}; - -/** * @internal * The generic data structure associated with each ethernet device. * @@ -1643,7 +1632,6 @@ struct rte_eth_dev { */ struct rte_eth_rxtx_callback *pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT]; uint8_t attached; /**< Flag indicating the port is attached */ - enum rte_eth_dev_type dev_type; /**< Flag indicating the device type */ } __rte_cache_aligned; struct rte_eth_dev_sriov { @@ -1756,8 +1744,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name); * @return * - Slot in the rte_dev_devices array for a new device; */ -struct rte_eth_dev *rte_eth_dev_allocate(const char *name, - enum rte_eth_dev_type type); +struct rte_eth_dev *rte_eth_dev_allocate(const char *name); /** * @internal -- 2.7.4