From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0056.outbound.protection.outlook.com [104.47.33.56]) by dpdk.org (Postfix) with ESMTP id 63512567A for ; Tue, 13 Dec 2016 14:35:19 +0100 (CET) Received: from CY4PR03CA0006.namprd03.prod.outlook.com (10.168.162.16) by DM5PR03MB2476.namprd03.prod.outlook.com (10.168.233.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Tue, 13 Dec 2016 13:35:16 +0000 Received: from BY2FFO11FD002.protection.gbl (2a01:111:f400:7c0c::128) by CY4PR03CA0006.outlook.office365.com (2603:10b6:903:33::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8 via Frontend Transport; Tue, 13 Dec 2016 13:35:16 +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 BY2FFO11FD002.mail.protection.outlook.com (10.1.14.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.761.6 via Frontend Transport; Tue, 13 Dec 2016 13:35:16 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:783; Count:10 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uBDDYRwF005048; Tue, 13 Dec 2016 06:35:12 -0700 From: Shreyansh Jain To: , CC: , , , Shreyansh Jain Date: Tue, 13 Dec 2016 19:07:11 +0530 Message-ID: <1481636232-2300-12-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> References: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131261097163802191; (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)(336005)(7916002)(39860400002)(39410400002)(39400400002)(39850400002)(39840400002)(39380400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(189998001)(2950100002)(47776003)(38730400001)(97736004)(5660300001)(104016004)(5001770100001)(77096006)(68736007)(8676002)(8936002)(305945005)(81156014)(81166006)(356003)(8666005)(33646002)(36756003)(86362001)(4326007)(50466002)(2906002)(575784001)(50226002)(48376002)(85426001)(106466001)(626004)(5003940100001)(105606002)(50986999)(92566002)(76176999)(7059030)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2476; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD002; 1:QPc1w7lrOgvpeTtwKzfF1Cb9CR+PfjZ4qgPOWZNoWDVSMwL9jQKHYv7N+eQQes7eQEzIkLlrG7Ztr5Xiit7JRBXhugPHul0usyMTllV7Zc1JnO0kSLkzQQeBRG0xLwSAjg19Onu+6ofKPi/MtE9CPJ8mQTLL1GLOXarLKMzkoaFlQfTeqHEfm2s+7umXRqbkZFrxtVYsjNi4zqj+ln47GSaWx2UvvCR46Uk++3ekLZtg4nf3ZtAAuQujACZ+2zVUA5KhyAPev2mlptb3WWrGNmDJao/ntqtUm6L34CE/+vfr/FZLBoPSr/PdnJGXWyF3J9D5amilz15Eyp9qDeRb0zzBV9Huta2R0BLMZqzd2yoejVG4uu6bnuapZiCtC/Vzx6i9bx1lS8ZuROF/VCsnHz4upMkiBb6FgseSjJKdDHtSCd+1Srk188zHc1DrCEhnXuWx/+cgTADeoUL8sPLeGJES3nAB4ODRG7k/9dNLLDhDHXumgiwooeGTyMVPFKtbpU8wS7bk6+nstJRE039BRpC0NjYJPczQbrEkghXr3PE62uW6DCrNZqTYS9yG2t40Cibatd6SRvJK9MiTrC+gMXG3QWP43ewvzRAxXYW8gO0zSkVTQicilE19buO/rny6LX7J9Sz8881Diu0TgajT42Ug3LsKa+1zCKh7BU76U8Q5BCjVdFMSaAgMxxiAqciYnA2gRww2awauH3HjgVR/KILqi197VfPG1k6z3PTHmPkPA4aH3wegB+p1+yo0rn48OCvWISOFpVFRFYt4NJcaIA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 3fdb57ed-3c8b-4156-c64f-08d4235cdfbd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2476; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 3:3zf9eAyZUMxS1LnhbsH4ImSwL1cEniL+2Uw9xpRTOtGdqR/CjshPnIs8RQHOfFmwiO/VyUNqWoQ6BHHfbIPbrAJx6eydEBtA4kPe02ti1kJ/l0YOIEMjvpOtwFzQ+C2JjjjO/Wze8CENd4fvRdQk+pbYEKBgp65JwfhZss7fKFgZEVinUz4Pvs88u85hKBj2sLnwDLHepghlF/zfII3TIJ1+TDaFg/0qitvXBeUBETyU1we0nJESEqjavFu14RpFSxDQXbQZvBgrutv+zBvoxJ6rWSs5dwVlSIbxFZVjiMPthCq/3eUiJ8pNDK2hzhQ2nKyUBfuorX9GGe9KBtLniZJLtZjfTj7lw8urqdHLFu4rKh2cRNKZusj7WOKUNxxK X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 25:e6sgB31DjtpU+f+OhYFaFLy/zTcn3ex5/IU/6rfdwig9QTSaX7B1P77o0fjwfmzuL/hj24+8fdst/L7hGI6Qjjw/yiXwdCZUZ9XRaXpCNgMlu7ZrloB7yjZ98huQwK6pr6yuwIu661VY6kKSeLACeMpBCG2sxQaRF3buWrpLu4dKcPyGckDpy+z73i+ChIM/tlsXgG5XwwGqPCdWeyJKAsC4FnBMZ53iF18sDskjCnvNTyuo0FrjrSzwJi6Isk9VCNGheoprVDhNrNeqnQepdf7PvesjYUwyixQ4HFaEgYSBG5U85gkdzKE2sB2oBf+Mwyl2sU012KnQOx7uZuhUI+TiMCd0BDzeGfSHU/PGV+HSVtjvxiUu0VzaQUumnK0qCUU12RT1zKG9C5yvRIhc/v6j3exkPKhc2jVQhGktvZv4uoZS2sUs9xb3Go12bOtJ5yX52p5kwXJW8xZUhgmFmPnWqgBHv1Oqt3yubS7p/PuDjDc6Y1/lWgXKINrxLHB5+W2MAOPFl83Dk7P5vOZImgfqRXcVNk98JgWdB8+RSkyAK4hn0dxtURvvRmcad3QWuzJ/9bKMs59yC9evDrAvBgLFjPNuh2Vm5/rLTR2XwED2/AsbJTCrq0KSWzzMYgF8tKTOWCEBJTuFXgC2zDJnIuyVawQqILb5f7PnPtatxtvkEKNm4/DcPtrSpocXIq7issav93s+iyNnjFeJNiOIa0oRGmlB3oL7FbFncgLXp/7Tis6zhpkgf83g1+TlImRmNzqdCd5cac8m6WaiWono1ZLiTFTN8z6OsbWj5aFO21FiJvpEhIjQjRN1VrH8qFc6 X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 31:pB+1BYUgMeCBZVdOrVnpTsc4pT19lPydbXzCM+JmFGGUfnidOy1ZtvAEU/eT0qDxnlNiHB0qYZDOYqlmZ83xhk2Q+HYxHFDl4u6QAnuiiq/m6s9UALXJwt3WgwO3i9F00c7r4LtdJ2ovB+NwTyHZRjtDzLqr7ZRkhdKRlfGDEUSAhICoegkJiqAEybmCr4Z0hRXGb59YpimWktoUQiyNNvlwIIKtPTkBK6IaKcAg3+a2ODyxKbWuQpxA6QZBQFVrEmY+Uri6uMQKkb3cJ/NojA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13017025)(13018025)(13015025)(13024025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559025)(20161123556025)(20161123563025); SRVR:DM5PR03MB2476; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2476; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 4:CV1+4JmzzmUuTwGg408fgms0aBVM54sTlWWf0phRdLdw4Ad7CFAoshwd9lH2Wqj6LOp110dNuCwdRy1PKp9qABLakLnG4ymnV4ZEUp3tF/biwE1HzwcQZECb5my3ULjQnjZEe41aUttIicerxG8LO2nEznYBtPqTe8jKJKosBUKB1vuMFSrvKbyAGn/EBtMv0yX8dmnfOYq5lmi7E7pjRcBXoT6n4EO+XrUmVrZ+QaOkzfXeH+P3XZeCS6vVT9bu7ySR6zvugjhG0cIXnk5e0YTLHJXhBVwu8FOXWoDmzlMx0jwQSEuwuHuHfdqvELtOymf0RSrWAAIOEfJNfWnl/GtpJM+pMRwJmQwSqxUSG3qqZLGO+C5bsrOxslg3bbwYwpky3WSq9sN6ja0KkBuuGuZJWtuWTbLs30DdXlpfMXomd27yGKwXOMMzAlL4OwImLGhVHNLtfqcKVDdotKi30nLCOGdYCylgMybwDNM3k3yu/VOf/m7zufRTfpkVOFVcFZPMAYQKS0GXMgx5fPfEa8x3z2Uu6vnCNWHLcE4iy1tRU01pfmOeyhsyga+4RHJt77r0pOpFhTHCJR6U+nhxPoftov3fiPJcIQiNOIQQbd2Wetw09WvZla8Zt9BJqAWQZb+5CeWdUhYEDHt2/1+rgr6WkU+oJJ0TpBT4WZX+UkLA99AlX+W/QD02QSa8rS/JafZ6hgqXW1p+RTXOtc4FlowARlpQWY1EFcEzXax1Z8fO671yKeoLk/bCAxw/RT+1 X-Forefront-PRVS: 01559F388D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2476; 23:wjkWvLMrFz9HyvpXwEdiJf9iQ8El7dExeSzJcvo/p?= =?us-ascii?Q?3ifkKmoZD0Bzaq10FccnmYPLQPtIAGXGgHQVtiQNAd2MU204kyW6KnIV4KFK?= =?us-ascii?Q?afPFOGrFdMssZFu6faQjP2ZzS3AopeXVLUQnLvdFmmVFTkBhbo12KS3t6TP5?= =?us-ascii?Q?iECyqVtu2LK3Qps3F/9a7gf/n3mhFw4NXYyw35BZE9TJmJxywJ/fM4Ke34Zn?= =?us-ascii?Q?wYW42TyQBYylFGsE0GN7RbY9LkLzbZqTtYkKzgzbun+KzA1hhzTapAlR40oi?= =?us-ascii?Q?1+5E7nUlvBM1msNeLJeL80au3UVHSBp9oOJndyXafUC4HPiX3P/KBVoUlEJP?= =?us-ascii?Q?aZFm2sdnWcb21LCWdM1KXEQbXtbEpGXEVZjnB8JaTmL0W9Sdffls+n8Czfvd?= =?us-ascii?Q?ojCuiLiSNui5YCqzv+a8i1xvIYUgTDS4xIMe3ZTHB7EsrVdnsHrbQmxj/fIE?= =?us-ascii?Q?LLcOhbwMM62rLtRUf7jvZAFRgcPRgDCbOWwMsCm+I+JWfe840WafHnQOzuCR?= =?us-ascii?Q?aDn3iZBe2On/8OJunKUZD2p6xq/T+qu2zDuMv/iX2x6uogY2n5g/cJk931L7?= =?us-ascii?Q?pI9Ni3orJNFSOADtx90FNUPxcanglA+nYAfPZzxBT8CrrTXBzkFPwKqjh2PF?= =?us-ascii?Q?qY3jznRLrEZedSvyYn5RbN1SIAkxOkHRYoH1r2lu2PeP6EoStE4wnBfKh/Ay?= =?us-ascii?Q?mdF1d5G+qFJ9MV4djfh9bFcH0oy4jxAbaYGo/5hXj6q0ORlNzL7kglyywPvP?= =?us-ascii?Q?sQeFbobQmacz5KCNoKgBNxJx8g0IP+YmyCq+pZUBQT+T0tUKZGHXjo/AJPPy?= =?us-ascii?Q?kISsi0BnQYks6me3SE/Wq3RvPRFoqbyV71GBnOMu0pnLmuXsJwTMFpawt6Od?= =?us-ascii?Q?C2Lgfa1TlMhWpZDpcyBe17clKQ3Fe6XMM7gqC7CEUcEDioYDlQ4/bDjQ+YSb?= =?us-ascii?Q?j43P4jZp1GVf0lCyXOV5YDK/CbzcLFpEvm7UUtyejI8D4yFmkK4nQkTY9eGj?= =?us-ascii?Q?UZZlKyI0xg49LiBqNZGlgkyTFx6DEWcMMTEvwCoDpCg0OcOYBq2Bnup7Kvsc?= =?us-ascii?Q?7ui2hjiLS4LL4jJxAuwOQZaI283JLHG22UH9TnHWLfiGMCW2yN4afwr+jT1L?= =?us-ascii?Q?bLIgdf15OZEGcreSMoIJcdzdbFl1oH6h0pr8TKowsKpiu8pPkuBZCkPmInH1?= =?us-ascii?Q?HcSzy5urAdmVtmo2Alr1jRkO6cb8ugdZNvQ3Z6Wjk2T8i7yjeI62R8zgSf+c?= =?us-ascii?Q?TGuLvWLSc2cW14UbqJ/fsR7f/yrw8udXfDyhf/UpH3a95TJEYEXQ7Jh5WgSA?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 6:V5TemhxHfJ0VejyoJa7ZOOw58odui23oLzc2jxIFYGZYt12pSE0pTfiTChpXfrcn2vo05jqnpkw2T6q7DYKudtBO59iWVu2OmXFq30+6sMjCKFcheRB0cTS45iBybz1/MqacF4GhStccRfvk3VzbTkvJMT6V9kK8aacJ4hfypeGaaim036+RxcenSy1sNiGlz1q6Cjtgjzap8lHrr75MUORe078pn2kEMAabH3F58eMFSyM6MfU8rRBxERGXNpT3OMmEjZUwu5yvQ3Cfn5ilmoAaPgXLwjuPepDmkEbkePBKIhCYUmmFR4IKzunrBBa1nRQUlz6uL6OgkdYlmVdN2UJuw5GN97hBA19pTCbhgfCvVNd7plIZ2paCwP+KYTHwCPPAZi4emqp809frGakQFb+aZ9PXQtyM85Y1yT82Ii45byCZrG3sGyIZqmVA3jlg; 5:HZAYQ3QhjLz3qh+LiDd2Y/r5BosxlJo3iH+XcRBMQFHYJ2vjzb1ilPqsVzsVXoslxOC/ZkOWKojh/i9VLg92pjTXKFae+nh4Wu+ESZQGzV8Bimyy7eWApw2SXlyXSj5wJ6s5qcMO7aNZnfesAg4sd7QwyoQMkXasa4smTe4ChHFyBuMQ7f+ympMVJbT1VZQW; 24:wBHPj9mRyxmnRG8EePSOnN2YqwaSG/Sxvku4q9aqGIFCibR8a8sVEm2EWguWpRDeM6ym2l9a70PWcHEy+KBO4UzgueaOumSc3Zcha6eHuZA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2476; 7:Qa6KjRhns8c7WYntOZpPt+PEhT86U/fUkqDfq0kUwWHBan71AlR1EAw1ic+MTUubmAbN6Xu3bPJ4uLmB1Pgx28fZ4OY903jOz7a6Hw2w3CU+ZL3AxYCKQGDZBIPYejYCOEnj1NplNYjYRseWPFUCYWWt5ZF7JbP0VusmnzZO/r4ERVlJUfURjgOmzPpt9VVc0B/946riXtKx5fH38aDE5MjDlFBIGFw0s2+c5lYojJ9/xYRCg9UQx5TtGfAnb3UXDFuHhbCIzqIIkYfGzu30HdxCXeKzJaltpaHs/IMSaqyf3gkx5Q5F0FlR5vTGIjJndpEXiZu/oEbBwuuK/T4Uo+Y/LhrdrcGMYaLR1BGaypVTXfHXLqxpV0PYxxQyT+lEuSufhcdLumr0OqUlqOB/8+9zrVgLL/PtOmy4hTNqA1OHrGSKzRkh+6wrcOJTm07kcLM5YfLmvs9jVUmpKVTMnw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2016 13:35:16.1930 (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: DM5PR03MB2476 Subject: [dpdk-dev] [PATCH v2 11/12] eal: enable PCI bus X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 13:35:20 -0000 Register a PCI bus with Scan/match and probe callbacks. Necessary changes in EAL layer for enabling bus interfaces. PCI devices and drivers now reside within the Bus object. Now that PCI bus handles the scan/probe methods, independent calls to PCI scan and probe can be removed from the code. PCI device and driver list are also removed. rte_device and rte_driver list continue to exist. As does the VDEV lists. Note: With this patch, all PCI PMDs would cease to work because of lack rte_driver->probe/remove implementations. Next patch would do that. Signed-off-by: Shreyansh Jain --- lib/librte_eal/bsdapp/eal/eal.c | 7 - lib/librte_eal/bsdapp/eal/eal_pci.c | 52 ++++--- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +- lib/librte_eal/common/eal_common_bus.c | 1 + lib/librte_eal/common/eal_common_pci.c | 187 +++++++++++++++--------- lib/librte_eal/common/eal_private.h | 14 +- lib/librte_eal/common/include/rte_pci.h | 53 ++++--- lib/librte_eal/linuxapp/eal/eal.c | 7 - lib/librte_eal/linuxapp/eal/eal_pci.c | 54 ++++--- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +- 10 files changed, 220 insertions(+), 169 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 30afc6b..79d82d4 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -562,9 +562,6 @@ rte_eal_init(int argc, char **argv) if (rte_eal_timer_init() < 0) rte_panic("Cannot init HPET or TSC timers\n"); - if (rte_eal_pci_init() < 0) - rte_panic("Cannot init PCI\n"); - eal_check_mem_on_local_socket(); if (eal_plugins_init() < 0) @@ -616,10 +613,6 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); rte_eal_mp_wait_lcore(); - /* Probe & Initialize PCI devices */ - if (rte_eal_pci_probe()) - rte_panic("Cannot probe PCI\n"); - if (rte_eal_bus_probe()) rte_panic("Cannot probe devices\n"); diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 10b234e..ab9f9d2 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -58,6 +58,7 @@ #include #include +#include #include #include #include @@ -249,7 +250,7 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, } static int -pci_scan_one(int dev_pci_fd, struct pci_conf *conf) +pci_scan_one(struct rte_bus *bus, int dev_pci_fd, struct pci_conf *conf) { struct rte_pci_device *dev; struct pci_bar_io bar; @@ -322,19 +323,23 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) } /* device is valid, add in list (sorted) */ - if (TAILQ_EMPTY(&pci_device_list)) { - TAILQ_INSERT_TAIL(&pci_device_list, dev, next); + if (TAILQ_EMPTY(&bus->device_list)) { + rte_eal_bus_add_device(bus, &dev->device); } else { struct rte_pci_device *dev2 = NULL; + struct rte_device *r_dev2; int ret; - TAILQ_FOREACH(dev2, &pci_device_list, next) { + TAILQ_FOREACH(r_dev2, &bus->device_list, next) { + dev2 = container_of(r_dev2, struct rte_pci_device, + device); ret = rte_eal_compare_pci_addr(&dev->addr, &dev2->addr); if (ret > 0) continue; else if (ret < 0) { - TAILQ_INSERT_BEFORE(dev2, dev, next); + rte_eal_bus_insert_device(bus, &dev2->device, + &dev->device); return 0; } else { /* already registered */ dev2->kdrv = dev->kdrv; @@ -346,7 +351,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) return 0; } } - TAILQ_INSERT_TAIL(&pci_device_list, dev, next); + rte_eal_bus_add_device(bus, &dev->device); } return 0; @@ -361,7 +366,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) * list. Call pci_scan_one() for each pci entry found. */ int -rte_eal_pci_scan(struct rte_bus *bus __rte_unused) +rte_eal_pci_scan(struct rte_bus *bus) { int fd; unsigned dev_count = 0; @@ -374,6 +379,10 @@ rte_eal_pci_scan(struct rte_bus *bus __rte_unused) .matches = &matches[0], }; + /* for debug purposes, PCI can be disabled */ + if (internal_config.no_pci) + return 0; + fd = open("/dev/pci", O_RDONLY); if (fd < 0) { RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__); @@ -389,7 +398,7 @@ rte_eal_pci_scan(struct rte_bus *bus __rte_unused) } for (i = 0; i < conf_io.num_matches; i++) - if (pci_scan_one(fd, &matches[i]) < 0) + if (pci_scan_one(bus, fd, &matches[i]) < 0) goto error; dev_count += conf_io.num_matches; @@ -407,9 +416,9 @@ rte_eal_pci_scan(struct rte_bus *bus __rte_unused) } int -pci_update_device(const struct rte_pci_addr *addr) +pci_update_device(struct rte_bus *bus, const struct rte_pci_addr *addr) { - int fd; + int fd = -1; struct pci_conf matches[2]; struct pci_match_conf match = { .pc_sel = { @@ -427,6 +436,9 @@ pci_update_device(const struct rte_pci_addr *addr) .matches = &matches[0], }; + if (!bus) + goto error; + fd = open("/dev/pci", O_RDONLY); if (fd < 0) { RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__); @@ -442,7 +454,7 @@ pci_update_device(const struct rte_pci_addr *addr) if (conf_io.num_matches != 1) goto error; - if (pci_scan_one(fd, &matches[0]) < 0) + if (pci_scan_one(bus, fd, &matches[0]) < 0) goto error; close(fd); @@ -668,17 +680,9 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) return ret; } -/* Init the PCI EAL subsystem */ -int -rte_eal_pci_init(void) -{ - /* for debug purposes, PCI can be disabled */ - if (internal_config.no_pci) - return 0; +struct rte_bus pci_bus = { + .scan = rte_eal_pci_scan, + .match = rte_eal_pci_match, +}; - if (rte_eal_pci_scan(NULL) < 0) { - RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__); - return -1; - } - return 0; -} +RTE_REGISTER_BUS(pci, pci_bus); diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 23fc1c1..3dcf439 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -6,8 +6,6 @@ DPDK_2.0 { eal_parse_sysfs_value; eal_timer_source; lcore_config; - pci_device_list; - pci_driver_list; per_lcore__lcore_id; per_lcore__rte_errno; rte_calloc; @@ -41,7 +39,6 @@ DPDK_2.0 { rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; rte_eal_pci_dump; - rte_eal_pci_probe; rte_eal_pci_probe_one; rte_eal_pci_register; rte_eal_pci_scan; @@ -187,5 +184,9 @@ DPDK_17.02 { rte_eal_bus_remove_device; rte_eal_bus_remove_driver; rte_eal_bus_unregister; + rte_eal_pci_match; + rte_eal_pci_probe; + rte_eal_pci_remove; + rte_eal_pci_scan; } DPDK_16.11; diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c index 469abac..d9ee347 100644 --- a/lib/librte_eal/common/eal_common_bus.c +++ b/lib/librte_eal/common/eal_common_bus.c @@ -234,6 +234,7 @@ rte_eal_bus_probe(void) TAILQ_FOREACH(driver, &bus->driver_list, next) { ret = bus->match(driver, device); if (!ret) { + device->driver = driver; ret = perform_probe(bus, driver, device); if (ret < 0) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 562c0fd..fb4e39f 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -71,6 +71,7 @@ #include #include +#include #include #include #include @@ -82,11 +83,6 @@ #include "eal_private.h" -struct pci_driver_list pci_driver_list = - TAILQ_HEAD_INITIALIZER(pci_driver_list); -struct pci_device_list pci_device_list = - TAILQ_HEAD_INITIALIZER(pci_device_list); - #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices" const char *pci_get_sysfs_path(void) @@ -206,15 +202,11 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev) { int ret; - struct rte_driver *driver; - struct rte_device *device; struct rte_pci_addr *loc; if ((dr == NULL) || (dev == NULL)) return -EINVAL; - driver = &dr->driver; - device = &dev->device; loc = &dev->addr; RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n", @@ -230,15 +222,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, return 1; } - /* The device is not blacklisted; Check if driver supports it */ - ret = rte_eal_pci_match(driver, device); - if (ret) { - /* Match of device and driver failed */ - RTE_LOG(DEBUG, EAL, "Driver (%s) doesn't match the device\n", - driver->name); - return 1; - } - RTE_LOG(INFO, EAL, " probe driver: %x:%x %s\n", dev->id.vendor_id, dev->id.device_id, dr->driver.name); @@ -276,23 +259,11 @@ static int rte_eal_pci_detach_dev(struct rte_pci_driver *dr, struct rte_pci_device *dev) { - int ret; - struct rte_driver *driver = NULL; - struct rte_device *device; struct rte_pci_addr *loc; if ((dr == NULL) || (dev == NULL)) return -EINVAL; - driver = &(dr->driver); - device = &(dev->device); - - ret = rte_eal_pci_match(driver, device); - if (ret) { - /* Device and driver don't match */ - return 1; - } - loc = &dev->addr; RTE_LOG(DEBUG, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n", @@ -321,9 +292,10 @@ rte_eal_pci_detach_dev(struct rte_pci_driver *dr, * failed, return 1 if no driver is found for this device. */ static int -pci_probe_all_drivers(struct rte_pci_device *dev) +pci_probe_all_drivers(struct rte_bus *bus, struct rte_pci_device *dev) { struct rte_pci_driver *dr = NULL; + struct rte_driver *r_dr = NULL; int rc = 0; if (dev == NULL) @@ -333,7 +305,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev) if (dev->driver != NULL) return 0; - TAILQ_FOREACH(dr, &pci_driver_list, next) { + TAILQ_FOREACH(r_dr, &bus->driver_list, next) { + dr = container_of(r_dr, struct rte_pci_driver, driver); rc = rte_eal_pci_probe_one_driver(dr, dev); if (rc < 0) /* negative value is an error */ @@ -352,15 +325,17 @@ pci_probe_all_drivers(struct rte_pci_device *dev) * failed, return 1 if no driver is found for this device. */ static int -pci_detach_all_drivers(struct rte_pci_device *dev) +pci_detach_all_drivers(struct rte_bus *bus, struct rte_pci_device *dev) { struct rte_pci_driver *dr = NULL; + struct rte_driver *r_dr = NULL; int rc = 0; if (dev == NULL) return -1; - TAILQ_FOREACH(dr, &pci_driver_list, next) { + TAILQ_FOREACH(r_dr, &bus->driver_list, next) { + dr = container_of(r_dr, struct rte_pci_driver, driver); rc = rte_eal_pci_detach_dev(dr, dev); if (rc < 0) /* negative value is an error */ @@ -381,22 +356,31 @@ int rte_eal_pci_probe_one(const struct rte_pci_addr *addr) { struct rte_pci_device *dev = NULL; + struct rte_device *r_dev = NULL; + struct rte_bus *bus; int ret = 0; if (addr == NULL) return -1; + bus = rte_eal_get_bus("pci"); + if (!bus) { + RTE_LOG(ERR, EAL, "PCI Bus not registered\n"); + return -1; + } + /* update current pci device in global list, kernel bindings might have * changed since last time we looked at it. */ - if (pci_update_device(addr) < 0) + if (pci_update_device(bus, addr) < 0) goto err_return; - TAILQ_FOREACH(dev, &pci_device_list, next) { + TAILQ_FOREACH(r_dev, &bus->device_list, next) { + dev = container_of(r_dev, struct rte_pci_device, device); if (rte_eal_compare_pci_addr(&dev->addr, addr)) continue; - ret = pci_probe_all_drivers(dev); + ret = pci_probe_all_drivers(bus, dev); if (ret) goto err_return; return 0; @@ -417,20 +401,29 @@ int rte_eal_pci_detach(const struct rte_pci_addr *addr) { struct rte_pci_device *dev = NULL; + struct rte_device *r_dev = NULL; + struct rte_bus *bus; int ret = 0; if (addr == NULL) return -1; - TAILQ_FOREACH(dev, &pci_device_list, next) { + bus = rte_eal_get_bus("pci"); + if (!bus) { + RTE_LOG(ERR, EAL, "PCI Bus is not registered\n"); + return -1; + } + + TAILQ_FOREACH(r_dev, &bus->device_list, next) { + dev = container_of(r_dev, struct rte_pci_device, device); if (rte_eal_compare_pci_addr(&dev->addr, addr)) continue; - ret = pci_detach_all_drivers(dev); + ret = pci_detach_all_drivers(bus, dev); if (ret < 0) goto err_return; - TAILQ_REMOVE(&pci_device_list, dev, next); + rte_eal_bus_remove_device(r_dev); free(dev); return 0; } @@ -443,41 +436,66 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr) return -1; } -/* - * Scan the content of the PCI bus, and call the probe() function for - * all registered drivers that have a matching entry in its id_table - * for discovered devices. - */ int -rte_eal_pci_probe(void) +rte_eal_pci_probe(struct rte_driver *driver, struct rte_device *device) { - struct rte_pci_device *dev = NULL; - struct rte_devargs *devargs; - int probe_all = 0; int ret = 0; + struct rte_devargs *devargs; + struct rte_pci_device *pci_dev; + struct rte_pci_driver *pci_drv; - if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) == 0) - probe_all = 1; + if (!driver || !device) + return -1; - TAILQ_FOREACH(dev, &pci_device_list, next) { + pci_dev = container_of(device, struct rte_pci_device, device); + pci_drv = container_of(driver, struct rte_pci_driver, driver); + ret = rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI); + if (ret != 0) { /* set devargs in PCI structure */ - devargs = pci_devargs_lookup(dev); - if (devargs != NULL) - dev->device.devargs = devargs; - - /* probe all or only whitelisted devices */ - if (probe_all) - ret = pci_probe_all_drivers(dev); - else if (devargs != NULL && - devargs->type == RTE_DEVTYPE_WHITELISTED_PCI) - ret = pci_probe_all_drivers(dev); - if (ret < 0) - rte_exit(EXIT_FAILURE, "Requested device " PCI_PRI_FMT - " cannot be used\n", dev->addr.domain, dev->addr.bus, - dev->addr.devid, dev->addr.function); + devargs = pci_devargs_lookup(pci_dev); + if (devargs != NULL && + devargs->type == RTE_DEVTYPE_WHITELISTED_PCI) { + pci_dev->device.devargs = devargs; + } else { + /* Ignore the device */ + return 0; + } + } + + ret = rte_eal_pci_probe_one_driver(pci_drv, pci_dev); + if (ret < 0) { + RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT + " cannot be used\n", pci_dev->addr.domain, + pci_dev->addr.bus, pci_dev->addr.devid, + pci_dev->addr.function); + return ret; } + return 0; +} + +int +rte_eal_pci_remove(struct rte_device *device) +{ + int ret = 0; + struct rte_pci_device *pci_dev; + + if (!device) + return -1; + + pci_dev = container_of(device, struct rte_pci_device, device); + if (!pci_dev->driver) + return -1; + + ret = rte_eal_pci_detach_dev(pci_dev->driver, pci_dev); + if (ret < 0) { + RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT + " cannot be used\n", pci_dev->addr.domain, + pci_dev->addr.bus, pci_dev->addr.devid, + pci_dev->addr.function); + return ret; + } return 0; } @@ -506,8 +524,17 @@ void rte_eal_pci_dump(FILE *f) { struct rte_pci_device *dev = NULL; + struct rte_device *r_dev = NULL; + struct rte_bus *bus; - TAILQ_FOREACH(dev, &pci_device_list, next) { + bus = rte_eal_get_bus("pci"); + if (!bus) { + RTE_LOG(ERR, EAL, "PCI Bus not registered\n"); + return; + } + + TAILQ_FOREACH(r_dev, &bus->device_list, next) { + dev = container_of(r_dev, struct rte_pci_device, device); pci_dump_one_device(f, dev); } } @@ -516,14 +543,32 @@ rte_eal_pci_dump(FILE *f) void rte_eal_pci_register(struct rte_pci_driver *driver) { - TAILQ_INSERT_TAIL(&pci_driver_list, driver, next); - rte_eal_driver_register(&driver->driver); + struct rte_bus *bus; + + RTE_VERIFY(driver); + + bus = rte_eal_get_bus("pci"); + if (!bus) { + RTE_LOG(ERR, EAL, "PCI Bus not registered\n"); + return; + } + + rte_eal_bus_add_driver(bus, &driver->driver); } /* unregister a driver */ void rte_eal_pci_unregister(struct rte_pci_driver *driver) { - rte_eal_driver_unregister(&driver->driver); - TAILQ_REMOVE(&pci_driver_list, driver, next); + struct rte_bus *bus; + + RTE_VERIFY(driver); + + bus = driver->driver.bus; + if (!bus) { + RTE_LOG(ERR, EAL, "PCI Bus not registered\n"); + return; + } + + rte_eal_bus_remove_driver(&driver->driver); } diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 9e7d8f6..06ec172 100644 --- a/lib/librte_eal/common/eal_private.h +++ b/lib/librte_eal/common/eal_private.h @@ -108,16 +108,6 @@ int rte_eal_timer_init(void); */ int rte_eal_log_init(const char *id, int facility); -/** - * Init the PCI infrastructure - * - * This function is private to EAL. - * - * @return - * 0 on success, negative on error - */ -int rte_eal_pci_init(void); - struct rte_pci_driver; struct rte_pci_device; @@ -126,13 +116,15 @@ struct rte_pci_device; * * This function is private to EAL. * + * @param bus + * The PCI bus on which device is connected * @param addr * The PCI Bus-Device-Function address to look for * @return * - 0 on success. * - negative on error. */ -int pci_update_device(const struct rte_pci_addr *addr); +int pci_update_device(struct rte_bus *bus, const struct rte_pci_addr *addr); /** * Unbind kernel driver for this device diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 10108a4..ec8f672 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -86,12 +86,6 @@ extern "C" { #include #include -TAILQ_HEAD(pci_device_list, rte_pci_device); /**< PCI devices in D-linked Q. */ -TAILQ_HEAD(pci_driver_list, rte_pci_driver); /**< PCI drivers in D-linked Q. */ - -extern struct pci_driver_list pci_driver_list; /**< Global list of PCI drivers. */ -extern struct pci_device_list pci_device_list; /**< Global list of PCI devices. */ - /** Pathname of PCI devices directory. */ const char *pci_get_sysfs_path(void); @@ -372,6 +366,40 @@ rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, int rte_eal_pci_scan(struct rte_bus *bus); /** + * Probe callback for the PCI bus + * + * For each matched pair of PCI device and driver on PCI bus, perform devargs + * check, and call a series of callbacks to allocate ethdev/cryptodev instances + * and intializing them. + * + * @param driver + * Generic driver object matched with the device + * @param device + * Generic device object to initialize + * @return + * - 0 on success. + * - !0 on error. + */ +int +rte_eal_pci_probe(struct rte_driver *driver, struct rte_device *device); + +/** + * Remove callback for the PCI bus + * + * Called when a device needs to be removed from a bus; wraps around the + * PCI specific implementation layered over rte_pci_driver->remove. Default + * handler used by PCI PMDs + * + * @param device + * rte_device object referring to device to be removed + * @return + * - 0 for successful removal + * - !0 for failure in removal of device + */ +int +rte_eal_pci_remove(struct rte_device *device); + +/** * Match the PCI Driver and Device using the ID Table * * @param drv @@ -387,19 +415,6 @@ rte_eal_pci_match(struct rte_driver *drv, struct rte_device *dev); /** - * Probe the PCI bus for registered drivers. - * - * Scan the content of the PCI bus, and call the probe() function for - * all registered drivers that have a matching entry in its id_table - * for discovered devices. - * - * @return - * - 0 on success. - * - Negative on error. - */ -int rte_eal_pci_probe(void); - -/** * Map the PCI device resources in user space virtual memory address * * Note that driver should not call this function when flag diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 01d0cee..ff92de2 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -803,9 +803,6 @@ rte_eal_init(int argc, char **argv) if (rte_eal_log_init(logid, internal_config.syslog_facility) < 0) rte_panic("Cannot init logs\n"); - if (rte_eal_pci_init() < 0) - rte_panic("Cannot init PCI\n"); - #ifdef VFIO_PRESENT if (rte_eal_vfio_setup() < 0) rte_panic("Cannot init VFIO\n"); @@ -887,10 +884,6 @@ rte_eal_init(int argc, char **argv) rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); rte_eal_mp_wait_lcore(); - /* Probe & Initialize PCI devices */ - if (rte_eal_pci_probe()) - rte_panic("Cannot probe PCI\n"); - if (rte_eal_bus_probe()) rte_panic("Cannot probe devices\n"); diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index cbd25df..5cc89c5 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -267,7 +268,8 @@ pci_parse_sysfs_resource(const char *filename, struct rte_pci_device *dev) /* Scan one pci sysfs entry, and fill the devices list from it. */ static int -pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) +pci_scan_one(struct rte_bus *bus, const char *dirname, + const struct rte_pci_addr *addr) { char filename[PATH_MAX]; unsigned long tmp; @@ -385,20 +387,24 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) dev->kdrv = RTE_KDRV_NONE; /* device is valid, add in list (sorted) */ - if (TAILQ_EMPTY(&pci_device_list)) { + if (TAILQ_EMPTY(&bus->device_list)) { rte_eal_device_insert(&dev->device); - TAILQ_INSERT_TAIL(&pci_device_list, dev, next); + rte_eal_bus_add_device(bus, &dev->device); } else { struct rte_pci_device *dev2; + struct rte_device *r_dev2; int ret; - TAILQ_FOREACH(dev2, &pci_device_list, next) { + TAILQ_FOREACH(r_dev2, &bus->device_list, next) { + dev2 = container_of(r_dev2, struct rte_pci_device, + device); ret = rte_eal_compare_pci_addr(&dev->addr, &dev2->addr); if (ret > 0) continue; if (ret < 0) { - TAILQ_INSERT_BEFORE(dev2, dev, next); + rte_eal_bus_insert_device(bus, &dev2->device, + &dev->device); rte_eal_device_insert(&dev->device); } else { /* already registered */ dev2->kdrv = dev->kdrv; @@ -410,14 +416,14 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) return 0; } rte_eal_device_insert(&dev->device); - TAILQ_INSERT_TAIL(&pci_device_list, dev, next); + rte_eal_bus_add_device(bus, &dev->device); } return 0; } int -pci_update_device(const struct rte_pci_addr *addr) +pci_update_device(struct rte_bus *bus, const struct rte_pci_addr *addr) { char filename[PATH_MAX]; @@ -425,7 +431,7 @@ pci_update_device(const struct rte_pci_addr *addr) pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid, addr->function); - return pci_scan_one(filename, addr); + return pci_scan_one(bus, filename, addr); } /* @@ -479,13 +485,22 @@ parse_pci_addr_format(const char *buf, int bufsize, struct rte_pci_addr *addr) * list */ int -rte_eal_pci_scan(struct rte_bus *bus_p __rte_unused) +rte_eal_pci_scan(struct rte_bus *bus_p) { struct dirent *e; DIR *dir; char dirname[PATH_MAX]; struct rte_pci_addr addr; + if (!bus_p) { + RTE_LOG(ERR, EAL, "PCI Bus is not registered\n"); + return -1; + } + + /* for debug purposes, PCI can be disabled */ + if (internal_config.no_pci) + return 0; + dir = opendir(pci_get_sysfs_path()); if (dir == NULL) { RTE_LOG(ERR, EAL, "%s(): opendir failed: %s\n", @@ -504,7 +519,7 @@ rte_eal_pci_scan(struct rte_bus *bus_p __rte_unused) snprintf(dirname, sizeof(dirname), "%s/%s", pci_get_sysfs_path(), e->d_name); - if (pci_scan_one(dirname, &addr) < 0) + if (pci_scan_one(bus_p, dirname, &addr) < 0) goto error; } closedir(dir); @@ -750,18 +765,9 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) return ret; } -/* Init the PCI EAL subsystem */ -int -rte_eal_pci_init(void) -{ - /* for debug purposes, PCI can be disabled */ - if (internal_config.no_pci) - return 0; - - if (rte_eal_pci_scan(NULL) < 0) { - RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__); - return -1; - } +struct rte_bus pci_bus = { + .scan = rte_eal_pci_scan, + .match = rte_eal_pci_match, +}; - return 0; -} +RTE_REGISTER_BUS(pci, pci_bus); diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map index c873a7f..6e0ec51 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map @@ -6,8 +6,6 @@ DPDK_2.0 { eal_parse_sysfs_value; eal_timer_source; lcore_config; - pci_device_list; - pci_driver_list; per_lcore__lcore_id; per_lcore__rte_errno; rte_calloc; @@ -41,7 +39,6 @@ DPDK_2.0 { rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; rte_eal_pci_dump; - rte_eal_pci_probe; rte_eal_pci_probe_one; rte_eal_pci_register; rte_eal_pci_scan; @@ -191,5 +188,9 @@ DPDK_17.02 { rte_eal_bus_remove_device; rte_eal_bus_remove_driver; rte_eal_bus_unregister; + rte_eal_pci_match; + rte_eal_pci_probe; + rte_eal_pci_remove; + rte_eal_pci_scan; } DPDK_16.11; -- 2.7.4