Re: [PATCH v2 4/5] vduse: Support querying IOLTB information

Yongji Xie
2022-07-14T05:59:10Z

On Thu, Jul 14, 2022 at 10:51 AM Jason Wang <jasowang@redhat.com> wrote:
>
> On Wed, Jul 6, 2022 at 1:06 PM Xie Yongji <xieyongji@bytedance.com> wrote:
> >
> > This introduces a new ioctl: VDUSE_IOTLB_GET_INFO to
> > support querying IOLTB information such as bounce
> > buffer size.
> >
> > Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
> > ---
> > drivers/vdpa/vdpa_user/vduse_dev.c | 13 +++++++++++++
> > include/uapi/linux/vduse.h | 17 +++++++++++++++++
> > 2 files changed, 30 insertions(+)
> >
> > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> > index 3bc27de58f46..c47a5d9765cf 100644
> > --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> > +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> > @@ -1089,6 +1089,19 @@ static long vduse_dev_ioctl(struct file *file, unsigned int cmd,
> > ret = vduse_dev_queue_irq_work(dev, &dev->vqs[index].inject);
> > break;
> > }
> > + case VDUSE_IOTLB_GET_INFO: {
>
> As discussed, it's better not to expose the VDUSE internal structure
> like "IOTLB" in the name.
>
> We probably need to extend GET_FD or have a new ioctl like GET_FD_INFO.
>

OK, will do it in v3.

Thanks,
Yongji