From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0074.outbound.protection.outlook.com [104.47.42.74]) by dpdk.org (Postfix) with ESMTP id A63282B8B for ; Fri, 6 Jan 2017 11:35:11 +0100 (CET) Received: from BN3PR0301CA0006.namprd03.prod.outlook.com (10.160.180.144) by SN1PR0301MB1583.namprd03.prod.outlook.com (10.162.130.17) 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 10:35:09 +0000 Received: from BN1BFFO11FD048.protection.gbl (2a01:111:f400:7c10::1:148) by BN3PR0301CA0006.outlook.office365.com (2a01:111:e400:4000::16) 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 10:35:09 +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 BN1BFFO11FD048.mail.protection.outlook.com (10.58.145.3) 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 10:35:08 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v06AZ6DN011851; Fri, 6 Jan 2017 03:35:07 -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> CC: , From: Shreyansh Jain Message-ID: <654c9419-247a-90b5-11d0-a8e3551ce582@nxp.com> Date: Fri, 6 Jan 2017 16:08:39 +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: <1763533.RfUee4nzA4@xps13> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131281725089867510; (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)(336005)(7916002)(39840400002)(39450400003)(39860400002)(39380400002)(39850400002)(39400400002)(39410400002)(2980300002)(1109001)(1110001)(339900001)(24454002)(377454003)(377424004)(189002)(199003)(230700001)(6916009)(50466002)(189998001)(64126003)(356003)(65826007)(4326007)(305945005)(2906002)(86362001)(626004)(5660300001)(31696002)(4001150100001)(97736004)(104016004)(6666003)(110136003)(81166006)(2950100002)(81156014)(15395725005)(69596002)(8676002)(76176999)(77096006)(54356999)(85426001)(229853002)(83506001)(4001350100001)(50986999)(93886004)(47776003)(38730400001)(33646002)(54906002)(92566002)(8936002)(68736007)(31686004)(23746002)(65956001)(6306002)(65806001)(105606002)(106466001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB1583; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD048; 1:y84h+33kA5DCtrShSwEUM0lm1DLXxpzL9RDj7oNSFv8jnxHsvb9FL69jeGdrZWk9AVVUkCxSQvdt6WlUTbgnFCucpkfx9GlUEciCU2kWghGarOkhjqILek8fEgqPKaK9eUrwnhu0AGTmufYPLU8UhyMz8nWMh3go2fnXLqOq/3hQylGMrgIfmBWCLNgcfne1ueb/J4ViZdMgGeNyAuaZseT/aJ0aE5ii1Mj9K0XJl+xx26JSFJsLh4DVndr/OPYRhaJwO/Tlh1hi2Nuk1d0eBNIBE/T/8nSp1j0oh1l7RVxrj0+YJpJ0nT6hfWD2mEOlQ15iRMTeHZSlSBq2qPuSknhZlSAeVEihIdto012+8NXvl30sHNQcKn5LPwYk5Z1pnTxoHABMgFVg6rttx/66b/ESXlTHnrpgsDD/+HNw5yGMT/1dE3SncmtkcVg8mjEd39mRDH/eaktrxPj1rH17iSiKmh9a82buJ842sfXALu257HEWQrAtQnhHNBnPphswyNe5Z2RU/Hf5hDDpp2iK+Y+4Jd3cfPspt3d13g5aSqZUGeSKcrav64qUxNWFht6f X-MS-Office365-Filtering-Correlation-Id: 4da5ae92-47b4-47d0-059d-08d4361faff0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:SN1PR0301MB1583; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1583; 3:kZT5uxFnZPtXZTnepWy4UD8POO29Z7bdotw3qHQrS3jrVcpHT1ZZ23TC4BnxDDz/p+udn7rVJdIx2F/fgoY6rqD6VLX6oDaP1rQ3t7N1w56Sk8daaCGQGfqHqUVB9LBF4UTa8jgqOOsPVixs69mrjmeJm3Q4v24BC/pjrhzaluWHlU47nBSl8gU3lTopTpD0B7Xt1FTzyv2jiwPl4NTb0Q2Nn8eiwd9Mm5FeS1xQUpILyGZbaWfIm/OHz8KkElhulYccWZGGwfByQld34p5GTYLpmOP5asSeK07Ssfqbi2ltFmXj8OsvO0RZCmT/XLgLOsZoJJTPD8CvelvbN29+11YLcLQi44iuiwN3Wd3tOmhnzYdIfi+2wP5WWCi+2i9q; 25:3RrlO7Q9VK36ZKLsAoAbE7F967JekHxwiIZCcvnba8eUimnBDxcZ1+OZ3lBpRyrL0DHjgiDdnmLzJfb3oEXxcZRdCLkcWCrmnZPwUuodrJgIPG0RM3RUIMlKwfPWYNZwwja3S7mdt+5ThKF/C4VuGd4dd2/ThAz3C0hAszeiclhclIpJ5ckEK3n69R1WoVe+atl78cGDQyjGe/jjVbOlszEzHHi86TSV9xmr9swAjFNblyK9i+3Bcd+/Pu4rJGfhTxdY9CsRfsDSVBoU9/jTznDUVzxQktYdiyVaHJMTlD7HooqiOXBfZtIXF4cnFVX/kA18Si+FeJMLTJGzADF4FdpSIIZ0jyYp8EDLyZy9CdfgeacPnuhi4iUlEc0QbadcPWweBFnQhS7UYPV3niOIrRVBOU1ze2xnmaq9vUQazjudeCFjCq34GvYdqZDH1JhP4w7hiHN4MNg9P3AitiNfqA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1583; 31:rmNfo40jWHfpBvo0YIfM44Z7oHa19gf40k0YVz6uAyZE3b4ATTpF/qrhRYRJRT2lBeKwVyp0tGTRW6AQSOL2EorMbUntD2SzlF9nCXM51YGH11fPkZuWX5xLOBt8DXho+O+LJfdIOB0CjQua4uBReTzwn0X8oW+/aBeQS17/2jprST4K4ffC4rNEGlIx6o6hjzrvDMdrLIp6K0NnBjIggAohQniNrb/PuS6jrg3Qi7803aCHUvPbDO66/txxDbDXwjxmNYEpxhZ7pp42LE43Fw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(5005006)(8121501046)(13024025)(13015025)(13023025)(13017025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:SN1PR0301MB1583; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB1583; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1583; 4:Y/mIFq5AFOObkkMCakp8/1lqLsadv/jA9Giv2NUcqdQYs+Ni2lkYYC8m016H18fqaXkeSPMWzWKhxLkHnSyKoldDZv48zXCSSgi6mt9sRkNvPCXlxbZvI5sv9/3GHst4tlBHFcHmtzZ18+t11ot1Qz15af5+F+kKNnK9MiVJOOvnE+lIgesqXLdvO/nmSZUx2zQu0l3+XkTvOVP+6XfQMO/nTrSJuyMNYVd7e7bArpkVkBjWa+TS+eZ0qljihl4xU6xHAelO9de5braEpqbdU2tgqEA5Z/76uBrFKdEghAu6gNWIwrxkTyNRwIlZUZT7afDxuaef5I/g/stnIfPQSb35tabzh0GhvaUFTE5Iu78aa0g5ESWVmYNGXqXsRv5HNL7qVqevUwN6hCllk2Woj44YvOibNmxgpkkMdh09moy45Ts+e++o9q96lRGtMHPLh1xFTRBcOp3N8oeq9xyUMSJbbBibxgMcxlJo5AxypWt4LgfOvV0bw7WwBjJAprEeC5Ix8ThdEIrZnX/Bn7STUh5vsXeW1eO6totPni3AzIF/SG50TITyfAVo7B1xwHt6dvDh09ohAv3A81g/zC8Te7mrB35vZH0xWqpZeliRf1kc5pW2Ajh6L/fkPqz0jCm5Fh8bPcKjyoZ1mwKKUj4V8v1fj6Jx2cKlUZbYEOIQZJZndh9l0aCPa96wItwH1vYzGx+LXY+K2ietv4IWWDYPMg== X-Forefront-PRVS: 01792087B6 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN1PR0301MB1583; 23:MHC67+VZgSArSuBfCvpjMxhSc3IZyuHnkVt?= =?Windows-1252?Q?JKbDY1g9ihYx9/zawdUIfcY3eXpPuyj23umvuzOB7fz2Td7jCSmFsAhs?= =?Windows-1252?Q?UPrq5lOo88/iesIK910+zQvAd/9n9mmHoiemG3wN1hVvprNKCxiemGpb?= =?Windows-1252?Q?9Oz17WIp+TALUJV0RnFMMB641xtv7YGaKwPtRX9beZEJdqfWK8uHZ4Wo?= =?Windows-1252?Q?9xsdrXmE+8XR0FbgWS60fdChwHyjGHSggxHsRVls0ZM3P70gNOvkg0SM?= =?Windows-1252?Q?1RwrWygsdvkWXRjUaMjSIpfq2JiCHmqs4W3DFUPM52XQgJ+Hm9Cl9qcC?= =?Windows-1252?Q?eTYMXJCfEtoJ9gF/rYwSyM2iSnwMUEiEldUKae1NJu1+Y/8QaO12fjuo?= =?Windows-1252?Q?klAWwrucrGSCr4z8CTkSNcjG+c7kbXmscyJO4TI2iANNxBtAxJWA1w07?= =?Windows-1252?Q?fda/6jKAsc64WfxoWJvnaWX8LUUGhVX/coSccF7uzpImW71m1xKxfbGl?= =?Windows-1252?Q?QEj+/QNJrAFVSvdAt9Jl3kIhW8v4kwRmC0KlrHnqQc1Stz/v/Wo0yq2J?= =?Windows-1252?Q?UvRIQyJpsWeSnDYKzjptH+7Qn8sKhZO+q7SuAb9cg3dvNqPK2WtXcNcf?= =?Windows-1252?Q?hoLt/q+dXZd7Pj8gxS74ktWsGoEdMvp4T56TZCzqrdPjqj9IWQ2bmnMf?= =?Windows-1252?Q?A5FraK6+y1dxPE7DfJoLBE48K1RC6I8fIFMjyhYXubzJQ11Wv8rB6WfN?= =?Windows-1252?Q?2iHPmMA9bSjFSY7yNzeJu3AqxFUv9aRmdBO2QJ+Ch+LR82tvQLXCPL9G?= =?Windows-1252?Q?hQFvkizVoVlTSokbIS8gWS5X4sQTFvfAeyShG87jCUdqK4WePp+6DyN9?= =?Windows-1252?Q?W0Y7WqEDF6RlDnIdGRE7utHdXRtTZ61MlhREpyvIGSk1w7c7njBDGT7/?= =?Windows-1252?Q?d/c+hizJp3oVTh/RpR7/TZo9kt+nbyQ2or0q31r9eM5KAybkSw9wWkbL?= =?Windows-1252?Q?A3Kj6nncEp4jIp7gvfR70X/Y/4r4zUIJ/fBrAod463E0HHZAR0OGgU3n?= =?Windows-1252?Q?/jVWdCpMto7oxMUNNVA+bDrjJL+ZMQcV4bgUb1TiK+fDf834yS/qRbWC?= =?Windows-1252?Q?mHnd2/6voqzIdwxTsp8tGQYzExk0Yr4daLS6XRmYkf3FcZnVbtzjlWuQ?= =?Windows-1252?Q?iOOx0hojr3LrCHzmmNylHD1FeXTNYkKaBLIs+g0sviGB6BiiYYno5Xvf?= =?Windows-1252?Q?xR1JnbgeC4IaH5c+ss3I4Pw6xzOpYdP2QrXmB3ufLnqrbLZv8DuMljp+?= =?Windows-1252?Q?Gu+riEAJnnFvpcwkx9/VjGJUlczwKyMzRFaVX0zauNFOPjWCo2bWpovT?= =?Windows-1252?Q?KcgHiMtohgsffL8f+3Lu8Ulgv3rt7soqOBi6D0vHQATdYBB+Gk84xJLI?= =?Windows-1252?Q?MSwxw7YrGUTi4w88NrDrFazVCbXohlxTWILVGbUhIh4nYoru6T+XFrWR?= =?Windows-1252?Q?SlExine4wyXLup3Oq2dXsIG/FcnSilPEuDBBeVkCWkR12kVPlhmkNuij?= =?Windows-1252?Q?byVDB+9Cof7Q/wyCjiqsYtTWAZdmkn/yyEfFE8EfEYgLGujVn52lXlhZ?= =?Windows-1252?Q?wWkqD9T3VH8qMTecsxMHxRplcQaFNPZb+IjU04lz07HvGnDvK54vee/C?= =?Windows-1252?Q?6ewqjvRR2w0znBn0y5iDkmMFZSuJQPtekt6npaGH/zEItlo4GpFHWz65?= =?Windows-1252?Q?qLl1s/ipgxGAsexsufwQK+TKU1RERM3/madLFfFY=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1583; 6:WDBWuN9MqoWzFlzn/d1aRotqp3+UQVUjkzoVvze21bPVP/qtd15WeH1aNRH8Uh0VI+hoLWBSZggEWVRroHUPss3YUlBVqHlwbyeGv+ue29fSE42CAH8P+QANGxz8KmS4aqhixjw4aBP/LAgNhwXmSaP0iWlfOPu2dugzVzdCfp4HVJVzSP+88Jn3y3N5GLTU/xHFaFoCgIjfhZ8YtjBVNNJ22NWCJkWL+VouhefDbGiVcSAmwrQorTHAWsFpzamSnqZ2LJmzcgTtJsmEEZ7K+NcjYgtSyu2JS1yr+AAMorlh9XJCO4tBS4O0kst93QKvyE7OQrGcK4Hxr/V+tdKnuoe7rag0l5OindyImAHNsc8PPn4yUoYZRsGy8ca6FsH/Qut74C4O/UhhN786jQmw8mEgqFdXnxB1vizJwzMI8d1ZtSmYhOhK5Jf4NRPWFpz/; 5:/rAdzZVCH7x2B04NWiAJ+d9S2HLyp0RENHI/Cv0Q6cjVnW5oifv0Taqm+9coelZSmNajaoHjgNMh+gQVBFaP/i7PybvRh+03ROXi7WZo2juTrSm25mroxqmuex4FDtoOIHav1CaIdYxSWwjuVqzicQpoR6huvIbEGi+TRxxrfiPTCfwkMfNlpT2sSD/2MtLV; 24:N35awPIQP5XHgtiPv/6dPtRXBSlVMY0/kAagwH7832aqy3SKcXWvIbn6OG9xc4s0ZJOzMaxobzTaNIgcdIOFiRbuumAh1aL2rpL6YwuWm4U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1583; 7:HuCDyirU4By5GBT9rH2JRjqerkVyS7seP9r2/Nu8eDfv1BpVMS4tqqI59kvhISpjvl6wOndsGzFVRQHCziqOnWGqbptkS9LHtS/a6fVQpPkLCo4Of7RXkiXfzlrPpKL4wnlm6oGkuwGuFyLy+Da5hR/WUgfLJfw56zt1c0/AXyWLAvIo9hfGNr8YJ7H2OD0iJ64ixDWrvYoFZl7wNyOIH2R3OV8f+gsa2R8+VWzneFIAbA1dSE+jIEiVgwu96QYc9KXFIAu9UQM2vIOfT0yyyEvPMnqKe+0N0YaPq0OpjxWHhQ+NqR3KJdFLCl+ODZkOWxqHHQpf+W8T2C+aVG0uMkzCSneqGPUCJ2tORyvzhfYG6FSyo7KbxlEaoWWpLusETU0nc+WtsXLK8BYgo+k+da8uMu7I4TONND6Dha3hxlf7Stq4cku5mRO3cc9ij8RUU6wqEoAsYSO0wUQHWB1IEQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2017 10:35:08.7371 (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: SN1PR0301MB1583 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 10:35:12 -0000 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 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?