From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0087.outbound.protection.outlook.com [104.47.38.87]) by dpdk.org (Postfix) with ESMTP id CF995282 for ; Mon, 9 Jan 2017 07:32:33 +0100 (CET) Received: from BN6PR03CA0033.namprd03.prod.outlook.com (10.175.124.19) by BN6PR03MB2465.namprd03.prod.outlook.com (10.168.223.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Mon, 9 Jan 2017 06:32:31 +0000 Received: from BY2FFO11FD037.protection.gbl (2a01:111:f400:7c0c::174) by BN6PR03CA0033.outlook.office365.com (2603:10b6:404:10c::19) 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; Mon, 9 Jan 2017 06:32:31 +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 BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Mon, 9 Jan 2017 06:32:29 +0000 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v096WR48001136; Sun, 8 Jan 2017 23:32:27 -0700 To: Thomas Monjalon References: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> <654c9419-247a-90b5-11d0-a8e3551ce582@nxp.com> <12807c5e-24b4-796b-5c1e-8c08090f4d06@nxp.com> <1912570.qtcMvjyK2L@xps13> CC: , From: Shreyansh Jain Message-ID: <277ffd19-d6f5-d7b8-abfd-70870cfd4a35@nxp.com> Date: Mon, 9 Jan 2017 12:05:53 +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: <1912570.qtcMvjyK2L@xps13> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131284171506220417; (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)(39410400002)(39400400002)(39860400002)(39850400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199003)(24454002)(189002)(377454003)(377424004)(65826007)(65806001)(65956001)(33646002)(47776003)(36756003)(93886004)(189998001)(4001350100001)(4001150100001)(15395725005)(97736004)(23746002)(68736007)(77096006)(38730400001)(50466002)(64126003)(4326007)(230700001)(54356999)(76176999)(81156014)(81166006)(50986999)(8676002)(85426001)(69596002)(6306002)(83506001)(54906002)(626004)(8936002)(229853002)(31696002)(110136003)(2950100002)(6916009)(6666003)(86362001)(5660300001)(104016004)(356003)(105606002)(305945005)(2906002)(92566002)(106466001)(31686004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2465; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD037; 1:+V21FZULY8vKbivVuZ6dv30/JRG6dKmGT1nGy55nmb+ShWYwW01DRmErhtDjfWN6OF+zx2Q75FFoIyPhI1IALU0fWyMbaFNIrldR/Cv7yK47SHyxy9eStCmIdDHJUXPedl+U0YDSVAaW03UKMWAQtsqYlgtM2DoYXjuuD7jPemuMpBVaAm3nntSG5aQIRpfFXkRj4i30bdTSqKsyuqWBYjeNIYNsPV4wWZGiRFpUB30tAT7bbkgXfmBw7eGS0194mdx4UF/Sjt5zLtQLb7iRLoLDu3IGaii1NuRnbRzbbF/H/7sdh1CpeJU8Ph0yR4WqONO4KyslVbVKfHFUWXZDIeQQgj4hBrRiuIYk79Q1Sr93UpwiVMLgAzQt9xXeoCVVKneF/V82oJfKF4v9KZEkQeqUBe5vriOKbsj3rnyPibtC0lBmJwIL0Tqx1p9dEkpbJxyWwOuZaJOxNKkOugLixKS/Z6opIFFv80xdnnWjPMWlspQzkUtChUSkK5r1CbTqRnJ/VL443MB2XT+YYunnIpmhuSdztdS6eA58xBV3y0I190w/IVe7ybGd/ogQGIQ4 X-MS-Office365-Filtering-Correlation-Id: b75690bf-91a9-4b71-1133-08d4385949a4 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2465; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 3:YpBuWilAZ/zN9lcALsQDRB7VOTU2RpY4CIwwX9Zq930cjkf/V22WASgrh8rnE0my+Ye1ZDM6z+05N2p4ttzHA/7ViYpuxIMiibmkPaz4G6/ICNHFy9cU+bY/DVJtC8Xe6acgPIuvbRcR0TU9E+mHed13tSLOgEusXL9Rsgo4yAdlVX7+CJwMTXNMJOTXxqNyTO09SYhwXxNB1rP1eZE7M7ZAvK1CL2bYn9qu9HwW2OYVh3XIFkiCSFShDyN260CAefD19n0sYhp4A0wc4x14ONa8/9+IBja4Y8nqV5Uk38HVBQOVAkylsKSM3dV0b7dMFxQ1hukRbcxRtFspr35qnwgj0QThyz902iEhC/P8S9Qw19o/myG/5g4eOM5FSkAz; 25:6RiLMLu0usZ7UHdJKNsDCuL5vJ9j1xXfl1VJp/0j/w1GqZHRSBqUIO7KVLcLrQzSh6MDXcvYt01R4+h3MpNzbZRnqYq/31RpFBAeHws7Pg2DQ87CUtaOnBgx2Q4bYNkpCiAyOjeKKYlJc7wyFIbnNcgRwFhv2s837Q1ib4OSx/SUzUfcxU8DOreqR3TS9X9p1T1GsPdhiMnvn3wpeGSYYgIYl4q1jaLecyKgRYAx6QF3I/0IUiAsAHEBIhgurxIQWe+fO1wnf6Ng40VxhzJqv3+9a9+0NbE+RoSsh3Rs1k+JoMEDja1ETSivsnToq4tNbDEmfqyjtSv053Gtk90nQjfTs0GchZ7Ir+mtTJ89b/ddEk4Q3LH9eVfvqjEZxwhUyivWbNDVoOUJtQYGMf2lpZeJVe3welbcdtsP5wcFEMKsOPl5AO93tKlYvCMkg3oQgUZ/O7jlgLPc2POqgPx8tQ== X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 31:bg0osOqHujw5vkEzPDDQfk8bHv2EZ7ui9YFcSy4miQGa+zp00+ZYIiAa7YfOTy20jAs3IvoegdmXECXuVLaw/MJyuhUT5zZM1jhTQ1J5igoYbAB3A817HaButV8e90ki7ABSjqmgrL5ixwHdAjNlQLUfiB4vYixvAnucQ0c2mUx+CANBdUGcDaFbkTahv5YPaXSnoe5MH6+FFTWMGq9pXNXkHTcQi7J3vQzp2D7lEfBsnEfJskZ5F/vqGqzqVONIz3swTA75S9DAmzo+6g7qfw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BN6PR03MB2465; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2465; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 4:8R2avjAc5wGpLhiCCrH3BILY6LMMePJEGBabdStcFQXPWxbePTXKF+/AbYbTeCj0JczZL9a4C41llCUUW04hGQFfSd8adEtaKqhT2fiJ2Gxc7nbKFrE6tuYV04E608WJ+3Y92nNhCWukxuFjbC0Ldhy8K/F3D1AR8MIt/VgDKjWlcesVwIO0Xxhm8kZO2fL7JOgYWPRkp3RrmcQfN9nRUjIHcJF6t0gPiyvehyE3hZjlU26X+RLhB07pJbi8XZFvdeUQmAsP+WvMg3RteyLepL+Z6KlfLiJW2SI+Fyoq20PRWATqSugDQbdfl61ksCkuX+XNfzeRuUgBUnT99Uc6S0Iv23M56Ptt3JqQGk3Woig7I8mkOgsF1nZCzXdmWobZxgLf11K19NWRn5Kyn+mdAywE3QG85j2CEW9EXEvCmVcm0F+SHEbfUO+lsciYqn7RzXt37/ojVkhv/7J2Bt/+Ixv6mBLUjlDMRsY7p4QzTfYTRMFWVJv74o3w5vCMOg6r5KEFve1nBEO3ufe9fkakqEl3Eb4GoZfS4l5FdMZkAb4eqU5NPSLdpfwz6ODG3Kazg6DL8QolUY1OvcrswulzEdDzL6THi3U1ENRFchG9kHkqht3Mz+Ol8k4s054y9wsQ2X242+VYgIKsWGJl9wWmt2iI0MiKWUswhJ3Nxuka7r2Qq/40i4RD+22HHf7/JwU2194FH4kM2tetd4ka4TI+lw== X-Forefront-PRVS: 0182DBBB05 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN6PR03MB2465; 23:lChGZZVekFuSYQ4/N1Y+zmHjiHKfPhyy9tzc0?= =?Windows-1252?Q?Ud8hxobEq7w987lORVQAP7Q4uo3VBroA5s/bXb9FzFeZrdwRuaK/vXFt?= =?Windows-1252?Q?h2Kkx4nfEDJsReRo/LFL+3DhyU/cSTtpCx+Lew9vHGRSgcdFukAiXssl?= =?Windows-1252?Q?J1c3Z9M1UyrUzOHVZUQjIhuwXomNgNG/9pIH4W3owH1zuEULo+axCKA1?= =?Windows-1252?Q?Z53lTuF7dinIVwzFWdk019KcPTvjpIwY+HPA2obl7oTGyeXQqZc4Wj2X?= =?Windows-1252?Q?xHVF+NE8uN1pBw9WgrTsa18ye/uBgm5ZjXqck8bXdkcWdnsAcQgtBcaG?= =?Windows-1252?Q?KQ02MCA2+lxCxsdp+8ApKuCFwu88x4JJMUUMp+jeyS9FRo4b2YzPeTnU?= =?Windows-1252?Q?FcUqaWTx207nBbvM7qE77uKbOZDjd7NeO2EpOvaUnJ8eF2jnnXUk+/+A?= =?Windows-1252?Q?LVKAcw4Wd8qjc2MJSFKonBT3ipJD6vrs1IeWZk1iZCda15NRREuVTAcI?= =?Windows-1252?Q?r367flzYwuA2qsgSLlmQ2UKzdhgZOTs0e0/lsQtekUJL4s3ZOXnkO4jx?= =?Windows-1252?Q?DO4a+5I6/fR1toM5c5koS4PimW5h960f+GYZ+yroHZeVtH/onsxt5E8T?= =?Windows-1252?Q?wbjvrIOVGVy2vPuA3QU3pyAr2HVNVfridtQsJR74xSMeu+p6pj6go1Wd?= =?Windows-1252?Q?4w2ubE63hdOeeeZjAIy26T2u6Td/utx3HdTS55kQDHSwVpUkmXAxkQYM?= =?Windows-1252?Q?eOhSN4CgiCJEif9k7wXy/o0mUGfmaSXzvCpLy9+U5tf+KAmFt3bVEfKx?= =?Windows-1252?Q?Hyzp2aux7fg/S/NfGdk/xwA5GO9Zk2cexroGAzACuXp840tMvsiDVcWx?= =?Windows-1252?Q?Vj7NtnbWNb6frN+ZTaQnrvW/TB0afDf5F4EwsB481yqYgqWsPlY9Ay0C?= =?Windows-1252?Q?N9u42IX7d0twumzaLgTCfIPD54Ig9spn3VyeXh78P8hW9HBpwfpcJE9U?= =?Windows-1252?Q?hNiqJvQZprFBEH0QIgUhfVnjvoTILWZu7uJRsGRoPhvRMyiTyNpEMLhm?= =?Windows-1252?Q?/1mfuFYmTpE0TYSm/aMlh+2TZXsxxIo1qiYWFzBVKSBtpG3wQ4gpQwF/?= =?Windows-1252?Q?XOR122zHoQzjHQbv8jByLrKbzNCgY7shthumDqNC2264mp2fKbZ1VbVC?= =?Windows-1252?Q?31VzfirG2rvFbenfwmD4i/6UN0if5bgdQ9NPg4huFEX4uQHkVDOOcSeP?= =?Windows-1252?Q?KYmh6iYK9iTDHi896lf09jn4QXjdxalAVIzQVgLqe/taCYnYAeL+Hh0g?= =?Windows-1252?Q?X788dJIJlc8C0F0kalqO6aF3jKheHTa7XGGpndXMv21BKqYAP7qGnNIH?= =?Windows-1252?Q?srsUCztp8JpY/rgt8Cgp+8AqnXGX3Qm8xCZsAP5IJUGmvNBSNxf2Mgy4?= =?Windows-1252?Q?mYhNCuW2ctxa0TJf8Qnyv+aAs5VTGXJ3+58jkKWqkzvmZdVSsZ2tbs0j?= =?Windows-1252?Q?1E8KqjrIXxTfylknaD3B+5/yysJbskLT8bdQcLnUnZxCi1Y6DU7YoUsU?= =?Windows-1252?Q?ElJrUn0gqZwPFpRodYQuCgrKqTQzR0N/5rDXLU9GPOSK5Zu//gVF8n0h?= =?Windows-1252?Q?hLTxap3IN15bF3vcQJLKFiCrT9cBaebbYQMcjLF3CwNgM0dTI+QpXilK?= =?Windows-1252?Q?6H5EU0O2KQWDY3PZEA/+KgelWPRnzheUC/0aEKf8buOJiO0MR5h87Lqv?= =?Windows-1252?Q?YC75H0i1BmfOMjibSqU73E4WUGZw83C4QjgL1o=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 6:CZ5wBPY6tD5i8VY5/TvOnm/r2FUDa9nQ8+SjwTqGTAdrFX5mIHEun0obCifL5+x2iEkbFxloeZAjX0wy/+ILFDGF3EJPqyGRfFzX4rVOhlTmyFFXfztTyYZbUZ8u2/5YmgQuOu5zaMdh7nbby1/PXSLZFj8NqL7jnrj5Jezdr0Hg8eOZwdAREvx8cgO6pvPOdLlALHXc3OX3lDPYCHgcmVvr02OsIuC/uM3mc2BR1TtmvjaWlaTHzdHmolDkV1ruS93lR2IlRkKhaBJXl5Yz1YBNutjs7lu36no99ARDgSyshy3Dyxc/agtNdtb7+syiPd06U5SQryEDzS2IkOahDtUN0dYaOy6pSicc1b3fosKtbaqzeJOCb9rB6LuXY1EAAaK7jd863Boq6p4lF34D7MYv67TiwhOSjrMd8Xlon1zwVieT61a2mw/k1nFlg1Cp; 5:5sRBxc+6ro31i2ltM8Gp56vK1YZ7cQWo+v03P3OTjgQQ/jYpegsOk2K79IGBaAGMb59SXWmHvrl1Jk5x5B+XR/E60Z6RCUk91RRoLAlkWbXDCo2tnTrftZRTmGk3uxXwtM/JWWaVIMcx6iswKVxcDtR9WLoWdnghYrQm+ADPYDcihYMT/p14MInz7RHn14lk; 24:YTJA7xKtOS+z5LFcHlEXIsglqtnNtpilrMTFxwxJEKl0bJx09CN9kvENeJwNJ4lf2XA2qp9TsEech344E1ZMSR0YGqXJYTIGrs6EaAGrn9Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2465; 7:Im2i+qcwmdts5msAkfyK4E17+zwbS8PYx0sTfB/rrPTiBEoNHsSdNt3Z+g/YCxH3+FTJiFWttlThHqBpg0f5BmO61S8I7vGBEYytAenraCplj1iHmBbWd3NdhMxn97UG3hFFmxlBuoxx1ST6FkAS3zbXPVZ9XlheFpeXvXsfE5DQeWa5DLPlM0Mv1uE/jH21mE9DBmZ87kFu/OjMeT68nv41R7byGyPrPSr6R8EF9cK10tdeHKblDksaKlYJuaS5ax9lYc+P+sPONb4j6wcFtFxNfGuovfzaugNxYzHCrvj41RdIQhXuQtrvwWcZU68s/7tDelFzWGXots/4THmWFkSt9+RJGL/5bu4etP01TwbSVO47JVBJsrUKK+HkdtUp1vswe0w+98sZe4YcN0Gixk8oBzTWy+VPYb+iZCaHBKd/BpK92eb7qDIVb4yWxTc05767o0H5VrrDtH0R0Xitpg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2017 06:32:29.3584 (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: BN6PR03MB2465 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: Mon, 09 Jan 2017 06:32:34 -0000 On Friday 06 January 2017 07:16 PM, Thomas Monjalon wrote: > 2017-01-06 17:30, Shreyansh Jain: >> 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'm OK with your approach. > >>>> 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? > > No it is not the scope of this series. > Please could you add it in the cover letter as a next step? Yes, I will add to cover letter as Pending Item. > Thanks >