Re: [EXTERNAL] Re: [PATCH v2 1/5] uio: Add hv_vmbus_client driver

From: Greg KH
Date: Tue Jun 20 2023 - 03:07:12 EST


On Tue, Jun 20, 2023 at 05:19:14AM +0000, Saurabh Singh Sengar wrote:
> > And you are defining a "global" variable that can be modified by an individual
> > sysfs file for ANY device bound to this driver, messing with the other device's
> > ring buffer size, right? This needs to be per-device, or explain in huge detail
> > here why not.
>
> The global variable is expected to be set by userspace per device before opening, the
> particular uio device. For a particular Hyper-v device this value be same, and once
> device is open the ring buffer is allocated and there won't be any impact afterwards
> changing it. I can elaborate more of this in sysfs documentation.

That's totally confusing, please make this per-device properly, as you
will find out when you try to document it, what you are describing is
unlike any other per-device interface we have.

greg k-h