From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0077.outbound.protection.outlook.com [104.47.40.77]) by dpdk.org (Postfix) with ESMTP id 13F851B1BD for ; Mon, 9 Oct 2017 12:57:56 +0200 (CEST) Received: from MWHPR03CA0025.namprd03.prod.outlook.com (10.174.173.142) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 9 Oct 2017 10:57:54 +0000 Received: from BL2FFO11OLC013.protection.gbl (2a01:111:f400:7c09::161) by MWHPR03CA0025.outlook.office365.com (2603:10b6:301:3b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Mon, 9 Oct 2017 10:57:54 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; infradead.org; dkim=none (message not signed) header.d=none;infradead.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 BL2FFO11OLC013.mail.protection.outlook.com (10.173.160.161) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Mon, 9 Oct 2017 10:57:54 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v99Avnk7029257; Mon, 9 Oct 2017 03:57:50 -0700 To: Jan Blunck , Thomas Monjalon CC: dev , Hemant Agrawal References: <20170812102220.27773-1-shreyansh.jain@nxp.com> <2075457.Vvey9mxHue@xps> <10403057.Ll0Xg1E4J1@xps> From: Shreyansh Jain Message-ID: <83422f57-4c0e-5806-c741-ed5ce10891b0@nxp.com> Date: Mon, 9 Oct 2017 16:40:03 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131520202743126863; (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)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(24454002)(52314003)(76104003)(377454003)(199003)(189002)(65826007)(76176999)(50986999)(54356999)(229853002)(356003)(68736007)(189998001)(65806001)(47776003)(110136005)(65956001)(2906002)(305945005)(230700001)(8676002)(81166006)(6246003)(105606002)(104016004)(6666003)(81156014)(77096006)(86362001)(83506001)(33646002)(85426001)(316002)(50466002)(498600001)(53546010)(8656003)(106466001)(23676002)(2950100002)(8936002)(4326008)(31696002)(31686004)(53936002)(97736004)(58126008)(54906003)(64126003)(93886005)(5660300001)(69596002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC013; 1:tfAGYqloX4LDwnFesiG826QUwzS8P/YTH52k4CkPb0l2803+n6AsjDZFz+UbdOtzVODqETJ/Ckwm2xzCyA8kVwXP5Pj06Mr//ixJhECzF/3I7hIyI7Ojd6paDztF2fwX X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44fc4d33-c650-4f58-9b4f-08d50f0497c1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:ivWLF4vZXivn7dOzvwCbCKrn3m2m1VIJZ8Rj/f247yRFQeUi+hQT1CmkgyuwhBEsD3pw9DRfF6OPYQH1nbr168UVkngW/Jhm7YN8n81uWnRP5awFlUcgMX928lPP9faT7xMMWB0/1Yq7TvJCybgPXZmptb4LRU2+5w0qXtkRGM6okE/XtRjRqjEqER8FYLeqcFU2a3CW2Oo5R5hcZa6HVCr0j7aX0lHgLdpCpNwUws5vms4/Iq/xmMM55HdFSa+k3EMcFdp6dKfra+cH61ad/CgtxWVdgtX17lNVipo0GfGmhx2wZ0CxIjm/t9jt22tUgr+xxSQ0ICI20ZVXV87pa3d/UDiiN/wXDdm5kRTLENY=; 25:YpPdQBtKK3JOmsptedJoPnKMP0PLZ7nkJKd6JVhsf2NnMndkLBQcKwSCbZ712lnoY8XLpGnOfk8VJ84+Oq0GssucOYEo2jUZ0fyNlQnqUXamHn/qZXRYrziKobJVzOBkxA++6TjfxFjgOCK0bMPCzn23moDu/lOZuE/8EuTw6ISuhgLLLoLpWhRWBm/GgOHUIgsvuJdatkNMpDcPy2GGIbCPFgeb102S4BynrZwL0ftySC5Hhe82ihcyaMOLd4M4D8K8D73oxA78TKJ52KyparqUz/7JVx9FtfaTb+PQ5s4yCmRa68TM2tC6qWFp0eoq2emPEFqED8B9sW/0N0FfSQ== X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:d6Ngi4aW7kTbj2/+AuzUhmvPe5lsso8JES0oafbRZC9kTaVsJU8oKG5huFASYxuDJ7u31xc9Hoy3fJcXvJfQInfOCAtq2coXo98CCXU+lrxpOnAo48S7C565VTLdnQ26g/Cz8guFCiwzoEPZ0QBL377gynnXv1DL0q7ynfUDHaU1H7fdwtoGuZRjhmQ2mW1U3NN6FVJavPBE2xrvpIrIlrBKBO98xdEbzw202VMWB/s=; 4:okrFZr3UEJYSBiRlr3SECK4/PsH6QlfuCp9GzkCKcKr2UK1E3Iq6lPrpEkcFg3ZYxP1w1frfTdVDVJ5ebx+NzVFaozoBD491JMgbzPvMfDEo72eWD/ajzOqAOi2hftb/resZcMcV3X/uznVGmFe2BRhaiqUY0MBrcw6sXat1Jq5+ObKUeNGANyBevTkgcw+5Ld6jPcf/M1kat2HWERz6vJ8xsR0zEOV72pYTmEYdt+HVFDGgvDaIQ7KVOkxV7NZ54Dmo6rpTjW5rDzq6YeppxvbwY6/L9hvfu64m6j0CCMWOsXFqkF5dK3IoimKH8UFXO19vJrSw7w6/DoW5ETfH8g== X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(211171220733660); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123565025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 045584D28C X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjAzTUIyNjk2OzIzOlF6K3ZUY3dHV2tUTnd1WGRxY3JMU0N4Tkwz?= =?utf-8?B?cktLTVM2Um4rcUVYdzREdWRGTFpGUzRiQjZQRjJVeDl4Q2pNcTR0c2txYTh5?= =?utf-8?B?ZktoSmc4OEdGS2VjZ3V5T1dVRVduU3NiK0M4bG9QNlkxOTcvZkFHUFhaNjRq?= =?utf-8?B?KzQ4NW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OYjBuWlFxMmxXRVdRQ1I0QzIwUWox?= =?utf-8?B?dXdMbzNpN1R6RkcvbG93aXBsQUZuWmd1aEFHdz09?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 6:FlzDVN1imXnVSFtXJuPTN8yDz1fsl5AfmiF9dXprdyOmiof6AJr528oLR6RtbvHVrp0TT0YnvQ1a/8upQoY4rNumVGCViubrpscussMVxJxzwuCj9fZzhgZUg60UG8PWb2+yw53TgYfUBjg+uO1Zubhgk8JGpBDtcIg/5dfrJBP0NXCwHYhXI0MAa9qEJ8Z5APYlg3lMwyPOsBlL7jMY0n0xgIKqtnN/qztQ9RPUm7ckb2Yau/B09G1doJcnsC51nedXuPhFQiHAH2o7zT31MO4xtStoy3mWJ8LTE74FrHhr5ycHzpPMwKbik65NEIybwCscNJ92VmpPpIxktKtUaQ==; 5:I4d4o5eafaZMy4wbaXHmpuFgaljETGI4C372yYaAA7CHuphcXQROGagbGkHJgwkI4tK9w20314c+bZUZYqv/qN1eFtowjqcDVqKySPWKlYlO76ZGVmQniB0vrMszlaI5eSDxk2crK2aZYzaCQ8rjYA==; 24:KAa6ohGF9l6RMn9MEuAC9guXVASSJhaSKENPSWcJzYxtNI7Ch2X7y+YY5rChf1dbvSszC05qd8iAUDEA9SuVlyHsBGn04UCSrHRPREbUHFc=; 7:YDjBzG+b8ggW5vxNQjxyN8aAuZgKEcYjZTV8qfaSBaE4xcDJiHst5LK88h9hHhNKvgyFf8ezCYk0RgygurZAsHVkH85XdXm+V4ktb6TFh4vNFXyhUQRNwPD2N1pBKGUSUItIhbNVUj2svzOyrmhqmAwJtfQkAIHSLwLjyqFdeQv9jC5m/nD8QsK8Ds9dfwqVuvfkhAGlX2tRIhJOStp6vwzHcXQ64jIVpKE1kns6XJc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2017 10:57:54.0162 (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: CY4PR03MB2696 Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail 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 Oct 2017 10:57:57 -0000 On Friday 06 October 2017 11:04 PM, Jan Blunck wrote: > On Fri, Oct 6, 2017 at 3:37 PM, Thomas Monjalon wrote: >> 06/10/2017 15:12, Shreyansh Jain: >>> On Friday 06 October 2017 04:51 AM, Thomas Monjalon wrote: >>>> 19/09/2017 20:51, Jan Blunck: >>>>> On Mon, Sep 18, 2017 at 1:36 PM, Hemant Agrawal wrote: >>>>>> Tested-by: Hemant Agrawal >>>>>> >>>>>> >>>>>> On 8/12/2017 3:52 PM, Shreyansh Jain wrote: >>>>>>> >>>>>>> Bus scan is responsible for finding devices over *all* buses. >>>>>>> Some of these buses might not be able to scan but that should >>>>>>> not prevent other buses to be scanned. >>>>>>> >>>>> >>>>> If scanning the bus fails this is signaling an error. In that case we >>>>> might even want to unregister the bus. >>>> >>>> A scan error seems important enough to be reported to the caller. >>>> OK to continue scanning other buses, but an error code should be returned. >>> >>> Isn't that counter intuitive if the scanning continues after error and >>> an error is expected to be returned from it? >>> What if there are more than one error? Which one is reported. >> >> Both are reported with the same code. >> Anyway, there is no way to know which bus is failing, >> except from log. >> > > Correct. Also there is no way to handle that failure except for > reporting it to the log in all detail. Even now both, scan and probe, are reporting error to EAL if scan or probe fail. This is what you are suggesting, isn't it? > > >>> As for cleanup, bus un-registration is not correct. Scan has failed, >>> which might mean some assumption that bus took for scanning for devices >>> doesn't exist for time being or present platform. Either way, I think >>> whatever rollback needs to be done for scan failure, would be done by >>> the bus->scan() implementation. >>> >>> Let me know what you think - I will make changes to the patch and push >>> again. >> >> We may need more opinion here. >> >> Mine is that we should not hide a scan failure. > > Hide scan failures? Do you mean hiding it from the log? I wouldn't do that. I think Thomas was of the opinion to *not* hide scan failure. Reporting through logs works fine here, I guess. > >> I would return an error code if any of the scan has failed, >> but would process every scans. > > FWIW I agree. > This is where I have disagreement/doubt. Reporting error code from rte_bus_scan would do two things: 1. rte_eal_init is not designed to ignore/log-only these errors - it would quit initialization. (But, this can be changed) 2. What should rte_eal_init do with this error? rte_bus_scan would have already printed the problematic bus->scan() failure. Also, does it make sense to report error from rte_bus_scan() to rte_eal_init() when no buses are identified? Currently that is not happening. - Shreyansh