From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0040.outbound.protection.outlook.com [104.47.0.40]) by dpdk.org (Postfix) with ESMTP id 125BC5F1A for ; Wed, 21 Mar 2018 15:03:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=io4X4JRkZTwzP7dgnvLQmykSm7a7jzcX05sHJjvUiHc=; b=vQu/9V0zfRcZAEtY6uNkQReentqqqBZWabhV7vC5IsZmmdADjDKMZC4uR6ny1KK1eb69dgwfHQ51a5M8mslELULwbS2I3qqHCMG/KC+HIRcpNlPG4gJU6MOFcDXz76+PJc7JX2/LMpi3AnJM3lpI+t+kS6eKQ3XXSfRG0T33fRg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from mail-wr0-f181.google.com (209.85.128.181) by AM5PR0402MB2769.eurprd04.prod.outlook.com (2603:10a6:203:98::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Wed, 21 Mar 2018 14:03:18 +0000 Received: by mail-wr0-f181.google.com with SMTP id s10so5301094wra.13 for ; Wed, 21 Mar 2018 07:03:18 -0700 (PDT) X-Gm-Message-State: AElRT7ErTGyE1HpAnZCQMeG+qimAdWUywIeotajaeoDylr5GEMK9kNLI xJi6Hjh8JI3tw58ELRfdL9w5F08ggOBJwoHR/5U= X-Google-Smtp-Source: AG47ELvTZO8baoBiUWt9fnl73LBEmskBclEgHGkvUpzC0qgF/V+2bT+m1+SQytppCHE5dxX1unbJQdgqYopyBbrDgXs= X-Received: by 10.223.182.13 with SMTP id f13mr4723293wre.262.1521640996019; Wed, 21 Mar 2018 07:03:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.50.67 with HTTP; Wed, 21 Mar 2018 07:02:45 -0700 (PDT) In-Reply-To: <20180321133509.GA15364@bricha3-MOBL.ger.corp.intel.com> References: <1521618694-140757-1-git-send-email-rosen.xu@intel.com> <1521618694-140757-4-git-send-email-rosen.xu@intel.com> <20180321102025.v2zeijxrsauuvkss@bidouze.vm.6wind.com> <20180321133509.GA15364@bricha3-MOBL.ger.corp.intel.com> From: Shreyansh Jain Date: Wed, 21 Mar 2018 19:32:45 +0530 X-Gmail-Original-Message-ID: Message-ID: To: Bruce Richardson Cc: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= , Rosen Xu , dev@dpdk.org, declan.doherty@intel.com, tianfei.zhang@intel.com, hao.wu@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [209.85.128.181] X-ClientProxiedBy: AM6PR0102CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:209:14::29) To AM5PR0402MB2769.eurprd04.prod.outlook.com (2603:10a6:203:98::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2c2c44d5-8647-442e-911a-08d58f347fc6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0402MB2769; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2769; 3:UIS8XQywP/08JpQSlbciUbS2RsTr8VOEMgfE2I7SL6+0yWNHyosYBDm/kCD/j3xJpKOsOcVnkeeDu6GT93WxGaL3WmU7452sTmUFteuc+KK69thmqPdIB+Z+1HOGqmiMwZYf/JeG3EJN8hV3ZV5Vv8OsU3qNg5pXX0sUH888HJvAF9OTYlBvcf7yRPL70LfrFx9HcG1h/sC2Ie4CWhgl3FME9+GzzC5Cvo/61nBZw6QYSlif+pc312MUmNGRqkhU; 25:ZYhE0XNc1ZkyUdyXttwfDE5xl7VCc3/0XA8M9g3z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ZmPLd4+ZNEhuWZ6hHEPg0i7FuvB05TL5bdYIZCAH+f; 4:vKo1S7W861Gby6WCkxkXrkB2JWvThutjkZpm0reZE0zv73HUdSf+W7CeUCorUa/EBCGjPkc/7XCF7MC3TKdPFwauy4bC+iLU9T1v0vHwgpxEMy1yDtLO4/GOWd2miZBkEn+Vv1N818IBfs0exZqpbj5Y0Kd6x5XVKvxICDKzuNxmB0bT5GjtURMxtXGu1R8VhRtC3K6A72N+5miMkDYUjZk6g1Ehj1xuKmaU14OHqz1gTCF1vSIseHNRuO1h7Z+e3/Ce28BrAq/KuJB+xvYh7xinMOxj7xfLWAv+9xuPK/J0wM2J3m+Cnug3ZWZAtIV/DGEv7DD0ZyncUyGOo0gpRnC9C75WUNPWgRguZS7c+KQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501323)(52105095)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM5PR0402MB2769; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0402MB2769; X-Forefront-PRVS: 0618E4E7E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(39380400002)(376002)(396003)(346002)(189003)(199004)(229853002)(69596002)(97736004)(3846002)(6116002)(4326008)(54906003)(26005)(61726006)(23676004)(107886003)(2950100002)(52116002)(106356001)(95326003)(2906002)(6862004)(86362001)(93886005)(93516011)(6246003)(316002)(68736007)(5660300001)(9896002)(122856001)(42186006)(53936002)(76176011)(305945005)(5820100001)(47776003)(61266001)(33896004)(7736002)(59536001)(8676002)(8746002)(105586002)(9686003)(55446002)(186003)(8936002)(81166006)(81156014)(50466002)(53546011)(66066001)(386003)(478600001)(498394004)(55456009)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0402MB2769; H:mail-wr0-f181.google.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA0MDJNQjI3Njk7MjM6VU9SbWZUOTB3NUlJN3ZxMEZMdzhTends?= =?utf-8?B?WVJTa3dNTCtKZm1uaENnbE5UcFkySy9NOXJEak53dTRCd2xYcUh4YlcrSm93?= =?utf-8?B?ZlVDSXdQU0k1aDEzblRZdStvMUNzYmFLTFUzQXpDazI0YkJaeUFNeDY5bWlP?= =?utf-8?B?QXhrVXZ0alV1UkoyNFNHcFpRRVppMmdCRlJDNHNSY0F4U2JCRXBxOFMyMjZF?= =?utf-8?B?TG9uR0NlRDNsWENMTkFHaDZBZ2lsWXJjZzQ5NVB4TUpCeW9nTnpDTlI2ZUls?= =?utf-8?B?ejAwdk1oV2d1azRYYUJidG8ydVdua095eklhVkJWcG1NeWtxWkptUnBhMkdO?= =?utf-8?B?anVhQ0o5eUt0anFkZm9jbUJJbGxkSDVGd0dldzh6SytQcG9vSWQycHloRVRh?= =?utf-8?B?SkwwTTZ6Qk8vRkcwbUQxU1BVTWI4WGIzNHdEL2xvbjRORnh1T2N3b2VjKzZz?= =?utf-8?B?UnBzWjdrNG5uVFpyRG8xdWw2NytIMHlVbEZwM1ZHdk02TkY2RUFrK0VpQ3Zw?= =?utf-8?B?ZG84K1NlWmNicDdVYWo3NEp3bzBsTWg5aGtNZWI5L2NZd2F2RU5TeGcyOUg2?= =?utf-8?B?dVBTQmpEZDluSlIwcGpuZDIxWk9QVldVQmFBc2p4R01xWDIvV0grbDUrZ1lH?= =?utf-8?B?UzlucUcwWHgwQ3c3WkFtOWY3alVDcTlkUFpmZzVOc01rSklzZ3BNQVpQOW5D?= =?utf-8?B?R3VuM1lPVDNwUXd5M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Oyn3y9gMMsUTyNr//Lz+qJ31deXyUnJzpLhfI0YhxApOiN3uX3Vii5H4D57zrW03V2ddcrqd7F5zcu85ay4+k8222Gpv3KCR4hIUYezBBbXlEFAOpTpu4ytdOoxvFODjxHWPx4=; 24:7Pj2yJfPa9uEpN2pR/vW/RAbJbuEtNRMKlkvcD8wHkoGUACz4dZ5qpepZo3ZLn4vIOx2LN6vwIY13KQPGIb770RDR0Dai8qrF5V1eNp388Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0402MB2769; 7:OYkRnqr3K7l9SHuTNHm5tBOl20QNpYJo7fHcZT8BcsRvhl+88y0ga+vCYZnSKVbWTIG5GRNce4r/sBGGVWh9w66S9SA2+M6W61zhctMbVJvuqp8xan9DlkMovfWri5DOgCpt1N4wdK8LCOqAIJEeOART0C3hdnZJmwbjMiJcPkR16dmdJNl2Wg3n/DHjxWhocDGZdHvS5q7kxL16upOgL2uGTlI2WYKagqYr9d3LrSqKhDFz5o8V+YNI0dECUFlB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2018 14:03:18.7584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c2c44d5-8647-442e-911a-08d58f347fc6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2769 Subject: Re: [dpdk-dev] [PATCH V2 3/5] Add Intel FPGA BUS Lib Code 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: Wed, 21 Mar 2018 14:03:20 -0000 On Wed, Mar 21, 2018 at 7:05 PM, Bruce Richardson wrote: > On Wed, Mar 21, 2018 at 11:20:25AM +0100, Ga=C4=97tan Rivet wrote: >> Hi, >> >> I have had issues compiling a few things here, have you checked >> build status before submitting? >> >> On Wed, Mar 21, 2018 at 03:51:32PM +0800, Rosen Xu wrote: >> > Signed-off-by: Rosen Xu >> > --- > >> + >> > +/* >> > + * Scan the content of the FPGA bus, and the devices in the devices >> > + * list >> > + */ >> >> So you seem to scan your bus by reading parameters >> given to the --ifpga EAL option. >> >> Can you justify why you cannot use the PCI bus, have your FPGA be probed >> by a PCI driver, that would take those parameters as driver parameters, >> and spawn raw devices (one per bitstream) as needed as a result? >> >> I see no reason this is not feasible. Unless you duly justify this >> approach, it seems unacceptable to me. You are subverting generic EAL >> code to bend things to your approach, without clear rationale. >> > > While I agree with the comments in other emails about avoiding > special-cases in the code that makes things not-scalable, I would take th= e > view that using a bus-type is the correct choice for this. While you coul= d > have a single device that creates other devices, that is also true for al= l > other buses as well. [Furthermore, I think it is incorrect assume that a= ll > devices on the FPGA bus would be raw devices, it's entirely possible to > have cryptodevs, bbdevs or compress devs implemented in the AFUs]. > > Consider what a bus driver provides: it's a generic mechanism for scannin= g > for devices - which all use a common connection method - for DPDK use, an= d > mapping device drivers to those devices. For an FPGA device which present= s > multiple AFUs, this seems to be exactly what is required - a device drive= r > to scan for devices and present them to DPDK. The FPGA bus driver will ha= ve > to check each AFU and match it against the set of registered AFU device > drivers to ensure that the crypto AFU gets the cryptodev driver, etc. In my opinion, its' not a problem that a heirarchichal bus model like this is implemented in DPDK. That's being creative :) But, here the issue is that same work can be done by a driver which can create devices of multiple types (bbdev, cryptodev, ethdev etc) and then use hotplugging (assuming that is supported by relevant driver) over respective bus. I don't think we necessarily need a bus for that. Is there some technical hurdle in following that model? Or, is there some cases which cannot be handled by not having a dependency bus? Then, there is another problem of modifying the rte_bus code so that this bus initialization can be delayed. That is something which is not right in my opinion. That puts a fixed constraint on the EAL to look for a bus as being special (like vdev). If that is a blocking problem, it too needs to be solved - maybe separately. Frankly, its not about 'can't-do-this' - but, I think this does warrant a good thought before being mainlined. > > Logically, therefore, it is a bus - which just happens to be a sub-bus of > PCI, i.e. presented as a PCI device. Consider also that it may be possibl= e > or even desirable, to use blacklisting and whitelisting for those AFU > devices so that some AFUs could be used by one app, while others by > another. If we just have a single PCI device, I think we'll find ourselve= s > duplicating a lot of bus-related functionality inside the driver in that > case. > > Regards, > /Bruce