From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0045.outbound.protection.outlook.com [104.47.38.45]) by dpdk.org (Postfix) with ESMTP id CCE1D5962 for ; Mon, 1 Aug 2016 12:45:31 +0200 (CEST) Received: from DM2PR03CA0052.namprd03.prod.outlook.com (10.141.96.51) by SN1PR0301MB2061.namprd03.prod.outlook.com (10.163.226.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Mon, 1 Aug 2016 10:45:28 +0000 Received: from BN1AFFO11FD040.protection.gbl (2a01:111:f400:7c10::100) by DM2PR03CA0052.outlook.office365.com (2a01:111:e400:2428::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15 via Frontend Transport; Mon, 1 Aug 2016 10:45:29 +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 BN1AFFO11FD040.mail.protection.outlook.com (10.58.52.251) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.549.5 via Frontend Transport; Mon, 1 Aug 2016 10:45:29 +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 u71Aibjx018422; Mon, 1 Aug 2016 03:45:27 -0700 From: Shreyansh Jain To: CC: , , David Marchand Date: Mon, 1 Aug 2016 16:15:32 +0530 Message-ID: <1470048332-27318-18-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470048332-27318-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1470048332-27318-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131145219301378895; (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)(1110001)(1109001)(339900001)(199003)(189002)(7846002)(97736004)(76176999)(11100500001)(68736007)(575784001)(50986999)(2950100001)(4326007)(2906002)(305945005)(110136002)(86362001)(92566002)(85426001)(356003)(47776003)(5890100001)(77096005)(48376002)(104016004)(105606002)(229853001)(19580405001)(19580395003)(33646002)(8936002)(2351001)(81156014)(106466001)(81166006)(5003940100001)(8676002)(189998001)(36756003)(50226002)(50466002)(586003)(87936001)(26583001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2061; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD040; 1:aYAglRuUl6exntvan4k0aSGUTjeAbyfOMC0CCBOXmQuQ0xTdoByZepgrzKLJIO8tesfZRAlIARLwbxa/0ehEcuvPtrEvDmDeWX9SxSFWRIb6LTvHijn0L9RcB1/JuJOZi6fn0XUEYgFM6wZCheeheG+rnFFOXxD4hjGZWRJ3aA4xQHTNQruIhueOQ9WRcO/RhfhCk/V+oWI3Ux5YheAIFzBpl1h2b38Kas1QTFmjuCwKuBEc9mIUT//14CWLRWstG9rc9/FGjhhLzI2+SaRxC0xQTDK78Fl+1SDtsnw3rhUftL4M+tjXOWnXsEi1p4re0LXDO5fEHpAR1w4l8/Xq+27XbaG7yl6qn4uhyrpDiNfw1WN0nJ+s6HBbQtr2uxbmrd8Iz/PCiRbpbfh2AFXjRI3sumD3ToqoDKHPG05dBJfHOychIAbEEnEGivsMvx6elquenrmm+pZndreeA3nvC9SaIhscAPhJ3eKTrtAZ/HKLzUhORT+cJrKBb98DvPjY+4Eb73nJIXXVfyyM1Q9tLQTk1jiPGQwOHxjPOeuWbIwYV3nxY96drnGiNVIC+KmHJIicUN24RHdeoHsCmGYpUuEf6Pts1FSH7aciQbZgKb8NuTZqqFEryb2wZgZ6Thar MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 51b7c870-6a3b-48db-a9ee-08d3b9f8f4e7 X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2061; 2:DApD+5exhDgWA3TbCcItuHI06rMVXigNV1HtW/5QolXjBUG8TsZAa428RHJX6YFD7U1gkBcmd2y/ET4ivexsN0atJpw6QhG0J4zWEm/jmCmUpNP/LgOEI6lE743sbRqokw7owA7iwxWIYmE1zqhyFGNVyeQDT2GR2sHqX7/XRqK0HdfLfjUfSREuQ2JoGzUV; 3:3x+WdFdjo9nsZ44P9/IVZUp+KXz3oihCSudiF/DJDKXdkTGfRjzvsRzOtpYbuNuR426I7Tyl1F7XKgwStl4T7wLPgSetX301CaAShBv3omAIesYpJ2biqI2uhCRN0BWb8i2rgnaywEY/nZdk+7XL1bvsyxVSu6W0c645B3CZp0yMZmKP7F2PBXxiZBOAd2I2Aoubb/7k6qxgBqjkbhao3ZXqFjk0twSrCuIYo0ITKwc=; 25:fjaHjWbPFyFX6tBJev8mRfJ0kBbjHheMkvWBS2Q13FSJ4325mXoQbAAOP6o7Pst7OG8C6wPZDlF1jOyWfQ67u8jLxr7fslmCI6BCau652VucyGse8iCpjkbiQ9bLLELx70qF89z8aWh4T5+W0cxXo1h5zCl5/w8X3p59fGJyp2fg+JwcghGP6kooFqv0Kr3qf52TtVPm74dUp9pABQlHsxFjHenppBfyg4PpN0i2QhsGiEetqzk37qkIlAYq95H4Pzg9VB8f1a0ueM4rbyqM2BF+lZHBdRUUSfhkBn7Lwkbb9LKVFE03DsButR9OTGNUiC9YM9SVaId1f6kE5GXqqdHBkN6YVXvRvma0Z6ZfTephNtUS/W7IfIk3JJhd6VYC73PJF5nt/Exj3ivse5O0FnYADH4jer+XsDaufVEQEYM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB2061; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2061; 31:LWjJLa35GvSDw2oMyI3Tdx72UUEDzt3+Tj08YtFUBwF3Bz32x/EFqyGCeMF20N2ZNnFTAmtvhfOfmd+xpmNRImc3B8HUrXMKrFtU9SGuGdd/H/awZP7tIoYd0TSwLD/dZTrGSsY+2ewXNbhwvwKnEJX13BF/fHEWI5BZkAGgmFL6uENkNcDkzfZzdygeNIs+gONHhRXa20dsLJ0flSFctg==; 4:OtEkr7eZVvVdFtoDAtYDRi3NStYtJlGv72KOv5YDUNNN0Wj2bO0eDN1MYDaTOjRb4cn744Do1PFrC1quyKbBOp90GMlRSSX8ce+i1Q6RDOed2F7NppoRWlCIwaENdaLR1q/xri4ENEZk30doQ/21TSrsItkF2Z11u7AHH5vOuqN17WA2kNLyHBTLIbe5Dk3/OYGa3pIpsShP0fkOqRxpztrMVze1ZWc1Mc/zIBo58uROcOpIUd5nI4J9LupHC+WC7sIdqFx0cZv6OHqCd5rUO9b79kYo9ved93BDyhh1AcyDup6/eqsmsU+69N9OqB9h0dy+1i7N7BfU1WR7PdcMO4ucRE7F2MJ4ipajQCr2/gnzyI9zbcEk6g3rV72dNQhPP619PAjh8z+b47KDSjA7ElfJLJh7ZcRuOK/kd9aj9OU4k+FYnHx54U3hE4LECBtPDDTxetRtyYydre6Vf3ZYiQ2+8iwQGHXFG+0NbwIsSmPCSqpVVNZHIe93eFg8JTvYsysTb1KPl8SbniygnyrGpQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13018025)(8121501046)(13024025)(13023025)(13015025)(13017025)(5005006)(10201501046)(3002001)(6055026); SRVR:SN1PR0301MB2061; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB2061; X-Forefront-PRVS: 0021920B5A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB2061; 23:ESzbuQqyfXdEbZ6/Pxuh0lR9Pt1ZPKnH7FciJwy?= =?us-ascii?Q?050Biy0E3yviQXq4rUL6K0TxVJ43DFDItnFRU0YPq1HxCLrPw13wnyiPSnfG?= =?us-ascii?Q?LH6FUHVu2Dv/jWOVQr+VpJxl56GRQqdeKLM3GtBQAlWqsS7jxJgDtV6Ks+pu?= =?us-ascii?Q?zwDz2epD1EgECDdLvLSingqCRZJ2w8aFOafplrwZ03bCSa4u4x6S6f0hrhtz?= =?us-ascii?Q?AryNsgrmWcnN1tYHiez08XYlyhY+K821ytK/f/TjLZTkaJOeWmxQJXDeBfxo?= =?us-ascii?Q?LTUJD39bE2U34GNBswih3Vcu2BunbBG4hZ3Ez0Nwdr9q/EWWMjINC/yiBiaQ?= =?us-ascii?Q?pnSjkfD9YDFrBvMyCjCNAONKpDwFVoYkaj+dn0B7rr8nLh+hIZQvmm+rBmLD?= =?us-ascii?Q?QKjmxu3Dek0G+SuUZCDoJk65A5Bc4GhQvXAdxI+fa+E8iWpVH9pKN6WDZmZK?= =?us-ascii?Q?PENw7jwlgu96iI7cO3yIga3PeuquxgGc+nADmIshc7JUTXn95cnNOzPKQh5F?= =?us-ascii?Q?P+QJkAFSE9+Ipe9eDHDXrpoZQJuR/AyQBb7MvaSjcBcG7ZCfF1pS4F6e3mWK?= =?us-ascii?Q?M7yqis3eEf0izSoJpGkzUnnRfIZLxl35BRP+GoNDYOLXlRE/oazVWbCBols3?= =?us-ascii?Q?k7xUX1LLEodtsbGwC1EF6cMU0sHy5M1SVU3CBnwGSoZoY4bwndW3dG+lROlD?= =?us-ascii?Q?uMM8L8YLLpIRsc3H5eWLN6cnLWSyy6zyZJBA67gyUkg8z67qG85onDW0HDuC?= =?us-ascii?Q?W4s/XSYh8p3aAfPp55gDlGTXz5Z2a0N5VE/y0OhWoGvghg1cIn2HrFSZyZKl?= =?us-ascii?Q?d1tiY0cZW3JNTLRPRHuAyNnW0GxMNtVfHqOXXQkGyV4/YjrQusJTzE2emtUP?= =?us-ascii?Q?P8nctkdS1Y3lh0kQXse0kemmfYGZrEjUwlXgZ3CMQfKevr1ltZDuIR3V17hG?= =?us-ascii?Q?aLhJ5MTZM3pMWYDlphCPQxriPlXhODt6/bZcmaqOmMT20yd1KrTY2/0GeuCV?= =?us-ascii?Q?uX71ijepbXkE0EZSwcWHLBa4WbTy+2SEPtAzlom739XSWhWD8rJl6cAJ9ET4?= =?us-ascii?Q?jJnyVsmAatCnYNi6t50RsfjESlUrmz4cQXz0h84aIsEvacEPWX+V8HIasQcr?= =?us-ascii?Q?eXlSM7Rl1Q09s5YUNL92I77B8xvjdhaFdADoct+zCf/PiAUt2LOeoYg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2061; 6:psl6WVy8H62Etdspo/25dVYwTgyF+mAK2PVel+lEcPdcWIt6zpocfXVnw5YCNlrEnltANdDvOqPbNeXvxylOIw5LQKHh7YNPV1oJwjKIeVaDpYu7/b15CPl4w9geozUv1qnkm6JHjuwpOY3V9gtOxnxcEPFxb3nqD/iup53QZjvyPsNZaAtPYvIWnhjVVkkrrbsD3MsOQ/gdCaX40WMcHq/dsVNPgpM/qPy+tPoSwgdVJ2DKu6vOQQEPc94741YdDKisZEAxlrahDAuHfzvE/WbLGAWr3OAtqJ/CQzbyqQE=; 5:0yD9lW+ms8no1Aaa+mar7QE89y/OUQjYdeT3gdp8Oi2l/1onVEQrHBLICC7hbYD7EZlsMvKyNrhStvD/rbpCCCOQMG0ZrihjZRrKSQAohEAzzom6w136VNV+ixePyGSacU6cZ8V0g1KsTIECWRazqznKq/ICbpRf9GXFdYu1asI=; 24:IHiJUnIVZsuIHw4Kq7Di2kUwdhlPXXMjtmmON9MZf7ozgpsZt2+87Zb52stt3rld/j4CkQmIxN5RonT+22DQys0LI4SWBcI8DQ00SJk+fFA=; 7:/HY8j2NY9rzi3Q8QjMcDOmF2OKEHP1DW9y14OJZW9omx87i/ixLnWkkHpTrYsAJoT8s2hA2RZKfFNqnmmqBWMOtYkb6n86D38afo9dQOBuIvya1GTI15seIWV9GtnGk68XH2Vb3HGvbMFYz1pbzI72Xd4QS1bosuSs5LHEouWD3TdBKhhkNCqqByRtGOnzhJXB6Z+obZyzIyLgEpiwD2FjAawPeX4s06VwBx3GIk2aefNJmJ90qiEX25+IUhIaNL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2016 10:45:29.9506 (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: SN1PR0301MB2061 Subject: [dpdk-dev] [PATCH v7 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: Mon, 01 Aug 2016 10:45:33 -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 daef09b..aadfdc0 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 86c9d1a..cf38f32 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 b005c1b..2a697ec 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