From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0081.outbound.protection.outlook.com [104.47.42.81]) by dpdk.org (Postfix) with ESMTP id 97D948DAE for ; Tue, 20 Sep 2016 14:42:47 +0200 (CEST) Received: from BN6PR03CA0067.namprd03.prod.outlook.com (10.173.137.29) by SN1PR0301MB2015.namprd03.prod.outlook.com (10.163.225.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Tue, 20 Sep 2016 12:42:46 +0000 Received: from BN1AFFO11FD011.protection.gbl (2a01:111:f400:7c10::134) by BN6PR03CA0067.outlook.office365.com (2603:10b6:404:4c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8 via Frontend Transport; Tue, 20 Sep 2016 12:42:46 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; 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 BN1AFFO11FD011.mail.protection.outlook.com (10.58.52.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Tue, 20 Sep 2016 12:42:46 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u8KCexsg006559; Tue, 20 Sep 2016 05:42:43 -0700 From: Shreyansh Jain To: CC: , David Marchand , , Thomas Monjalon , Shreyansh Jain Date: Tue, 20 Sep 2016 18:11:26 +0530 Message-ID: <1474375296-26078-15-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474375296-26078-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1474375296-26078-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131188489662780215; (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)(199003)(189002)(76176999)(5890100001)(81156014)(81166006)(50986999)(626004)(92566002)(189998001)(8676002)(48376002)(50226002)(50466002)(68736007)(97736004)(19580395003)(586003)(5003940100001)(19580405001)(2906002)(87936001)(5660300001)(2950100001)(7846002)(4326007)(356003)(47776003)(305945005)(8666005)(36756003)(8936002)(77096005)(33646002)(86362001)(104016004)(105606002)(106466001)(85426001)(2351001)(229853001)(575784001)(110136003)(11100500001)(26583001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2015; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD011; 1:rlGnEyVb1QJN+sat/StkOq04fKT59WYs6nBmI0YtSOWUxEWjMiTiwVTdMflqzzch79Ku0d5xQ+1OoI39QTx17bVugQROHOe87UKcP8SdTrFVUXllYodxbD88pA/qVb1sV1HOhmhAI6DB9VVT6Wf21cHIFKCywQEdLJlPORE9fwzJfz+Zl2HOWxZeTHh5VSoU/o0JJsd66JAfzaLAuHpvikfzXn+hn4d+YgCEHBZVnqRysJpaE2tGc8Gdl+MTKQh/kgMjPIKMKL+4Kx+dghXPcgaFma+kHGWjQLovukRmj29DeBxOW2lCteAf474St0wUdNYBNS9Q64HhmX+bK6y8MNxy4w0vSvp6Ug9kTOOC5DuSyr9I1a2Wk3xDvBg2qT+ZTjIhi3cmPum9nMjg15nihXcFo0UFD8RNDpGIxJgPkORn9PDzS4ERO+eMuEMTO5gPd51Qe/NgSMYFdQwj8kmaBZyioRRTFYlMTTE8hlvvyhJcxu1qE5IblEI0yQqJaPJGe9wQJhkav5hI6HWR4pxajus4uniUvf3Pqdo9RR2hQdok1pgAw6PEWtgrMoWts8sn+58Y6d6t3t/6KCHTzl+DB9G99krBw1JcbQM8AdlC3ZWawifb6bVny9/B303yHmCoaPoRgqda7Ey+DFY4Gzx9iazUyJsRCIKBzraacnzAiwCGirHoV2h4HVuJksTbhLtQolCObZFSsX4BcoVO4rnrCTtpFIBlohbIzuM3WfS/Hxg= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b54c1aad-b306-4543-f1d8-08d3e1539f6c X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2015; 2:3+RFkkcDI/XJNiKzu1AWSvuFEB4g0slcv/O0ruP/CDEffqg1uW2Cpe6ywyAPimSq7ngCW5q9r7I0GJZvGIllFCR1aoITglIFdZBlJkIx3fXxXwdQmPDqmhjwJmIVvD3pyMqEm9CRlismBaQ+ThOUFlHGqsvr2JvvG2M7cvCZSoPh3xtu6QuRp6uqeeh8frAe; 3:skBq9Rz7mPSP5GfRcDfj+ibGr7GyNTFCLQeu0d9nXuY/zXZ6iicH5LgT3xubBvff/Mm0Zr0HhglYVa14gIX8k7mpDfejRtjjJ5KoAJOSsx4iMse/d4cwDYBDb8CvT/1OQOl1MUX//letTl6luaEoVNPEr+OP/hkF2Loqi3dvE7VSy2+3aag2UY/HULlSQhGJ6RbTu1z9E8LnY6WzfF1VXfCpz5E+i3GXw+7vDW4AvgY=; 25:aJkzOKi7LO13a+UVbh/BroDhFHPgUrH0D4818V+0Ur1/jsz2BdXQzZhEKWYji7iUIEdv0AMn6FIO8glYjqiO0yydO4jHBGdRDFhhHCUq7xLJ7YXFx5yhpYWs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Kvugq6HeKEmjEPKh6s8AnIRvAND6C1h3xJdwKeQMJTQvfm2Y6okQfRukSp9l/di5Yxgt00hunZC8c+xeKE0JKk5QboSNxscHhwG8LvcC5dTZ3ioQxmo0lnU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13018025)(13024025)(13017025)(13015025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:SN1PR0301MB2015; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB2015; X-Forefront-PRVS: 0071BFA85B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB2015; 23:1dSiLcU/shbs2CWYHk8UPnY0ZMkDj/NcrmOceST?= =?us-ascii?Q?DbvgSJ77j335SPP4UaFeIT1mnZhlH8U4CrcwfYdw1fknMS2/4kYgbIM2BFvJ?= =?us-ascii?Q?70Kk5UNFfHeUaSVgK5cGk3S8RXwYqwmVTIMg6lfQTHSLDSoy4pd54fR8ptv5?= =?us-ascii?Q?Uy1bjPlKBjhy401v69mYbOftnxoer36jdGiOPhSYR67jcfzaSV1qJpZGVfWm?= =?us-ascii?Q?E+1+2QsxuTU2BU9kOk4REI2w4KwxfZwBXkitKKqZiwfiJsuWloU53KwBQkRq?= =?us-ascii?Q?XRe0TadCnc/JZY1Lrc2mPUHnvPjWk3cCgM+GAfEQS111a0fLrU6A1WY2iNzy?= =?us-ascii?Q?NbNXXc1QsqODLB9sCoGyl/VK8GmP1/oq49G92wNxTTbfCLJRo46GOCY/6uTQ?= =?us-ascii?Q?ZCJYsJACWitPG+6odcRAAyieuCH+AKBkgHRBBokPkK0OXJEYYdxHxXisChCz?= =?us-ascii?Q?2zc+yz+hfYf4hVQr6EV8hxNHBX3/cGIAYJjsXdWesRPnDs3QXxjKLdG5Y+13?= =?us-ascii?Q?fgSs3AXARNtO2A97LgDqiiRVGj/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bJGlC+STE+V4Fi9r6Gs2NfMmjVOZdoyrQvLR4Mc3EyLNXvYVypB+JfyqLD/36GNIWS7fL3+FvfoKwdlYax5KLXjPQ0ARGbGRT4AmWcIMvhNsm+KwYLYwb1Bgnw1TuYwEMvozyNzvqkAnM=; 5:b9KLGnC7PLgG4UddMD/js7oL7qG2DhOO4fLxNwCh8tzZbEcAGnJx54WH5vFgw5LtCjvED1cmlblkQBBtTbwnm/SPys0x4tLP1tCSDqS2YKOgCoufx1qUwwNYOSsYoE358vTaop3bG4fRGKk5srVSgljquOGo5k08dN3sjrLQ+4w=; 24:puaIxYJLON2f7AO2hxD46c2rWTx3v/5mESb3U2iEqamzmALgmUlPJMgM9ZZXHSWtdYnQQK/HWnDHA34kBYnZ8PQzIGodo06QnxMw6Rpfqig=; 7:g4vnGSuZOIa1h/agnpy4Nsn6Lr7NpZM/T3M8eBH0t3FtyTCuCHkjky/OQlE0OhW2gqwe8MCGBv2thTTgBfDGOx+laUid8TwGnDUzjMg0Btx6D3dcSQSpD3FiOwxcnpPNO/h78TZirB0wrhGDFE/4XqDfps6dsvLuzrFBIexc2ZYkZsVGbLTunY0YMqCBJ2IlS3n1TWzFfz3j1GvlQ2NzK/v0vm+n+x9mV9u2WY3W64CvC3XjW5n0VNVgvgmltZ1Wexiw7aEzFOxQ1B+dXaZjza78DiSgl1rjXqtbhBPWmhaqY4vye0iutaAkYFkI6wot SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2016 12:42:46.0752 (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: SN1PR0301MB2015 Subject: [dpdk-dev] [PATCH v11 14/24] 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, 20 Sep 2016 12:42:48 -0000 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 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 efc5db6..93ae2d7 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 18da84a..6efea24 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5803,7 +5803,7 @@ mlx4_pci_probe(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 4eaabcd..f1de40a 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -617,7 +617,7 @@ mlx5_pci_probe(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 6fe1c55..66b43ec 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 29e5954..42ec107 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 b7a3b03..418fc52 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 5d2580a..b90684c 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 80c3f4c..d0bffbd 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 8077f2e..c682d8f 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 8cb26ce..2ffa54c 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 4f54952..cc2f921 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -190,7 +190,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; @@ -215,7 +215,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; @@ -247,7 +246,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 a7ba1f0..e9aca17 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1606,17 +1606,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. * @@ -1646,7 +1635,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 { @@ -1760,8 +1748,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