From patchwork Thu Jun 16 14:06:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 13930 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 49AA5CBBC; Thu, 16 Jun 2016 16:07:22 +0200 (CEST) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0086.outbound.protection.outlook.com [65.55.169.86]) by dpdk.org (Postfix) with ESMTP id 5BC3CCBAC for ; Thu, 16 Jun 2016 16:07:19 +0200 (CEST) Received: from BN3PR0301CA0031.namprd03.prod.outlook.com (10.160.180.169) by CO2PR03MB2375.namprd03.prod.outlook.com (10.166.93.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Thu, 16 Jun 2016 14:07:17 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::188) by BN3PR0301CA0031.outlook.office365.com (2a01:111:e400:4000::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12 via Frontend Transport; Thu, 16 Jun 2016 14:07:17 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none; 6wind.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (TLS) id 15.1.511.7 via Frontend Transport; Thu, 16 Jun 2016 14:07:16 +0000 Received: from Tophie.ap.freescale.net (Tophie.ap.freescale.net [10.232.14.199]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u5GE6XoI026530; Thu, 16 Jun 2016 07:07:13 -0700 From: Shreyansh Jain To: CC: , , David Marchand Date: Thu, 16 Jun 2016 19:36:51 +0530 Message-ID: <1466086011-11920-18-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466086011-11920-1-git-send-email-shreyansh.jain@nxp.com> References: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> <1466086011-11920-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131105596370826901; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(189998001)(48376002)(69596002)(87936001)(2950100001)(76176999)(6806005)(36756003)(19580405001)(77096005)(19580395003)(110136002)(50986999)(229853001)(81166006)(92566002)(5003940100001)(104016004)(8676002)(81156014)(5008740100001)(2906002)(105606002)(50466002)(4326007)(106466001)(85426001)(2351001)(68736007)(47776003)(86362001)(5890100001)(575784001)(33646002)(8936002)(356003)(586003)(11100500001)(50226002)(97736004)(26583001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2375; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:NTUMjYiIbV+xo8Md80Sk+X0uzZU4CdhTzVd2VE0R0Kb2vYW0LjzDu4jCA3L1rYJawGs6KnpJ8Kqct4b7zajIX37JjpAYtEUakuQVHj03yKNoQbbUPg+zxhLrAk+TcRI52GdLs5OaQzpPe/IvqY2id8d95ns6JvyE8SEOG2j+9kuvWGIYd8XQlXBG3S9jq2sg6AvOPUBWbgnFQBhDSMSU5HrwK+AXoL+hvGmeIzJ5Iq7Qn8vSAIhy+ygYxPwndz9KOOciZZFduW7fjVbtxR7yjfRp09Eca3xZ2SCGTA/z2Pp2tnlge+wJAlpppH9WlPZZhVsVjT9ekwdjF1T/O3XdyKpuplXN+t87Ua/8elxrjyHan8bYXUYIxLIxfSgaVywSI5Ob/AvGgPwcBI/aqVacxWahfuULmJRR97Hv1s/cKxRfPuxUK7acMndfWjG4kOQkCOVoracDrTZ4GxDW1ZQK2tqoP46hj1BgPhU9EcR2DgHr0+YWxDsGKAOXTqgKr2Sg/BQRzQibL9tA1YgwDio+aZoFE+qPFBlFTFHBswejSZHxsS5ScG+lXd50abmjAdVHqEIFYvK1iuKXD81mibluYw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e0ee3d99-9865-4069-5534-08d395ef8634 X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2375; 2:jCOs4Yw3zgw3/tsDxMqQ5henYnIcx0k/TfxjC/RSAkNuJUKPZY+CCPtVITgtuJCl9MOLigmzv1ipgeolpxgeU+Qz6Acgojryr2AgLTD2+6ahjYujqo9Wc1GxuCdW/kU2em0pU+ZJVm1IExMg8Rva3ODFGmG13sQsZOEVSWnusOpa+JqefpCiTtjDOUE7H8G7; 3:UWaeQyqVBxAoC4JVECpPxLpsp+Mrn1E3G63jy9dpFzZ5qfZEiRiGHAxYWIN9p2r0DserFTe6fRojA1Zmj6eeg+J5unuqyn/ooxtaGLpK/3yyk+0cLclkZsE/wH275t2f8fz1tCjyuj/wQVebOkK7m3xG8vwLK40HnVMC6fZZE5yZinSHQW3em81s+37wgP6YZDH7y9OerJa9/sa4h9DQyeBVw7XFkfF3Fx+5d1yxkh8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR03MB2375; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2375; 25:E1Tlg6CnZ23hceS5cSV1ZjoN5oEjBxSvP5cvVCirRTkQUJPrt4+24W8L1985qCKaAIuIp20jdZsoBVgNsOMtRSYUv/vaxGg9gtmWpnFQbAPVGpWUsDTqmYvWwo5pG4OT5F7OXeK+V4BF9kVEX+FdTiiTO9kiflP94zWjcIUmd6fisRdFENfN5/uCzwpmKMrQDXrMqtw68s52ARNWvvod6/euhaLyF4CQkiW5Q7Mf0mGbSaU/KyLFB02KNiMCoFsBQ6p86vKsikSRVQpaVOGqwVnax8hfpSbzQFBqP4h5XW+ccF1SorzTE+j/Gvlu/QoRh9q+buUjuJCAPSFkhtkYatgy2IqnHOLrYKxAdHRXOwOQUHL3N5Tk+6FpkrdhAGi/YlI3qzkEwba9kFQDBKp7nkWq55uQaNbCOJIt3jbi+1L6eXfmi//mPnyvRSFroKgIJztfb4SOcmf0fVC3JYPzB9lOsMQ/F9Z53FhgBNWHLFKwyl5pBCMQqFIv4KovTfMyW8NxttwoupyN+9p996RN9Sjf/tgm4e7p7YJmEzyKNHPQI542IRhWWEQBMiCWaL002NmNCY4KkcXM7WqFJK5vEyIleDMBX732C8K04lOMZ731GRb61HOU+wm41En6lVhlbWZuJfxH89it+2V4TdHv37UIyFJHD6HSWJyHqF97U4QzeZOg9cr0YPD8pOdvwiEWknbJc3q2g8YgJSNuIi/wiZpB3dNJPdIG8LwMBwTA0xE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(13023025)(13017025)(13018025)(13015025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CO2PR03MB2375; BCL:0; PCL:0; RULEID:(400006); SRVR:CO2PR03MB2375; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2375; 4:XU1WG9YyIR0wf+SgGKa+V1kMFHFJn8UtZmAcoM2Yj3HYMryQiQ0bRUN/s4GZlHZl24DuCq9ehX1eg1MsZ0ux4vPsHPIezPVo+cUyLdAmMi4TBOd++z+zbmTt/rWsli39D41tKvgTKSZCh7A/2OSd3H5mOSYPvzqgbl7dbpCK4nbdmoDOoN8aThS9w9dk20oK+zxPxrf8zZAo0nDsde/Y9eZsRTtHG9KQ2D3ekaSCxTOOnGRmaLZe92pwEzfvzbp7s4VSFVbGoW3hJzH1ZNeY7M4ycjgBd0V5bsLVrREP7EIwsofb//1tAkEc/FlVtHAidp03gHcVX/9ubTKQlZWKO9zZ7DFXZz7XGWHU79LdcaB5vE89R9kFNu5rxE0jrgpL6kUFhdMiktSnHVzeju115MJFC/VUVm+GTn8hlDrspRUq0a9hDLF2OkqHoDlBM8fdzwPnZb6uF+hnsP9UzVARVk0WA9iXVwht30NjDolbpfE= X-Forefront-PRVS: 09752BC779 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2375; 23:zZvUlJVRAYx6vo9xwk7CqjmHufFvjbUlUoZCpkc9k?= =?us-ascii?Q?zITYM01FdO/G5WXKxDW2TkRiuGhNWtZioWcpAllbyOqY/Wy2n4ZgUWxubbEr?= =?us-ascii?Q?rJ08aNCWHOHBYv1CxQzMj/cfTsUXcO/5NZ/obOTHijrE0Nstfq2XRvQB0OxU?= =?us-ascii?Q?PsSq4q3ZE7q/QgKslTOGfH7kcWT9i2SeY4wJOe9Tm6J/Svus6yucdPsrYJg+?= =?us-ascii?Q?XRFYcq6tQO/EVEDskPyeNek3C/wmvcBvgoBBzmiu6rFEnOKbLUoB1J6s7NVA?= =?us-ascii?Q?YccdFargmBARjFeMLZ05/9+RX4nTNHb5mUTU+hs9J11qVotjBk+Obrl6w2ok?= =?us-ascii?Q?4CovPyitPwcc8ihn9Ar9WoTtqHoBYJPgpped8/fc1SzdK282yWhElc8rqGsu?= =?us-ascii?Q?5kdmtQCtcqoYDp1II1n6TfozSZMF9mMqdXBs7b0sE0iIxcseQYdaujqcNs7O?= =?us-ascii?Q?dkPyDwdWzOy+IRnzDxK+Pz56zat2JtkUy9CaWk03aYTHn8G5OnoPwIdIiAky?= =?us-ascii?Q?bIjJ6aSWLd5At/c76g0yJcG7ambhX9MYJP2nTA9W3m25CiXB3lgOGyD8d1Pd?= =?us-ascii?Q?7PR1OKf2xretBcDdZA3PtUTIJyl4R6cZafsjpDuqdH7Kc/MlOFxRIl936aEa?= =?us-ascii?Q?luKfYdnFX7QR1b1y7aGAEu3HGSk2aobFhdCpozfNsBO84bW+Djn9Q2eDym29?= =?us-ascii?Q?+QAAXOZ0Za3HCA0JGJqOWmwaikxyD5SiTLXbqYRHIhOFKpL2F32nzeuKX57e?= =?us-ascii?Q?9NklIKDaQ77pcgnXKm3ICEoCK8gOOeM4sVALM897kb+OHc0IVC1/FSMiVoHZ?= =?us-ascii?Q?feMENOCm6T9062EFmOCLjmZL+46xujVx8AtAz85T5gz3Ii0BuliHDk0LRcYK?= =?us-ascii?Q?Co0deuXKciQ0rA+WzFcUi3ZZhG3EVThiw2nEeJyF14XrJgazWqjm9aftpb1o?= =?us-ascii?Q?MuqFtpD927D0qT+mIhs0WlBPh6H0UHa8+rkjjyeh6Qx4aGQ3BgesFGMwvC6U?= =?us-ascii?Q?qKteP40sxJWkkOCDbDdxWjFrTMh199pFKdGLVlpaUIYWg+A3jT8+a6/BeWkH?= =?us-ascii?Q?bcomIo8qQaLugvw46oCx6GxcIIy6/3NnkMX1gbzQ0aQClMGWm4MguHiDCBQR?= =?us-ascii?Q?sdoXC9TfJcfmEXs23vkLyE8983nlkbsOyBD1QHIH9J35qQ+F8wbDneqd/OxT?= =?us-ascii?Q?KzeOTyPHH2WCgY2NHdOw/M3AerbHj2Bp+L26vxcQwpjNQUJa7U4yD/waA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2375; 6:aj5jCnqFoAmJoAweo2LsVHzDVKaZ+9XnlFOJk4yv4l5KDEpLH5yufXZrtia20zHgG24WHi/kOy3/iJhFGnJ/KkCYp0rEW4VEIs0cg03WHwY/8d24R5gxKHHq8VHBxsYV83PXqmf+wHY+ueOWMpp5HwXoUYHmbaAMEzoLQg1J113tQgY/iSJI+Vt07ZWmOi4ulMqx8I8nvY1Oz8ZLRwcbnuxw3GtgOVyfY03ykKzALvE1/FeL4Uf3klzz515YihEsszlMfZMNHi/ZfHwu4J6FZj5yBpOxYPI26kZaV9rakys=; 5:YitOXbjdt0FhYKzkLD0QnS2n4oDbT4cNvpyayD12xXd48ZFYs+aRCcMKH2bfr5Pl5ciFdoMUFr2cZEUy3G7ppFeSFwoJYXjpA84ZufN2VQ7xdVRHNM++khrCwFEAQapXWgh8hwUPyY8dEwZ7jLu9RfRGnE9vnKTX060wMl/iviQ=; 24:TFYj6jgX/cP9EYt8na1hjtEZ84e8TtBsu1ci97Mnb7ETmq6fYdEPxKoQ+nXpkw3itLKyOwNuRgJbmTYzPn33UUklByzW1yVpS2ZxyRzkhCw=; 7:rbhsJzzEU1uoMQ6siplYlpO7KUvGQGJUeCMgiPgMe/I6ahdN3A9/AH1EmnYpXCv2phLK15TVUV6HF5yO8aMQ6vhtr3NQzs+ASXi0vBr/yOQFnQo1+sk30I+6q712J7uDB6V4xVlLu3OnCgLxlZOc3kDDArswMBTixUP7vHb+yG4wdn7+EPruzFR9uQeeu8m6ikhhVxbpF/iEdyFTntQ2dQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2016 14:07:16.6926 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2375 Subject: [dpdk-dev] [PATCH v3 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: David Marchand 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 --- 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/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 +-------------- 15 files changed, 15 insertions(+), 51 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 f17bd7e..36ac102 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -648,7 +648,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 53df9fe..b858ee1 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 b594433..ba42c33 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5715,7 +5715,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 1989a37..f6399fc 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -519,7 +519,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 26e1424..9de556e 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 5e8e203..e6c74a6 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -514,7 +514,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 c98e234..2d00d04 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 b1783c3..b78d1cf 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 310cbef..4e99360 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -717,7 +717,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/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index 1adeb5b..72861d8 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -651,7 +651,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 7120bab..0933a5f 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 12d24ff..35ec7f3 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -185,7 +185,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; @@ -210,7 +210,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; @@ -242,7 +241,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 64d889e..92876e5 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1574,17 +1574,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. * @@ -1614,7 +1603,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 */ }; struct rte_eth_dev_sriov { @@ -1727,8 +1715,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