From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0085.outbound.protection.outlook.com [104.47.33.85]) by dpdk.org (Postfix) with ESMTP id A872D1B3B7 for ; Thu, 12 Oct 2017 16:11:02 +0200 (CEST) Received: from BN6PR03CA0056.namprd03.prod.outlook.com (10.173.137.18) 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; Thu, 12 Oct 2017 14:11:01 +0000 Received: from BL2FFO11FD039.protection.gbl (2a01:111:f400:7c09::117) by BN6PR03CA0056.outlook.office365.com (2603:10b6:404:4c::18) 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; Thu, 12 Oct 2017 14:11:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD039.mail.protection.outlook.com (10.173.161.135) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 14:11:00 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9CEAvf4028834; Thu, 12 Oct 2017 07:10:57 -0700 To: Aaron Conole CC: Don Provan , Jan Blunck , Thomas Monjalon , dev , Hemant Agrawal References: <20170812102220.27773-1-shreyansh.jain@nxp.com> <2075457.Vvey9mxHue@xps> <10403057.Ll0Xg1E4J1@xps> <83422f57-4c0e-5806-c741-ed5ce10891b0@nxp.com> <83a3c6c6-8d50-8106-7c7f-9b5c8263ce96@nxp.com> From: Shreyansh Jain Message-ID: Date: Thu, 12 Oct 2017 19:53:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.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: 131522910609303502; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(346002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(377454003)(24454002)(199003)(47776003)(316002)(8676002)(58126008)(54906003)(5660300001)(65956001)(65806001)(6916009)(2950100002)(8936002)(65826007)(81166006)(81156014)(230700001)(68736007)(356003)(83506001)(77096006)(85426001)(36756003)(86362001)(6666003)(31696002)(97736004)(229853002)(64126003)(305945005)(33646002)(93886005)(23676002)(4326008)(8656003)(53936002)(50986999)(54356999)(76176999)(104016004)(106466001)(105606002)(50466002)(6246003)(189998001)(561944003)(31686004)(2906002)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD039; 1:kvfaiH0/4uWrG9yztrc9f7epwMgWu2sUgMOgqC3YhsQVjqyLIZMwgYWcDMaWiUsiDglvBFk+9J+YBBJRnvQ//3Y+XpdPwAwsiYylCiouhjyVxM5gmPNDhI/sVgFw+r8D X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a8ddd21-03ab-48e9-066f-08d5117b1126 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:oXQ2OS3qbNebMxCXfZsdhNDUwzrW7P3Rsf0AB+8TE7dVxG6oJNWR7xAg4bADTx/G1ZZmfZB2d9CwyQ+WCsvB459/gvA9ir+fLPdgs20FBv1IdTDfETNq0DJpW5mU3XIFPZTp6Km79nRFYtUoIUCwtWj78hgqSmwyTLlkKUWaLwGqkd8WfyYCC8AM+zDWxBpBMByD/MiLP24KBMX0AQtfZ2eL0SsXHyq/Xg5WMNzrFWoPiyfGMzT0qSD44HIz2iHJEpnx3/LrL1H1VCqvC0YlyBuR2QSfSpI66h4LoyeseWEamJ3BLFGwaW5tzmDjv1BAMI1RG94OoJwGUth7f62e0qP7LuHuABwLLPDmutCsrvk=; 25:1bGK2KpaBIo/MoaoSjgwcEwA93osA5hsXTN5VL/HeqlgGYAnXAqor1ASM71f0OIHCe3DRcLIVuzmE30qiRrgrAGj3bVeXl3OjKVRSNV/0S/jw/FgKKbgBi46PxSzGS/JVJpSa4Qo+5oJlf5QsUp9RtRHSDgbL9GQnOnltrYUkoYw1nsAsX2sJBM+9viinQQ2vtl9XNWbxDeeQ0VihmL0otfOZtmaF2dTCgM2fSAV6HtekRFXtyHhiXDLMofWfw1PHc5N7WVjojYHYElJ48sTZcZi3pvBz2ANmD7OitjJ/iM2qKh7h9qvQW4ilcWeP47EZYXmttazEWgMhjSJzwT80w== X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 31:JHNtCgZK0Vk2BqulUmWU1KT2LzluZ+cxgetCD7NpKzO/FAqmk5O3fdLh/IHrQV+bJytAakKzbBgCJbPHQnwVhODTaUOpTYNVC8D11Eg8lJ5Ip+gHSSnEEFA0T6kMxTsoIXcAt96nRatlSR90I4sAEnPPnIZPrJSY01RGBpKDpMSVKcNf8jXMCd+97XKY/Ugcca7uIKnt76rAY9N0JEJUgp6zMF9UIluo54HivkroMJ0=; 4:6wfHTuVICPTK67axSg+m5Jv2/dn5iv8Wo5jxRF9mYaf7MR9boIwSGydV1Knlgk77Re4iQ8JnpyCu0GHeeBpta8ETMex9W66yGHvE9Q6Hdy8iP/D+NOGjw/TQFm4/VzM4rctz7ZMTvG3ZmKokwkj7bjUF9PoalY5liPMupeFYo/HbPKA3oF4Aw4ombFLCKS/13IowIXePRI/dZHbWrH9wnCDBhyA0AgBRcTTfYIyLKShK9aHb6WyfjXxuojIgN9GCEcE8MNRj//qnYNLLDti5tURtrrEIf3L8uE1o/Pr2QQ/8snn4RptG8xLAmbxD95aEUikOEr5lWyXnJWOkl8C6mQ== X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(20161123563025)(20161123561025)(20161123565025)(20161123556025)(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: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjAzTUIyNjk2OzIzOi9oeXROVmVUNmU0R2N0ejN3QWRocURTWFVm?= =?utf-8?B?SnJtUGRnQ3RmNzJBY2JjOXo2Z2lLMEdnNU9tSGNCM1ZXbmxVK3RkeEpBZVNS?= =?utf-8?B?bG5DNStscWM1RkUyYVJ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XpDU3pvdmd1?= =?utf-8?B?Wkw3WjhwU0ZBPT0=?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 6:WxMV3t2loqb6nsn0NlUU/xPHHSmZaQOB+/d60+YaR9wi6VhbUcglf/OzWBVGdmx9q6lP/rHiSw9WiLRCW5wZoDR4W0gpeNh41wrIhzN+AU06Tv03pm1RapkdeJ9b6lGtDqrT9F6Tw/WbVrurwf6iaYddtPSsw4IyqZSKq2YEedE8s/KHzJpUCvRZCWr1OOJlGuxUB4VBIqh+XsdHHTn6yKR994t8u46EOara2Kifk6GKDqCZGn+TwA5ypjNFIqRfunaYNOGh+wovao0e7/Y08ZQuYWddDT8ksm8edy8VsVpaY3b5n45s7EB6docjmbBqpFrDk8EzgU+AaFYYb7aVEg==; 5:I5zfujEqb3B3No6FFNQqdtdnvWjcDgdqQXUFjfYQaHdnWUNB1W6M4LcJ1Iuw7ay4qrd6kff2rHWQdZkxVip1rUzt1Zh/ftjhcg9mMoCKhcqWhYNCFsuUr8TrMZC/5FgP9yCWfxPbMcu+8DR/oIlSGg==; 24:rsOccjp9op+MWwTZI4S/UIsfctqEFHcnfCRR5ra3KkC4VSLiryI8ZXlii/+G6cOO2uEgcOLRR+fxi2ednltKbgaMTV4n23rdPAeV35vipA4=; 7:GryhL+uAKk+4lr1WE4D+Y9Nv/WmtGOEmC/polFs+9dnm+nkp3oqq2O+f9Fo1KOupDCSz6RSbdzXmUbMYcJjkhpuPgLLkbLwzG1m+64+4twg+rQJDDD/7UoO/VtfmvK6W/S7c/IH5U1j7Aqdct3FfFGw1nQoONI5g8fMpVHyjOVUSotsPNy5uvtUma1T6LdH3WCs24riFOKVJoZw8myM1tjSZ5BkY35dPh5hloCOVtsg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 14:11:00.7119 (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.168.50]; Helo=[tx30smr01.am.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: Thu, 12 Oct 2017 14:11:03 -0000 Hello Aaron, On Thursday 12 October 2017 06:50 PM, Aaron Conole wrote: > Shreyansh Jain writes: > >> Hello Aaron, >> >> On Tuesday 10 October 2017 09:30 PM, Aaron Conole wrote: >>> Shreyansh Jain writes: >>> >>>> Hello Don, >>>> >> >> [snip] >> >>>>> [snip] >> >> I am assuming that that aim of this is to have a way so that >> application can query whether its device of interest is there or >> not. But, I think this (creating a list of scan errrors) would be >> overkill. > > No. That can be done through a different query. OK. So, aim is to know errors, if any, that might have occurred when DPDK scan (just after rte_eal_init) would have occurred. (Assuming probe is just based on successful scan, lets just ignore that for a while.) > >> Even if we were to create a list of errors from scan/probe, how would >> that help an application? Is there some specific use-case that you are >> hinting at? > > Sure. Let's assume that due to some permissions problem, /proc/bus/pci > doesn't exist for the application. The entire PCI bus scan fails. No > PCI devices are found. Agree - that is a general scan failure. It will end up detecting any non-PCI devices which are present. So, lets say for this available device tree: PCI |- 0000:00:00.0 |- 0000:00:02.0 DPAA2 |- dpni.1 |- dpni.2 DPDK scan would detect only DPAA2 devices. PCI devices are absent and no port id (post probe) would be assigned to any of them. > > In this case, how can the application even start to understand why the > device is missing? I don't think parsing logs makes sense. But if > there's a way to see that the PCI bus scan/probe failed, maybe the > application can start making corrective action (for instance, check that > /proc is mounted, and retry the bus probe/scan). See below. > >> Application should worry about devices rather than how they are being >> detected (scan/probe etc). Application can use API like >> rte_eth_dev_get_port_by_name to query its specific device of >> interest. If the scan has failed, this API would be sufficient for the >> application to take counter-measures. Isn't that enough from a DPDK >> application perspective to move from init to I/O? > > I'm not sure what you're asking here. I agree that bus probe/scan > shouldn't ever fail, and that we should pass from init to i/o asap. What I had in mind that applications are more concerned about devices that it requires than environment issues because of which scan failed. An application would try and query: ret = rte_eth_dev_get_port_by_name("0000:00:00.0") resulting in an error. Obviously, at this point it is too late to make changes like you suggested ("/proc"...retry bus/scan) - (hotplugging?). My assumption was that at this point application would take necessary action (error, quit) when its devices are not available. Application should not be worried about 'scan/probe' process - that is an internal operation, outcome of which (ports) is what application want. Again, this is just my opinion. > >> I am not discounting that there might be some higher use-cases where >> this list might come of us - but I can't think of one right now and I >> can't comment on this proposal in absence of that understanding - >> sorry. > > Maybe the above helps? Not sure if I described my thinking. > I understand your point. Maybe a wider audience would be better judge of usability of this model. I think you should go ahead and propose this a proper patch/RFC.