From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbdAPGCn (ORCPT ); Mon, 16 Jan 2017 01:02:43 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:38775 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbdAPGCj (ORCPT ); Mon, 16 Jan 2017 01:02:39 -0500 Subject: Re: [PATCH 16/37] PCI: endpoint: Introduce configfs entry for configuring EP functions To: Christoph Hellwig References: <1484216786-17292-1-git-send-email-kishon@ti.com> <1484216786-17292-17-git-send-email-kishon@ti.com> <20170113180602.GA30346@infradead.org> CC: Bjorn Helgaas , Jingoo Han , Joao Pinto , Arnd Bergmann , , , , , , , , , , , From: Kishon Vijay Abraham I Message-ID: <587C61B3.3070107@ti.com> Date: Mon, 16 Jan 2017 11:31:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20170113180602.GA30346@infradead.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, On Friday 13 January 2017 11:36 PM, Christoph Hellwig wrote: > Hi Kishon, > > a couple comments on the configfs layout based on my experiments with > your previous drop to implement a NVMe device using it. Thanks for trying it out! > > I don't think most of these configfs files should be present here, as > they are properties of the implemented PCIe devices. E.g. for my > NVMe device they will be sort of hardcoded most of the time, as they > would be for other devices that would always have a fixed vendor/device/ > class ID, cacheline size, etc. Actually not all devices have hardcoded headers. E.g the platform I'm using doesn't have hardcoded headers and it can be configured based on the function the user would like to use. If the devices are hardcoded, then using configfs can be skipped altogether. In such cases, APIs like pci_epf_create() can directly be used by the drivers instead of going via configfs. Thanks Kishon