Subject: Re:[PATCH v2] vdpa: regist vhost-vdpa dev class

From: <[email-masked]>
Date: Tue, 11 Jan 2022 15:09:40 +0800 (CST)

Hi Jason,
> On Fri, Dec 24, 2021 at 3:13 PM Yi Wangwrote:
> >
> > From: Zhang Min
> >
> > Some applications like kata-containers need to acquire MAJOR/MINOR/DEVNAME
> > for devInfo [1], so regist vhost-vdpa dev class to expose uevent.
>
> Hi:
>
> I think we need to be more verbose here e.g:
>
> 1) why can't we get major/minor with the current interface

Although major/minor can be acquired in /sys/bus/vdpa/devices/vdpa0/vhost-vdpa/vhost-vdpa-0/dev,
applications like kata-containers prefer and actually have tried to obtain them
in /sys/class/vhost-vdpa/vhost-vdpa-0/uevent, such like [1].

> 2) what kind of the uevent is required and not supported currently

The items needed show in uevent are MAJOR MINOR DEVNAME that vhost_vdpa_probe
currently has registed, but dev_uevent_filter failed to pass and uevent show is
empty now, so we regist dev class to let dev_uevent_filter pass and show them.

1. https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/device/config/config.go

>
> Thanks
>
> >
> > 1. https://github.com/kata-containers/kata-containers/blob/main/src/runtime/virtcontainers/device/config/config.go
> >
> > Signed-off-by: Zhang Min