Message ID | 20181109220743.10264-1-salil.mehta@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | net: hns3: Adds support of debugfs to HNS3 driver | expand |
> 3. Debugfs looks more unstructured unlike sysfs. Is there any > de-facto standard of the user-api or drivers are allowed to > use it in any way to expose the information from kernel. Hi Salil You don't really have a user api using debugfs, because debugfs is unstable. Anything can change at any time. Any user tools which use debugfs can be expected to break at any time as the information in debugfs changes. debugfs is for debug, not to export an API. And in production systems, it is often not mounted. As much as possible, you are recommended to use existing APIs, ethtool, devlink, etc. Andrew
Hi Andrew, Thanks for replying. Sorry, for not being prompt as I was traveling. Please find some further follow-up questions below Salil. > From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma- > owner@vger.kernel.org] On Behalf Of Andrew Lunn > Sent: Friday, November 9, 2018 10:44 PM > To: Salil Mehta <salil.mehta@huawei.com> > Cc: davem@davemloft.net; yuvalm@mellanox.com; leon@kernel.org; > Zhuangyuzeng (Yisen) <yisen.zhuang@huawei.com>; lipeng (Y) > <lipeng321@huawei.com>; mehta.salil@opnsrc.net; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; Linuxarm > <linuxarm@huawei.com> > Subject: Re: [RFC PATCH 00/10] net: hns3: Adds support of debugfs to > HNS3 driver > > > 3. Debugfs looks more unstructured unlike sysfs. Is there any > > de-facto standard of the user-api or drivers are allowed to > > use it in any way to expose the information from kernel. > > Hi Salil > > You don't really have a user api using debugfs, because debugfs is > unstable. Anything can change at any time. Any user tools which use > debugfs can be expected to break at any time as the information in > debugfs changes. debugfs is for debug, not to export an API. And in > production systems, it is often not mounted. Sure, I understand. > > As much as possible, you are recommended to use existing APIs, > ethtool, devlink, etc. Agreed. But what about if we want to expose anything related to firmware to user-space using the debugfs, assuming we are presenting information in structured way and not as a black-box to some user-space application. Is it something which might be discouraged? Many Thanks
> Agreed. But what about if we want to expose anything related to > firmware to user-space using the debugfs, assuming we are presenting > information in structured way and not as a black-box to some user-space > application. Is it something which might be discouraged? Hi Salil Please take a look at devlink. Mellonex have been adding commands to it for dumping firmware states. Andrew
Hi Andrew, > From: Andrew Lunn [mailto:andrew@lunn.ch] > Sent: Sunday, November 11, 2018 4:18 PM > To: Salil Mehta <salil.mehta@huawei.com> > Cc: davem@davemloft.net; yuvalm@mellanox.com; leon@kernel.org; > Zhuangyuzeng (Yisen) <yisen.zhuang@huawei.com>; lipeng (Y) > <lipeng321@huawei.com>; mehta.salil@opnsrc.net; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; Linuxarm > <linuxarm@huawei.com> > Subject: Re: [RFC PATCH 00/10] net: hns3: Adds support of debugfs to > HNS3 driver > > > Agreed. But what about if we want to expose anything related to > > firmware to user-space using the debugfs, assuming we are presenting > > information in structured way and not as a black-box to some user- > space > > application. Is it something which might be discouraged? > > Hi Salil > > Please take a look at devlink. Mellonex have been adding commands to > it for dumping firmware states. sure, thanks for the info. Ill check. Salil.