From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0060.outbound.protection.outlook.com [104.47.36.60]) by dpdk.org (Postfix) with ESMTP id 498AD2BDF for ; Fri, 11 Nov 2016 07:01:50 +0100 (CET) Received: from BN3PR0301CA0045.namprd03.prod.outlook.com (10.160.152.141) by CY1PR0301MB0747.namprd03.prod.outlook.com (10.160.159.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10; Fri, 11 Nov 2016 06:01:48 +0000 Received: from BL2FFO11FD009.protection.gbl (2a01:111:f400:7c09::167) by BN3PR0301CA0045.outlook.office365.com (2a01:111:e400:401e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Fri, 11 Nov 2016 06:01:48 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.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 BL2FFO11FD009.mail.protection.outlook.com (10.173.161.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.707.3 via Frontend Transport; Fri, 11 Nov 2016 06:01:47 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:1020; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uAB61itN004952; Thu, 10 Nov 2016 23:01:45 -0700 To: Thomas Monjalon References: <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> <9c727b8d-2fc1-49f6-04f4-33a847b2c915@nxp.com> <1506578.S1InCtPeL4@xps13> CC: Jianbo Liu , , Jan Viktorin , From: Shreyansh Jain Message-ID: Date: Fri, 11 Nov 2016 11:34:03 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1506578.S1InCtPeL4@xps13> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131233177080580619; (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)(7916002)(2980300002)(1109001)(1110001)(339900001)(377424004)(24454002)(377454003)(189002)(199003)(36756003)(5660300001)(65826007)(356003)(230700001)(7846002)(626004)(305945005)(50986999)(76176999)(54356999)(105606002)(586003)(110136003)(106466001)(31686004)(6916009)(6666003)(2950100002)(189998001)(77096005)(23746002)(4001350100001)(97736004)(4001150100001)(93886004)(104016004)(4326007)(50466002)(33646002)(8676002)(64126003)(92566002)(2906002)(68736007)(86362001)(31696002)(47776003)(81166006)(81156014)(229853002)(83506001)(65806001)(85426001)(65956001)(87936001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0747; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD009; 1:lpTwtTG1VI6usqfY+iqktZkHcVYxgRIYxX8YYaXtu/Cp4UZXj8/9UuzzvsL2nF1V84lAUtSNx441OiDCD2Pggh2tCldELHxGINXDGnuldzTPyo2h5Nfc0s8+jw8mGp/Ujn1wVnn5HHvYEPCA4sFu8XgZUVi1M961Vr/VokPd8TeJ2xHd+HApjJLkbKTo6PRwvOIbUuwBhn4HkBur41vQzUAMFEfdkXEI5ZZ87bTiBZjlU9vBBSGsaewx0KykL++16h2Onim60ZmcqQ4NiVSnkeX9zEV40/gXhFqJbJTxlIKr8PLnETC2mp0jmhCBUb0PRJ10yfWs6OT3jMrhzxy02t1yLQHNXlN1QcvQRv/LKAnywzt0naEGrY7cQNJrvbQBDeFpuS9V9P2IFbY9UynUCiYcsbgAsG7OvJnD3bPEPGfVN/IwKdVSoi68BBkPphS41E3L0NKFrZHFGXuFxpCQtVC19aDI3vkdeoNVCeYQ0gCHsS5wUK+K8NXhhS1jbT2alLNbKuBbijZi9J90M3rJAuK2kopX/vWa8a+FOOqZnLVZ0rohoperX7JEyAfFfpDa5wVoYlSvSMnLhnTdE2tjTAXDL7Ayd5alOvR+VPDMB680s7SN8oKb7Mke8LQHaEkf X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 2:Ial3Rvtp5JC2K6ZJeUtFcBLP1qvbcLjs10G6q1VidBg3WTRKEX4vfLCBiCUzYByUEkS3+NZqtSHiU4cAT2fjG/ZPmP/eGhCdpONtsx/Ytz+k3XFfYpItJDfGbBzTxaL+42qaALK+XL3wZZ7XMOzlbMaZa0q6I83lL10fhUrd4Mk=; 3:FbMj6rup/qtpvCSb3UyLoYhwrc6SfEis3ZbdjYA06EN0cubS5I4XvLDu/Rw4/7Mjo8fabBNaUZhvoR89YI8Y7ZnFtZG9gPPs74G0i7Zb1W2uQWxiA1W6ROrLD1HFbq9cdwbqBecJv6KNqARrZeoXugqpmKuoksSQzDaVICvkcucnSppjffbz7x34pPUJuukFhcGfiAzb+RnBnXPbxRgzAJk/rnrvzVF6iXEpUjCq6nSB1SVdwu5GcdNu6P4T7JWgN5EVOUm3gqwOSRFh7Bn12w== X-MS-Office365-Filtering-Correlation-Id: 6271ed1f-1d32-4f23-e8aa-08d409f83916 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0747; X-Microsoft-Ex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OO8hSiTs6PF+9yZI5hBTdyzT4EjYz+KZNGt6BIgGUUz4/s7WgRGhFNL5IOtogZk6Xxzza7w+LIDzlXUYrK54Y9L8eFT9KLOQ=; 4:GMJXUu8NY+CiRqd0zAYTRSPaWe4JaEkJUh52uOzZQc0CMheRwqjkIZQaJAG2gBWWus00OiTr3tchcCJ1lkrCTzCpIRZxkEntdIfftVFCiaR6FNY1flYpaqNFdZ6ev2N2UfZebhEPwtO+XBnfVfxhiV6FPdejgXyEV1EnFB03OIJy4Un5bYcfvxUOfe3DPchPnhwDxeCiOebDhuqObdI7NB4sOcnBUSRVVjS7l1fiS712gCx4eWfAVp+wAQrmyH5fp3+6r2PdDNiLGeo17vzFCyFbqUv7fiDdkbi8J3FNMwOdCC/hCpj9BSag2Uc87t8GxAYHVGogFlVMjQkseR7Q+bTDo5i+2krqJQcGvpxEchx5g7myzEgm3ClaZMnIGSj8aKUzVELKFPkz5mSkvcbVq13ViNf7lLnKxAoJJYT3Zb4rU9Vn7iw8xXHKE/LIzGVyqNDzBKmIeGyp6HYsBLmCplooApGK+jAQbM2dJ2TWSWU95X6JsRksOi7YUuK5yZMKXSE8Icr4Kc73JJbRjU65iKzvlO+BQEuG4Gs2zbwaXqWcdBvfZPY0oln24wWpsJSj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13023025)(13024025)(13015025)(13017025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY1PR0301MB0747; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0747; X-Forefront-PRVS: 012349AD1C X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR0301MB0747; 23:mcmrbvCiXvJ5YhlAkQV/Qx9iXY+jvgphKSi?= =?Windows-1252?Q?ci+byG43eZTE8EJDn00eO3EK7OAWvlJkk9z3/yTN9PRXhgAYll085bHw?= =?Windows-1252?Q?aFFT98Ev/i7IGbpr/jJHp0jNFca1N3v5V7Bn/W3B0/24rP+gDtrtYoQh?= =?Windows-1252?Q?ZUSPbcbllmQiUGWSdzx787ZMbTqc/1i4dpy0RdrDUQsaLffEHuM4sceR?= =?Windows-1252?Q?yPnYWyt0xNYmS0gViZt6CPeqUL0MRFbx3lt53+nzd0IcqOVeOmI0GB6f?= =?Windows-1252?Q?TUz7+S+KUHQxqRwbo5SbvGnhlo68OxeEKwaRs/VsSYMt/4QS63ag9YB3?= =?Windows-1252?Q?AHAq5JxhBg7P23rZjNzp3JDt/nEcQHS6SrT0gWr1c0EUzXcGwaqdpgwW?= =?Windows-1252?Q?z3Zrk6eE0lVcxu8PaJVlA/zTyL50UvmWKqhvGu3bTfC+oEyktZTjD6T+?= =?Windows-1252?Q?G5S29S5vVyNni2iMMm3xNJPGu1YIjPpu9sTaRcyWx8M0mPZxzb7Vy562?= =?Windows-1252?Q?ykVmvOcsFhmr85OhqjXIM8P62lSIKoywgLisEMoDiTCQKkHob9VMGDZ3?= =?Windows-1252?Q?jNY8XY8nlOUQIlXRTzVFlVpZXp1sRpkm9bhGbhl1NTLB1i6H/lnkrKfK?= =?Windows-1252?Q?5NVGN/cODZc1FiCV00a91gh5AFM7IMk/gWPQWIRZPVrOvrrsc5TYOTmL?= =?Windows-1252?Q?9zPeIhjLiiK7cwNZ2w7gKPYYxEN91ufRw5RL5RmdJ23AEuu2eyTFIKxM?= =?Windows-1252?Q?/d9Ge7wvRebp/FhzkS2EU4Svsx418w8aKD3yd3Bl0RBNpKeAj/FS6rCh?= =?Windows-1252?Q?DbBIzZNoxyDGbbB/NKYBpMXdgNFzcuZTjvpvQvAwdZ9xqG1OawVowHsx?= =?Windows-1252?Q?aDZmJuDckceoo6cae1/3OZfqLZH/5wUMzpY3/NNgQEJpuwxdPt3+FPNk?= =?Windows-1252?Q?DFMd8DUsZUvP/pgyrG7tJilP0kVkftUs7Pas+N91oBwGPx0ayhEF8NfH?= =?Windows-1252?Q?XRa8dtHaQdavJiynJdp30+zUGSmsYeGZOruSvpgCDivhGG1QoteJiI7+?= =?Windows-1252?Q?TcicSNO6xBc9VLOeCHkgRMbGgCU+NRVA4/pgVBQG6qd77NXDTBA90Nzb?= =?Windows-1252?Q?sZQkqs/aaCdbAhWXLNWpbAYls+2S3/CYoTB5b6cM2iCw+4dMap/98iWv?= =?Windows-1252?Q?7Bn0TCuEi9nlZNFEZ4qgcitjwN1Ji1o9QL4EoVj/20I54UZz7k6GS5Xn?= =?Windows-1252?Q?v69b+uXosiYN9Q/YmKetJ57TIjIU/ec6o/i6JXaMZzxFKzR+a3huC9FS?= =?Windows-1252?Q?5oN5CtupGOB0TTHSB/b+j+sUweQT0ULJ3MkqMwD8DD2jOl/aGkrtQx1F?= =?Windows-1252?Q?3TlbgIPdJTsLDQ02zUIqJpu/H7NVUeNPtBkaKHdlpcAuPasvZhJOFxZn?= =?Windows-1252?Q?rrbmgbKYmYip267ratlrJYvBFTmlQIm3xYGNcPOjooxjOzxr8fNAECMl?= =?Windows-1252?Q?mksmHREw=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 6:njN7b8wdSbOurUd2gVD4f1Q3Eciw9FiYB18hCu6+NPKjjaQetlTDLS6fZKBwPcrLLqAACs3YsLZ9A9Ar+wvkvwjxe5/08869/ZI0ImMRRUyqBQ3itvHXL/tE6OvxQDNuncgmFc/90lpw6JtmZLSDWGyFidB90hdnUqJKRgoc6fS7iRnmhNZaMGubmYQvm5rAd20/lnno0tWSTzd4vVkTDguWyFLE30FrI1WMHQl++Je0CGihv0nzs4TmJoHFWqjIaHwgDDsaXobXAUmwoCgP7Zykkpeq93CaSOXtLblFIjCYDQqbOwV9Tcb++L7EiyzG; 5:S+PmpGHJD6pxNIkxiqScn+zIaAfI9NYfjvYLioTD0lOFaKiZ7cQWiXpX9Hpp4bCS2TlzpzfVHkVeubmFmxSeseE+uoy5fX9RY2N4htoi80QqI8SNpZIuc0SOwzd43DgEsDPIEBbzow+bYckxHUE5spZtOVp2B8olLMt1weuG30fOdC3o5ffMfxgC1cWO5HKD; 24:ikLS7e4XKazthtvgoNqT9nzvQo6fZXTBF3hfqGdt/asfvaMYiPjwFZsn2oStJnCdXxcPc9tyYbJGbPjMQyEjMCyc7/5PKX6VorJKBjHdHAQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 7:1XU9nOmc5K8VTwJUIm9wdWAGuI0/xdyy9GIDWv/KitQ0X0TKKF4cykhF1Yz+fseo0pVvVVzMVt5wphXYt1CclxGbzZfHtl88jUzfIX9haBWGmxA5k1QmNub+Bzsipv9eABbAOYtdHM8JbNLfl6dcf9MH/WWO4fENvuYXu8yBp/RtNMIOJEgAx4CiQdf2hHR1aPcsf/bMwRX9PeW47UicoBNNy+B6V3zPbOT9mnptruTb0Ms1f+cQDunWwe0yNTlCX0RYcicsqHelv2y3ZZC2xAYxNi0cmoWjJ91zEPiwtXUzREtkla/nQRGwMLnT6PHq3MF037hiXNZaV2ij+oIUKNE/YrhbGAgsfHwPS8kaAYo= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2016 06:01:47.8708 (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: CY1PR0301MB0747 Subject: Re: [dpdk-dev] [PATCH v7 11/21] eal/soc: implement probing of drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2016 06:01:50 -0000 On Thursday 10 November 2016 02:56 PM, Thomas Monjalon wrote: > 2016-11-10 14:40, Shreyansh Jain: >> On Thursday 10 November 2016 01:11 PM, Jianbo Liu wrote: >>> On 10 November 2016 at 14:10, Shreyansh Jain wrote: >>>> On Thursday 10 November 2016 09:00 AM, Jianbo Liu wrote: >>>>> I'm still not sure about the purpose of soc_scan, and how to use it. >>>> >>>> >>>> For each device to be used by DPDK, which cannot be scanned/identified using >>>> the existing PCI/VDEV methods (sysfs/bus/pci), 'soc_scan_t' provides a way >>>> for driver to make those devices part of device lists. >>>> >>>> Ideally, 'scan' is not a function of a driver. It is a bus function - which >>>> is missing in this case. >>>> >>>>> If it's for each driver, it should at least struct rte_soc_driver * as >>>>> its parameter. >>>> >>>> >>>> Its for each driver - assuming that each non-PCI driver which implements it >>>> knows how to find devices which it can control (for example, special area in >>>> sysfs, or even platform bus). >>>> >>> >>> Considering there are several drivers in a platform bus, each driver >>> call the scan function, like the rte_eal_soc_scan_platform_bus() you >>> implemented. >>> The first will add soc devices to the list, but the remaining calls >>> are redundant. >> >> Indeed. This is exactly the issue we will face if we try and move this >> scan/match logic to PCI - all devices are identified in one step. >> >> There is a difference in principle here: >> A SoC device/driver combination is essentially focused towards a single >> type of bus<->devices. For example, a NXP PMD would implement a scan >> function which would scan for all devices on NXP's bus. This would not >> conflict with another XYZ SoC PMD which scans its specific bus. >> >> There is caveat to this - the platform bus. There can be multiple >> drivers which can serve platform bus compliant devices. First >> PMD->scan() initiated for such a bus/device would leave all other scans >> redundant. >> >> More similar caveats will come if we consider somewhat generic buses. At >> least I couldn't find any interest for such devices in the ML when I >> picked this series (from where Jan left it). >> >> Probably when more common type of PMDs come in, some default scan >> implementation can check for skipping those devices which are already >> added. It would be redundant but harmless. > > If several drivers use the same bus, it means the bus is standard enough > to be implemented in EAL. So the scan function of this bus should be > called only once when calling the generic EAL scan function. > In the current model, without a bus like object, this can only be implemented as a hack. This is because: - If each driver has its scan, some of them (those on a common bus) would have their scan nullified - Then, EAL would initiate the scan on their behalf. (rte_eal_init) - Whereas, for those drivers which are 'special' scan, EAL would have to call each driver's scan. - This selection is manual code change (nullifying the scan function). - And then, EAL would have various 'generic' scan's chained together other than driver->scan(). A cleaner model would have been that EAL always calls the drivers->scan(). Obviously, this issue vanishes as soon as we have the bus->scan() like implementation where a bus would represent multiple devices/drivers. _________ Shreyansh