Message ID | 20210104033141.105876-1-parav@nvidia.com |
---|---|
Headers | show |
Series | Introduce vdpa management tool | expand |
On 2021/1/4 下午3:21, Parav Pandit wrote: > >> From: Jason Wang <jasowang@redhat.com> >> Sent: Monday, January 4, 2021 12:35 PM >> >> On 2021/1/4 上午11:31, Parav Pandit wrote: >>> static int __init vdpasim_net_init(void) >>> { >>> int ret = 0; >>> @@ -176,6 +264,8 @@ static int __init vdpasim_net_init(void) >>> >>> if (default_device) >>> ret = vdpasim_net_default_dev_register(); >>> + else >>> + ret = vdpasim_net_mgmtdev_init(); >>> return ret; >>> } >>> >>> @@ -183,6 +273,8 @@ static void __exit vdpasim_net_exit(void) >>> { >>> if (default_device) >>> vdpasim_net_default_dev_unregister(); >>> + else >>> + vdpasim_net_mgmtdev_cleanup(); >>> } >>> >>> module_init(vdpasim_net_init); >>> -- 2.26.2 >> >> I wonder what's the value of keeping the default device that is out of the >> control of management API. > I think we can remove it like how I did in the v1 version. And actual vendor drivers like mlx5_vdpa will likely should do only user created devices. > I added only for backward compatibility purpose, but we can remove the default simulated vdpa net device. > What do you recommend? I think we'd better mandate this management API. This can avoid vendor specific configuration that may complex management layer. Thanks
> From: Jason Wang <jasowang@redhat.com> > Sent: Tuesday, January 5, 2021 9:36 AM > > > On 2021/1/4 下午3:21, Parav Pandit wrote: > > > >> From: Jason Wang <jasowang@redhat.com> > >> Sent: Monday, January 4, 2021 12:35 PM > >> > >> On 2021/1/4 上午11:31, Parav Pandit wrote: > >>> static int __init vdpasim_net_init(void) > >>> { > >>> int ret = 0; > >>> @@ -176,6 +264,8 @@ static int __init vdpasim_net_init(void) > >>> > >>> if (default_device) > >>> ret = vdpasim_net_default_dev_register(); > >>> + else > >>> + ret = vdpasim_net_mgmtdev_init(); > >>> return ret; > >>> } > >>> > >>> @@ -183,6 +273,8 @@ static void __exit vdpasim_net_exit(void) > >>> { > >>> if (default_device) > >>> vdpasim_net_default_dev_unregister(); > >>> + else > >>> + vdpasim_net_mgmtdev_cleanup(); > >>> } > >>> > >>> module_init(vdpasim_net_init); > >>> -- 2.26.2 > >> > >> I wonder what's the value of keeping the default device that is out > >> of the control of management API. > > I think we can remove it like how I did in the v1 version. And actual vendor > drivers like mlx5_vdpa will likely should do only user created devices. > > I added only for backward compatibility purpose, but we can remove the > default simulated vdpa net device. > > What do you recommend? > > > I think we'd better mandate this management API. This can avoid vendor > specific configuration that may complex management layer. > Sounds good. I will drop the patch that allows vdpasim_net default device via module parameter. Will post v3 with that removal.