From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0084.outbound.protection.outlook.com [104.47.34.84]) by dpdk.org (Postfix) with ESMTP id 31180377C for ; Fri, 16 Dec 2016 14:18:04 +0100 (CET) Received: from BN6PR03CA0001.namprd03.prod.outlook.com (10.168.230.139) by MWHPR03MB2478.namprd03.prod.outlook.com (10.169.200.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Fri, 16 Dec 2016 13:18:02 +0000 Received: from BL2FFO11FD047.protection.gbl (2a01:111:f400:7c09::172) by BN6PR03CA0001.outlook.office365.com (2603:10b6:404:23::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14 via Frontend Transport; Fri, 16 Dec 2016 13:18:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail 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 BL2FFO11FD047.mail.protection.outlook.com (10.173.161.209) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.761.6 via Frontend Transport; Fri, 16 Dec 2016 13:18:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:983; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBGDHutD032573; Fri, 16 Dec 2016 06:17:57 -0700 To: References: <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-12-git-send-email-shreyansh.jain@nxp.com> CC: , , , From: Shreyansh Jain Message-ID: <743bc547-7890-5320-4467-7d75d4fd2574@nxp.com> Date: Fri, 16 Dec 2016 18:50:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481893853-31790-12-git-send-email-shreyansh.jain@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131263678804354313; (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)(336005)(39410400002)(39450400003)(39380400002)(39850400002)(39400400002)(39860400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(377454003)(199003)(189002)(24454002)(47776003)(65956001)(31696002)(305945005)(65806001)(356003)(69596002)(104016004)(106466001)(50466002)(33646002)(2351001)(105606002)(64126003)(23746002)(36756003)(86362001)(230700001)(31686004)(4326007)(81156014)(97736004)(8676002)(81166006)(8936002)(76176999)(4001350100001)(50986999)(54356999)(77096006)(5660300001)(189998001)(2906002)(229853002)(92566002)(68736007)(85426001)(83506001)(2950100002)(110136003)(38730400001)(6916009)(65826007)(626004)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2478; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD047; 1:b+ywbOgXcVdT/sjNehXrZa1YPyi5tksKjPmPCpNxZQ0JHmOZG3PmMyuqEO5EzxnJ/IAF5ZCnPNZCGryliogr8ijPP0y3PUgdgbzbLXquOk+q2bfO1srsjTkrMmwYZxz5f021ENI/Mq0qtYFJXSEFyBoGm4cApvtWl9CzEwoYGNWNeHj+rhDKtUPzw5rF47E/zmocLYlW92d6VT7MBnmTWJ9F8R/tJfxSxhCYztyRUtQNfytdfsG9MXCpUfLvPskM6BxoDX1pSbRf0GfOfzKpZkQInlcToBbpwpV7kyPKvDYOV+SFW916ZSgD5s8du76WQb/B8yR9naP2tQQa2574PenNheEphWuVAUIeOZoEXAgsIy4UC/5rcmHyFpGzPuVfOtFVPPEbC57pCtKqhARJh5oW67SUboVUfzW6YWP5In2IdewkK9C8VY+J6tLcrodhlr3vRk+vEpaFTGQbbN4ADqLHhychVf2x8HCSXOqOOOxErxVeCKXS60xdA190fO1blqUG88U3idLtMY3M9JD3xlmjNOzi/+zPSEm+GKdRT+C8J3HLri3ivvROJWVCqDemjDR+Ib+kdjLJXfEcAwpsJgG4Adf+exv8vX1my8fu81VkLtL2CLAxKI45+Vd9ByBCiFF1Qdj31mytADp8JUf52w== X-MS-Office365-Filtering-Correlation-Id: d4003ae0-1814-432c-03aa-08d425b5f580 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2478; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2478; 3:I5N1nqB2oOjQKv0fupLujdtrkLrCKs3EFjmvgnDd4oFb0sVLbp5XnZ5c0TbfpU/qkkgJTaf5OuXlKBhfIycKj86cigkD0PGJ99iNqdL5yprkLTLyjhj2T+7X0tl/3vTOTasnmeirRjCjgpckKi7HBGAl3cQpj/0o0AS+8YUCkgvtLv21PoG04z/6Ube/nfFy0Le8UEX/bDRh4zhIfeNkraOSY1CTdn1BTKlhPd8lpDgzN7w6ZO5aDcOzq0L7hARK+hgYRaEGwyAdodhSRr+JTLbPnUQPVQSf/yXpLJJnD4Z+FPCljkfbD6lPFdriIOG++Hdl2qrBvQGsr86xbhvXtu3FpZQrxVHq9o/MIViHQLeccHchijU9xaJFltC67qls X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2478; 25:6Gd5dsDX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wz0COWrXo67w6i3FdK3HwAGyix4IUwXK3noqJw4eXmmPuI1FH8a/oCSL61usVHOjljA/hmXit0Av5uKo= 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)(13024025)(13023025)(13017025)(5005006)(13015025)(8121501046)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(20161123559025)(20161123563025)(20161123561025); SRVR:MWHPR03MB2478; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2478; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2478; 4:5CDzmvLlzuTg5Yad0teTKq+GVwrCsK+2ZdjBnncSMm4+UkAm1MwGkhD6pm9FZ7gJKyL3NZKcMRQdwiM6SCA02dGsMGKF8b0VWok+wOWgR9d8jAWAHNE7YveW7BTAJHWC1WfAOE71aX8n6G4TtPubQDFFTJBZAS72sA7WD2i8XiuozKuDa7ow6+s+Yrxl+TVl8xZQk+8WUkhrGNFYDE8UfWJRPBFS5PIjgcop9y9GhbUtP2uE6l7KJ/Bzi/6PDJjMkwLLJ1MD1/bwuQ8MoQFr7cBYNs+GnHfzbs7e8fYgDrkIjOyAwRngzfW+g3aAg3AEaDLeRRhJgX77zki9h9lAEF4A4XOFAyU3fo8xnKrkt2VaDJBFLyKVBwJ8vUEwhx639UnpuEqDovMH6QQfww//WUCdzSZVQI9fKmwek3Q3BZzCOwHI/81k0VGNVv92CA863E51MKK6LnygG8N5kf6lJBK/41UjCQKzhX0W2CqX2qGQ8BFrjgCyfCXdE/KXBYWaccD+KZ/1v4T4/kfeOOL/lSKvBL5/3vZ044dWBUBCplSpOc0BP0aBKgFNgB/TF7gk88p4xJogrJO/ysN0NoBJMu/feytf5TFdkP93AZsqxkJaZQMvB+o0jb1alPKkTp0/H1M7Dnjoe3qRaG0vXUi6KBj4jggNTH3IgjqoOxs3r9TnkGLE1Q+fcy9k4gEiaMP3rZkjjZgMjggwBO/mc0VuUp1CMEzYJHpfgZ+4PVrPI1gT9jhaqIL+QbfhdD3My4kN X-Forefront-PRVS: 01583E185C X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; MWHPR03MB2478; 23:ad+mqGwVbHldZbjUPCMDVFJNFN50y3P/KMy8v?= =?Windows-1252?Q?Ndkz6pPK71q5TUVqkhKciZM4PtUzTIdXeubeFRzFBmJqmxQ3sqH4q2KB?= =?Windows-1252?Q?FpRia3Sak5rXJzOaAOhJfNhHypEAtCKgT0aGa/JepHYO5nNQ+oF55GJY?= =?Windows-1252?Q?kNErqSdzKkff9LqZ+5vtAK475sYCkxZy2iFA+ZOpojpZbvDkBkBwbkBA?= =?Windows-1252?Q?hhRSe6QVNewpZxUW8NTa6IdHzMk4tKtvVOonVAgdwAMovEaghbhSs3O+?= =?Windows-1252?Q?HiipgCIj+/Qw1w7EAKzT4DBTT0+HxRTyqNI31+bk2ftC4n4qc6xaKbI4?= =?Windows-1252?Q?F6lBJzMFAA/obnUdl9VZW90W6JEh+3nvzz96cuGRG13BDFGrPoXZQ90G?= =?Windows-1252?Q?e1bsgL68btLAhcC8USdA+wj17+xncneoQfkud6xWz2ticFU86zwy6U10?= =?Windows-1252?Q?NryI1KffSfc16Cy9NhY+89o9XP4mKwOdqu53oW9wikZWOK7+d5qkG5Pn?= =?Windows-1252?Q?naXBNzjJC4xPyBrbw5to+9e2yDE/xcOTwtekmjWu/E5gXl4jSA9SM67/?= =?Windows-1252?Q?6G+rof0Uyf7fC6ZgHmGBcyat/8fceFNCh4JXWBMnkkxY8j22yk3bfopO?= =?Windows-1252?Q?O15Bd8kSwCGNaUThlXGjJOZgfGWHlbWg4XjJUx2rcDZVnRROnar7fn1D?= =?Windows-1252?Q?nXgtKV/V+O0SjqKuzUpRv4nbxOcv1qCbyJuzn2kjgoHab/JQFDEDcuNw?= =?Windows-1252?Q?Gt5+WP6RMOuxk6+sesKD3azvXxAHEXZosk5bmLxGGsgX/qPJoP46cxBW?= =?Windows-1252?Q?a1jLS/iuMKSd3xscB8NnwSnNhAAI+LBY7LYua7xld8jOhThwYjXEWd+/?= =?Windows-1252?Q?6zIRLvRu8M9e+ekjyWuzApv4e8YXZiMKYk5TXdC9yHaloY+sk7JmBF+D?= =?Windows-1252?Q?8rhQ+C3BI8+04QZ32nxmk8Qgy6NSptaY0EDNgiNTvgbTRC/wKfx1p58z?= =?Windows-1252?Q?NcP3W8h5FYDQMOco+YTFv57sD9TTVKOBxAH9gI/pbWOr/oT1pDl7mC6O?= =?Windows-1252?Q?Zds0EtFDB9jv8BM7D1D1+IKTCArXq+R1WkHzDarMpglT9zHBq9ilK0Ht?= =?Windows-1252?Q?yRe3ACECfCXCRC2TJv6s7NQHkWURNAy9oaxknouT7FxXcRtpFpxDOU8U?= =?Windows-1252?Q?WJa0Xqh7bXuZ48FjDxVsgrc3FSkpWwUi9Ti/ypzbUArfvxQibOMtLMaw?= =?Windows-1252?Q?er27EDgWTH4xe9OqPjQdkpF5oKHwAqlpMTTEEXq7ACWZkzL8/iYCOkHy?= =?Windows-1252?Q?SIXJ87aZKwfi2zuO4I7Q0bWtlpYUr0dVGaaOYsJOyBlPCsLg1q22gV05?= =?Windows-1252?Q?QmljDx7Enb+WcUMmSShyLT1eUkvUlSt55BGQLs4YZzc0OBYd7huGsAIn?= =?Windows-1252?Q?+ecXr4WhAVnPKFZFJaChvdbUfF2NR0TwZ31HZpTNoV701Ik/bnifKwp6?= =?Windows-1252?Q?tvBkopPdw6YaQlhUPAWyCWgdMv/INunnNxugC5EoFm4xQtfR3LWx2PMw?= =?Windows-1252?Q?zerZrtaddb8Z2278kgh/eSGD/U2PK11qFyh1qwHgYrqx7oLIT9dDCC33?= =?Windows-1252?Q?rNPnedBSqGsSDUhjfzhOwc=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2478; 6:GULSAE1cdOkzzv14MJHVDTF4/EzA7iJPwBAdbRTh3iAr/QxZ7TnXs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XcltnwIvplQmuoCqHwotelJ080C4mwjwWiwaW4rDJ3fHU/5QgzzAfeVWzOd4wO5Hme2OFoYANe4HDZObuRqV2VMzKLSfMbnkLBSENwXwUTOFizPjwh4Hr8HuGQZgs1mxvPhruuqCyU9QP7P5bnu7V+aIlC97Hj5PsoQF7myc/k25Tj1LPFlTIWqbQw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 13:18:00.1546 (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: MWHPR03MB2478 Subject: Re: [dpdk-dev] [PATCH v3 11/12] eal: enable PCI bus and PCI test framework 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: Fri, 16 Dec 2016 13:18:04 -0000 On Friday 16 December 2016 06:40 PM, Shreyansh Jain wrote: > 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. > > Changes to test_pci: > - use a dummy test_pci_bus for all PCI test driver registrations > - this reduces the need for cleaning global list > - add necessary callbacks for invoking scan and probing/matching > using EAL PCI scan code > > 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 > --- > app/test/test_pci.c | 154 +++++++++++------ > 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_pci.c | 212 ++++++++++++++---------- > 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 | 57 ++++--- > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +- > 10 files changed, 330 insertions(+), 240 deletions(-) > This is a relatively large patch. I would love to split it but currently I am unable to find a nice/clean way. Any suggestions would be really appreciated: This currently does 3 broad things: - Move the PCI device/driver registration to PCI Bus -- So, introduce PCI bus -- change EAL to point to this new bus - remove/refactor existing EAL/*/*pci* code to accommodate this shift - Test PCI framework. I could have split test_pci changes into a new patch, but that breaks compilation after this patchset if test_pci compilation is enabled (disabled by default). Is that acceptable? (if not, I am stuck with keeping this set of changes into a single patch). And, I would appreciate some help in confirming if the changes to test_pci are OK or not from PCI testing perspective. - Shreyansh