Re: [PATCH v3 03/10] fwctl: FWCTL_INFO to return basic information about the device

Andy Gospodarek
2024-08-27T14:55:48Z

On Tue, Aug 27, 2024 at 11:47:23AM -0300, Jason Gunthorpe wrote:
> On Fri, Aug 23, 2024 at 03:14:11PM +0100, Jonathan Cameron wrote:
> > On Wed, 21 Aug 2024 15:10:55 -0300
> > Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > > Userspace will need to know some details about the fwctl interface being
> > > used to locate the correct userspace code to communicate with the
> > > kernel. Provide a simple device_type enum indicating what the kernel
> > > driver is.
> > >
> > > Allow the device to provide a device specific info struct that contains
> > > any additional information that the driver may need to provide to
> > > userspace.
> > >
> > > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> >
> > Just one minor question: How likely is the data being passed back
> > from the driver to be const?
>
> I'm guessing not very? I expect alot of drivers will want to include
> dynamic information about their FW
>

Agreed. The presumption is that this will be used to query information from
FW that has no existing API to discover the values.

> > Feels like it might be and should
> > be easy enough to support either const or not.
>
> It would by easy, lets wait and see, adding another op is trivial.
> Allocating memory is not the end of the world on this path anyhow.

+1

>
> Thanks,
> Jason