From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0082.outbound.protection.outlook.com [157.56.110.82]) by dpdk.org (Postfix) with ESMTP id 04486C354 for ; Tue, 21 Jun 2016 14:03:22 +0200 (CEST) Received: from DM2PR03CA0043.namprd03.prod.outlook.com (10.141.96.42) by SN2PR03MB2383.namprd03.prod.outlook.com (10.166.210.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Tue, 21 Jun 2016 12:03:19 +0000 Received: from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::115) by DM2PR03CA0043.outlook.office365.com (2a01:111:e400:2428::42) 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; Tue, 21 Jun 2016 12:03:19 +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 BL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) with Microsoft SMTP Server (TLS) id 15.1.511.7 via Frontend Transport; Tue, 21 Jun 2016 12:03:18 +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 u5LC2TDY004076; Tue, 21 Jun 2016 05:03:16 -0700 From: Shreyansh Jain To: CC: , Date: Tue, 21 Jun 2016 17:32:46 +0530 Message-ID: <1466510566-9240-18-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> References: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131109841991986004; (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)(1110001)(1109001)(339900001)(199003)(189002)(97736004)(50226002)(33646002)(85426001)(50986999)(48376002)(189998001)(87936001)(8936002)(76176999)(110136002)(5003940100001)(92566002)(7846002)(2906002)(104016004)(4326007)(6806005)(36756003)(575784001)(11100500001)(105606002)(86362001)(586003)(50466002)(229853001)(2351001)(8676002)(77096005)(81156014)(356003)(19580405001)(19580395003)(2950100001)(81166006)(47776003)(68736007)(69596002)(5890100001)(106466001)(26583001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2383; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC007; 1:gSy7D3BCGW+JyQwvvPJ/kzHguW8DGXQGvo74imBe5h899wnp2q8+FxRFv/TAS4sv9HxD+QDselXen8ZLeTrtDQn5R73ivLh5e13KkxIlcK1h8tDRFe1ZygzPYv+cwwL4rBrcL0XbJPbclImAd2EDBMvKNfLNtKpCAZfo0AKETrzjI4dJ1c722c+iG+yXgoUwUby0VHwp8HbXIM1QpjN+kT2C9huhP4sCCuMWT0Le3AiVJ6xzzk+OKcvDPRu0T/Y4i6SYJZWFlpgRzUNYTmFX/GVnmZ0fTc854HLYQMPdNbcGyILOK2QylBoDScfZccQgCVt13wjmFLbJzJk2+dwVKZT+P8wycSHPg37qythrMrAxY6CHxKEUhCpAQhaiDVyIOUHYuhwv50RZl9kMYf3VMSe/NMpRO8dSEvnnWA9DzED5YHzOCaIW5qxx1Ox1LHduKVrMuRQehM+x2WE3+bZiXjAq5OS+kSwb+K1Ey1yM+BoqTbng5kOI8z+hnyaRcWb80ZcQxoLLHeBDxOT0siNAe8zOFku2Zh3+3Q30trn6suC+klbfi0PJBOWXKpHn6oWXREztI2eLxpQvXvrDq7TQGg== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 967f2a34-54eb-4b93-6b54-08d399cc08f4 X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2383; 2:ex/zjYVSy/aQAnievqBAPNsCirxD447xXabKMJg+sKxKpuS65GdIei5UIMi4lrIlvjwRGIxVLMN0BDIiDtnAUuE+hgJPPOpXzPB3HPNuQrHXq7nnTMmzVkVzEv/PqBHXDgwA8VdwlHpvrQtJ//zSarOig9JyjtlUoFzwBhJxp/qGUBv5XEuMhkZEojJ7OJZD; 3:zIKKMQ2F+Ku4mS/ur4nRqXfpL2ON2ycvFeFwWAst6k/i9JEKspYog93GZ1MvqCEPbKGqFjp+GB7ChnRP55VA+707k+nFzPNNi/BtcSIHZW+ZLYvc4Hqe3CzNVw7N4PuGGZUjUmpIIlJuhkL8Rs1uUX9BoHlabtqSVFAAss+8eGwBjT4KXYZkUVyRmGUPYrQyHsnPMtpETKXYCgaEiO8G9qjA+Gy1+llnb0nKjbvrJpw=; 25:HmxsNdzFoaAd1ZDlE8blKFox62Ehf9CGGwF3MfmndqLcMHFLV22mVYT4g+0JTrRy183Tj3b4ANMdXIAGoxhb8M0nSFAncVX4tSAFRbeSaWvQcHnGa5Msw8e9QwnVY2j7DMaurO8tfIee1nFDb+emqauuVuI97LDBJZ3XawfBwEBB9g62N7vJGZ8moZn5BXUXjW/Y/kTcL7/qIgyHKbKApbTYiVatUo4lmj0yTte/Go1z+zKyvpaVz9SdzcGgy5hhQ9RRV6OdS6BNyRlOaQq2xS37U226MOt/KLkHuAYBiVnP8RmdHeZzcXprdYPx8nabgNm2e00Zg+dJno6gRB+acE24mxDvOGJN2nV8AYAalZcuk9shFOg03LyDJCwEFHrTiucTPjpo0M23buSmmThBwdMymS3JXgj2OcQMoIjF170= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN2PR03MB2383; 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)(13024025)(13018025)(13023025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN2PR03MB2383; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2383; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2383; 4:cJYBn30WSSGB0kq3YZLDwpfEwNtDxxadmu3/N/jfVQ98x/eVwd4jGiVqSFs4SNwnOmW72tpFsgL9GBqdFcWuZ6E3boJ00VuiukrODmEkB7ZYHI72UM9aew9JPgXjS406L4dAJ2Zvt0aDU45scKO9Os6Ys9yYqO9mXnfS+nEmiiFIdgFwj6UnIZJ8QD4S7/zZyk8ZkqclaE2TUEENzJvysSfIinOvP+ohLkIcq4NsmAl6rt6fngO9Y7F8CMGbcsjz74BJ3N7VKNrRLKVQUtoutPoILSqBNYnhznDfZo+0nDMGr+e5z2DTc/L/5GPtCynQamdBQzYvBvX6A7uijUbm9poBKgKKVeAV6PvbjfRu0YPwc7cYgt/Hbv8L1fYcPZxEC8Rmlz+X9xuY5BuOsxAjvD9NZxlEMj3eYVk5PGrnA4q2PWgZ4jq+LCmC6c4iiU/QiDKoMwkAjBBA2JhK+XtZXTXd/EvrncKk9k8KGV5fAARj6E5EjTQO85eouk3F8ie5Y1v6qRMmD50DPtR+3qPybQ== X-Forefront-PRVS: 098076C36C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2383; 23:7pWRpqRQg5Hw5/D9vi7pCdUF7vlidj/xmDAiF2L/W?= =?us-ascii?Q?Atpi3TC5ZHwZ3tbP/wDL3FG4xAvZlhWAl+t6bIL8azsj06XZ/gBLG9149SjF?= =?us-ascii?Q?zOP09eeZOYoQgP8ZXk27QaRxGpD10F24CigQ63tMLfV4t1PEzmolg4eqAyOJ?= =?us-ascii?Q?4QHuA42US9ebZGdmILngOQpjGlsvGpThOHyCA4HvQVqbmE5D6qNOvkwr6cul?= =?us-ascii?Q?tXdeA7jVw/GEg0fN/a92oCrZpJYnvWGLlQtu2/gtQOlBkY6DAyCvzJQOZu1I?= =?us-ascii?Q?tdekIQsYHjICLFd8vLXXxnOcXEGk5YAD6buOFNH/LZge5+CKZLvBys78yNYN?= =?us-ascii?Q?d3la4f0HYZBG7m6UOhcfWDK3a6I549KTe9TtaL+SFJr78vj5rviRuiMHO6sH?= =?us-ascii?Q?NfYYMJwbYVLyOax3OgzvBWk6APnCTB/G9uX9axmcKVNMFHS+7/4sfHSyJGZm?= =?us-ascii?Q?DzlDdmzi1erSt5k3oXguqFzaQ6JUDOx7+AIsjaSC9BPV01iuYLoq3UsYWsoj?= =?us-ascii?Q?aFX5h4gTxmYG69n3+YYI8BvLK7rGBdIC+E5ZBGz6eE1KavP+zv0z5CiDmJzv?= =?us-ascii?Q?JPCXlpGKVSTNiBdcuRyQxneQRNnFfjfuqZVqKLbV41dKGExffbGYJ84aVsYV?= =?us-ascii?Q?Cv1XDy6EGMGzJsvXtyhtQabaht6OcU6zszc3OCYhR3gtlm/J3IhQecYt+l9I?= =?us-ascii?Q?m2mn/NA2kJgnIGYyY8St87b9QEmXdby67p00IrEDyi0yQCisrWBT17jqGmP+?= =?us-ascii?Q?J8+2lariQvtXuJrzAttLal7w8jhft/JkgLwdNrfoEAE/roMgkgG0UHkBNHis?= =?us-ascii?Q?iMe9wA3tzDUhHMlTpgEsNOgVKl2Xbo0SChxJXfztFke9OzNLGtftJrXmFC9Q?= =?us-ascii?Q?JQUP62CvqxlAvy3APPb/JKsqK+Xt+WzyoENvNPFhfzYTLlOcZax60ksGmtt7?= =?us-ascii?Q?i+FARQF1OHvTFB5pcpMsWQpb9b0TNX9UpQzgxNRuPPHAL+dylvVV6Z6fklLv?= =?us-ascii?Q?x130ZyZlhPNwzax0Ygigqlr1KyAXxGd15KWe+TDRnknR6Dwn2SJpTfdyDUbO?= =?us-ascii?Q?NvI3IOJjQ+hMBerZ1wYPZ4odl39l5YS/81YZfsuKl4pom2ISdnol+PT99rYO?= =?us-ascii?Q?mIvHgN2xXNE04SEBrEqMRpyn1J7iVZBCEPicBpDTV1q58PPXIHnMmY7o4tmN?= =?us-ascii?Q?mM61rMpFqv3gcY=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2383; 6:ETOcaPpxFGvP2NYLw/fQSy65hhJxBIPX6yEevDyj8MmJ3AwOz+TSZQ4a4F6IQdr2SOTYO7zXRspxCxu5Y28Xw8i76/zNQOryhLCFjD92BBPKbw4BrP3aglH1mew/dO4UgE/ah1lWPhkX4R29bemlF243pC+SR9qblIjHcQQbPi1SAMj6rUThU9qRIjapj/vYpKuA1hzMabe3sZKnBC6yVVhpRQ+YxguVEQoYFWd4c5ka7nNTVD7+xyuxP94S6eZFc0U/Zl/6DqJKZOuHl6xLJbIKBENTK4E+f9QZFGhUv/I=; 5:dB+xCPufMPvC5gQzPA3Q/8URTDT0v9EOInl+TadYrL10dJBHbBT/5IHEkcCbjy+c3A40SFfbnWuwr+7wIMi75blk9S6acWf7IJgyHX/Ds6Om+KVWpicAyEOiAzsr7h5TlNfiKLTqU07XN8m26e4Pa9+gGS4s9aD8qAQCjw3qARQ=; 24:x4Ho+6nGvLh9nz933IrdMbpHGEAX0Eg4F8Ioxdr8U+EpRfxGLGHoRQUXxVv1bpUzN2nepqhF/FzQZhvrRceRLc0zV0kceXl/oj7z8xHNOt4=; 7:uc1WeBYlzc67lK8n7gZqNML4BgzZFZiEA/lBdPmKIljqQ7OdLLj3zSei6tc5XBhkAkZMZcn9prTKYU5mmmniLhcIRDRI2+gcECNBTBWosBfe864mgXiAW2LeAdRRAmopCD7TjYdGri6j+ng607WZtQa13OkMGKub5+PaKWcuErDB3hxdHEYGaeulMZ6Z0H6zhXCQJbF/jmeUKTbbEIa5BpZMIJhIArR1l6V2yBLIdVqLoUSpxRyvc6HhQBPJX1TT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 12:03:18.9646 (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: SN2PR03MB2383 Subject: [dpdk-dev] [PATCH v4 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, 21 Jun 2016 12:03:22 -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/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 28604ca..f8c3d71 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 ffd24e4..921dfa0 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1594,17 +1594,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. * @@ -1634,7 +1623,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 { @@ -1747,8 +1735,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