From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0052.outbound.protection.outlook.com [104.47.33.52]) by dpdk.org (Postfix) with ESMTP id 8E4C32B9C for ; Fri, 6 Jan 2017 12:57:18 +0100 (CET) Received: from BN3PR0301CA0040.namprd03.prod.outlook.com (10.160.180.178) by DM2PR0301MB0751.namprd03.prod.outlook.com (10.160.97.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Fri, 6 Jan 2017 11:57:16 +0000 Received: from BN1BFFO11FD039.protection.gbl (2a01:111:f400:7c10::1:134) by BN3PR0301CA0040.outlook.office365.com (2a01:111:e400:4000::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7 via Frontend Transport; Fri, 6 Jan 2017 11:57:16 +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=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 BN1BFFO11FD039.mail.protection.outlook.com (10.58.144.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Fri, 6 Jan 2017 11:57:15 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v06BvDLZ022351; Fri, 6 Jan 2017 04:57:14 -0700 To: Thomas Monjalon References: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-5-git-send-email-shreyansh.jain@nxp.com> <1763533.RfUee4nzA4@xps13> <654c9419-247a-90b5-11d0-a8e3551ce582@nxp.com> CC: , From: Shreyansh Jain Message-ID: <12807c5e-24b4-796b-5c1e-8c08090f4d06@nxp.com> Date: Fri, 6 Jan 2017 17:30:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <654c9419-247a-90b5-11d0-a8e3551ce582@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131281774360032596; (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)(39450400003)(39860400002)(39380400002)(39400400002)(39840400002)(39410400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(24454002)(189002)(377424004)(199003)(377454003)(77096006)(6306002)(4001350100001)(54906002)(305945005)(65826007)(50986999)(189998001)(76176999)(229853002)(230700001)(36756003)(23746002)(15395725005)(356003)(5660300001)(93886004)(110136003)(50466002)(86362001)(33646002)(54356999)(626004)(31696002)(6666003)(83506001)(69596002)(105606002)(81156014)(85426001)(97736004)(81166006)(6916009)(106466001)(68736007)(4326007)(92566002)(47776003)(65956001)(8676002)(64126003)(31686004)(65806001)(8936002)(104016004)(38730400001)(4001150100001)(2950100002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0751; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD039; 1:CQaiFO/KcsHlK2R5iUcS47cN9gmSf/UAhTR3CTgtA7/8ZmlSNsbqsc1ImBMJsy+mrMvPH83eGE13R8o21OJSAmeVFNxRIjs7sTraFdqOMYsTBzfKnbH2Y2dvoVE2cTUEKyUh4IOmCcl+RCagqhG+u2PQakfEHCnLtSP85b5MZYL+5JujL+UstMEw33tfLCx+oKS3zIGOgSiC/eACQfSO6rYr8vlNJd17QAtbhPjM+6jYI8GzF/S/BI9ookeN0TPeNFeCvp7rbBCpSvu8ar63a0A5ke84IunAbLAX1AmDgp4cK8BRyoVhnewknRaCHHlERaiytYCxSSi1040/76GtIV5smAEiEfL/B/GxNFBHo536P7As/EgRaYQb0zFgd+ITwbpme73TNbcjVrTEzX/TiMYm4aOtJOG5C08VaQnYwsmls/o8kx5087I86qv78mCExjgHakZ+HzDvxq6+OOJGLupbAPvaUs/V/Q6MF+grF0MfyTpHwBj9xb5LX2rLza7SH5YF68O9FtvPz9P5qdmINNO2Xs36GTxm+uxqPqFriWIdRpzOUCkB3D2OiaJ1DBjc X-MS-Office365-Filtering-Correlation-Id: 59cbde74-4e9b-4b01-13f7-08d4362b28ab X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0751; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 3:9oQh4TxXXbsQeQCyhV7Bj282E5auWOO3fj6jd5/+wDqFJ6mzkwM8fa6Kawaq2GAMDPdsBA88ofshekdxQ3MRPNeINdeV+yJ3g+fLTxguyqElZrZmsnFRTzPf9M+aHIyB6gcDPs0SWlj1yB26UsEHWsn5p7ArAv2f80K4/DsR6LA1R8FmMhANxYt3PobKp0mj0FIspcs+LehUH0/0fURdTrGcA7dWWUlSy6L4O6WF00nFNJN65A/R/4OdOhlvTa+A3/KDljGtUIk+pi9wQcBgf+XRYTYMWVnanXLikhyKUGYcpfvmZ+oETIt6dT9bOrxCpGNK26UPGQj377E+IQ3z/BRInbqarY+Lt+/jbgHq255rXKMx7JU4gvU2m3UMrvw/; 25:6ELMsvzMV/7zx5sNPao/bpz+SfonTZ8JOnPf0RvhvnA3gLW2VLxt0YNNyTrluNS8TnRSCSV3DJj67pIZprnAkcevWvS9Cmc3V/hx2ANAF+H9pLo9P8Mysxj0FqfL5uuF83TtDBD8L9cuxUszs1M1K90gtt7u4FV6k3ttFBHssd/d8lZ00ceBfz1kiK2m1JT8yCZ9d4kxAs0OpaeRAcafY0aV0mSn73lAIPt9hpln7fdtqH0YRYRHx2SHCs7JuLlAHRQSp59oF0Aj2iqJA686GvGzgn0EWiV5uyschj2tNYVmlzvxzIU4JTIzpoykscgKApzU+sdKh40I2NZy7u3+dTA2EcbHA7oKJUwj0DrJFnBSCc95VOS7fx+3cqimDhKWxjUl2FcATKuojYKNBECMoU/4ggXYCRc5ot+Z2F4/Oji0WmNSVjsxt1zJVrTqI4umDrWQ/v+uzmN40HsNbF/QJQ== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 31:zmJWXZiqy8vEFoOTMkFQfqZytB0WgTxugCscObsBfB58ctQq5S5f1DOFVoGRUhKJsOba7a5cUzAlbtSzEPSd3u4RF/MYZrB4L9PylW9dnXBj9iW/MceaNwrYKzkSBWSeUn9xRFfkx7r6P4XnpTF3308b1a/l0bHq+ZBW5DBNZ8jpCGbFXYgG6MdblpMBe2CYIwIEUBe8HPWos3O5pe7HLHtAmUoc+dfQ4Dk5Cgm2zaEUV8TqQug3JpJ7R1TavEB2QH9w1SNDuhHffYIC4tiZZLQ/y54JTTxS23IKVnChPJE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13018025)(8121501046)(5005006)(13017025)(13023025)(13024025)(13015025)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(20161123559025)(20161123556025); SRVR:DM2PR0301MB0751; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0751; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 4:EVEKBewuc1ebPfHUJcPNloV8N5rokxhQd9ZmwA6CUdtbhMXwUkcgG5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D?= =?Windows-1252?Q?ULQLwwLSUm3oRmGgNKXVr+gZ6X4Ycw3hS3N1RSAErxvCYk+ShHuFP+V4?= =?Windows-1252?Q?N1dWkQY5w3MCNrnfDw5aHU7fVJN81AIrDaby/gOPG53LApyPONXMYfs3?= =?Windows-1252?Q?mrKm8ZGuy8c1inPukzLEXDTV6zrgDtGxUR6G/L9Wz5/s/dKoZKa+/9H1?= =?Windows-1252?Q?PHzZejCwqlC29Rs5xun0iH2uC/yCbm+ksiryIx9dcwLkmAOFj6pH6Z1A?= =?Windows-1252?Q?XYRyPgWBj9nvfqM5H1uPli1ZWBIOtBO0MdVQtCVPXNPgDbSU0Q9mKNyL?= =?Windows-1252?Q?dokkEt/uiVGGB2UwXuX3LtsKLXx28DqNcbSgT3sj8ifSNKmK+zwv5ygo?= =?Windows-1252?Q?v0Nm8bcyNBuohqXevs6cRWp1eVLk2YKgaIb/n/9LXyrwZH23FvxoGMt7?= =?Windows-1252?Q?ozKYo81sSmomVlLJADugvwwpG/xDjLxsrNXX/Nj98r4gbMOkgiZxzt4F?= =?Windows-1252?Q?OMtru5evsqpbVhL05OujFuPTu0RpjqK2St5Pl4c+93Mfmi6RKjGuknBb?= =?Windows-1252?Q?mXM+04WBxaK4PAkHeNYt812DkcFNobATNDRf9oHXsti03AdWnPBOLAjy?= =?Windows-1252?Q?1iQeYqihSrcuzjOAKWtmCGy/RWvj6DNPSeXftlmis/L3Z2XIqP3GRhKk?= =?Windows-1252?Q?KDj9KHCRDSjBgv9XrYKN+nuUgFJ/sDlrMZLSDEPtm1Sq+bU1ykfzV0pR?= =?Windows-1252?Q?qIdVQHj9+k9IwOOvSSUJtBxrEhMy/Co2+RE2bSWwyLAffUlkW8Gw+Wiy?= =?Windows-1252?Q?6Rc0eZdYcZn8ikgKfHBGK3dcBf+QiIHY/6wT+40kBFtOEwrJQ8qkK2Ry?= =?Windows-1252?Q?I3RnC2vg/kxW/4V2ZQ9cNVZaZObboETou8zs0xghCZMjdeVja/3BantZ?= =?Windows-1252?Q?k4tvRYjOWe5xD+89Gkq2yc+IdC5zPAvxDvwR/keC/LWxzCHeA0bcGVuC?= =?Windows-1252?Q?1kjDz+V/SpplJ4nxCsdtMvSmSoEvNahS7Y3GyfSTiAZkJk3+8k3OnKv8?= =?Windows-1252?Q?25fDOUfGY90eOwYHCkHfAiXwFtCIjvj4Zx5tuPW/MyxHsPntuzf6wpd4?= =?Windows-1252?Q?kAS/CPMcMLXlF/62pbbJcRxDbfQ6vTyaYWhafY1S8sgOHtCT5iNAdM01?= =?Windows-1252?Q?BWUNhX6tgWMbuHbOhHpj5p7enrJ2JQORv7mgzm3nXaOMayL56oQdYasX?= =?Windows-1252?Q?3uFu4efzc9bzZywR75oYN3P4AWedrReDgUpElL3ZC7m4OjaNDH/bdRSG?= =?Windows-1252?Q?dxlx8jH3gEERv8iErWyF1CYRCkvkELDm+pX7CWHayvMl49YKhDfcnB+O?= =?Windows-1252?Q?3/5dQbXOE57rWRMvX51T3AdQBpGrOL/bhPx1Beylcv+MOjZfAqhWazVu?= =?Windows-1252?Q?dBIadFZZW6bdy7FK51N/S2g+F7szp7GuyxcELkysWBKOE4A+uQACImPP?= =?Windows-1252?Q?qiNPIaR0k9KK3Y/35vcLWzW7xj4/MHzueK385Hos=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 6:09kNYxmr8dS321HyK40E0W3g0mY6vJgeA8ZF6GgjGk18QnzNHXv23shKSZJfidw6GBQteixPBidVcYQBYhqnQ+IM+qQK3qR/m418KOp5t6hxw685c3IbKAXena7tAYghAuu49urGV5GR4s5R7aE4AvfoEzPQiwd1X5CvZXq2EHHgQbM4jB43TmnNGhodeV+MyDqCKoLbHlkeiIkd117TiHrhvrL9QcVIOVoJ0+P2HpsaMRaZfPhBbIOcdz+yujqbkmeel+PKPhZedMF6M+FTr8pcV4uwE5tFo/JY4h68e14hZYwq3nxMVJnuTxBfAdaABcSn5PB8N/ppTtjUvUl0JCFbP83jy9ys4kurs02FCgomwqG2dwB29gRg8P3OTvUnE6tToUiHMqnHUcjlqsmC9t9Z8v2rJU8KOHvuxWxm0sd6UvKVsafe8og1yz522Ggj; 5:fR2Wy0vuM849w4MnrCRvJeem5he857nS/f7g7NHcQXTGUVcZ48sEXRaBMaXCps6o7EB+kyCoalBvDAEoI/jPEWCZ7FHc1jKMYhKdHNWRWiAoFcVytMysHtGzUvya4/xY4KMhkMW7B9Fm/pyX1ftCb/pHyM0R9sHyZnMvfThRQpNiwihk2FPu2/EMKb+jc8TZ; 24:+CJzkOL8ax/zrk9B0OT13c/fhfeoUwC2qProv/QXk7lxeJZJPIMspszDoZRYFUV+BrPtan9rY08bXxSI1V7PCpp4kL2lZZqL+eUAtBJSpT8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0751; 7:My+iR54ceHmHx6RzJExuxU4Lg2ln6Z/LYraWbio1fYgHlRwumYuA/Gvdg1s3uReFcJuUNMUbj3JfUK7V6zNhtKZSyNc5vqd16AnOoBVriEtdVVlHCTsG01HuGUFoH8O9T3zAoqeeJ66As2OIPGIKi3LirCpj4WC9l4pkakz5MFqzUhZ0I/vqArijv5oOHJeE3ajSTiRpBKC98E44cNl8AfzZVZy/wR+685AY4auQffOAMkY/sgb9Gcs00nK3yeiu9I9iR2q20knkDl5ytuZ4YYZ+TzaCXhNKces2cXNVb28lLY09Wtog4N70nEu37XuP1lPGolnc+D796BOMqEuF1ABOthAMRsBv0DySlUbJ4Gci/LVCEARUcoG16AeHYQ/rl0cIHYQ26qEPSJLUDJYydbWEGIG9qkjnSoPLpfpLLagRwdf5oBvOtvJbG8nN8CaFVQf/oRT/My3F610el3I9Ng== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2017 11:57:15.7380 (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: DM2PR0301MB0751 Subject: Re: [dpdk-dev] [PATCH v5 04/12] eal: integrate bus scan and probe with EAL 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, 06 Jan 2017 11:57:19 -0000 On Friday 06 January 2017 04:08 PM, Shreyansh Jain wrote: > On Wednesday 04 January 2017 03:16 AM, Thomas Monjalon wrote: >> 2016-12-26 18:53, Shreyansh Jain: >>> --- a/lib/librte_eal/linuxapp/eal/eal.c >>> +++ b/lib/librte_eal/linuxapp/eal/eal.c >>> @@ -844,6 +845,9 @@ rte_eal_init(int argc, char **argv) >>> if (rte_eal_intr_init() < 0) >>> rte_panic("Cannot init interrupt-handling thread\n"); >>> >>> + if (rte_eal_bus_scan()) >>> + rte_panic("Cannot scan the buses for devices\n"); >> >> Yes, definitely. Just one scan functions which scan registered bus. >> >>> @@ -884,6 +888,9 @@ rte_eal_init(int argc, char **argv) >>> if (rte_eal_pci_probe()) >>> rte_panic("Cannot probe PCI\n"); >>> >>> + if (rte_eal_bus_probe()) >>> + rte_panic("Cannot probe devices\n"); >>> + >>> if (rte_eal_dev_init() < 0) >>> rte_panic("Cannot init pmd devices\n"); >> >> What is the benefit of initializing (probe) a device outside of the scan? >> Currently, it is done in two steps, so you are keeping the same >> behaviour. > > Yes, only for compatibility to existing model of two-step process. > Ideally, only a single step is enough (init->probe). > > During the discussion in [1] also this point was raised - at that time > for VDEV and applicability to PCI. > > [1] http://dpdk.org/ml/archives/dev/2016-December/051306.html > > If you want, I can merge these two. I postponed it because 1) it is an > independent change and should really impact bus and 2) I was not sure > of dependency of init *before* pthread_create for all workers. I forgot _not_ in above - rephrasing: If you want, I can merge these two. I postponed it because 1) it is an independent change and should _not_ really impact bus and 2) I was not sure of dependency of init *before* pthread_create for all workers. > >> >> I imagine a model where the scan function decide to initialize the >> device and can require some help from a callback to make this decision. >> So the whitelist/blacklist policy can be implemented with callbacks at >> the scan level and possibly the responsibility of the application. >> Note that the callback model would be a change for a next release. >> > > Agree. But, that is not really part of Bus patches - isn't it? Or, you > want to change that with this series? > > >