RE: [PATCH linux-next v2 4/7] vdpa: Define vdpa mgmt device, ops and a netlink interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> From: Jason Wang <jasowang@xxxxxxxxxx>
> Sent: Tuesday, January 5, 2021 9:40 AM
> 
> On 2021/1/4 下午3:24, Parav Pandit wrote:
> >
> >> From: Jason Wang <jasowang@xxxxxxxxxx>
> >> Sent: Monday, January 4, 2021 12:33 PM
> >>
> >> On 2021/1/4 上午11:31, Parav Pandit wrote:
> >>> To add one or more VDPA devices, define a management device which
> >>> allows adding or removing vdpa device. A management device defines
> >>> set of callbacks to manage vdpa devices.
> >>>
> >>> To begin with, it defines add and remove callbacks through which a
> >>> user defined vdpa device can be added or removed.
> >>>
> >>> A unique management device is identified by its unique handle
> >>> identified by management device name and optionally the bus name.
> >>>
> >>> Hence, introduce routine through which driver can register a
> >>> management device and its callback operations for adding and remove
> >>> a vdpa device.
> >>>
> >>> Introduce vdpa netlink socket family so that user can query
> >>> management device and its attributes.
> >>>
> >>> Example of show vdpa management device which allows creating vdpa
> >>> device of networking class (device id = 0x1) of virtio specification
> >>> 1.1 section 5.1.1.
> >>>
> >>> $ vdpa mgmtdev show
> >>> vdpasim_net:
> >>>     supported_classes:
> >>>       net
> >>>
> >>> Example of showing vdpa management device in JSON format.
> >>>
> >>> $ vdpa mgmtdev show -jp
> >>> {
> >>>       "show": {
> >>>           "vdpasim_net": {
> >>>               "supported_classes": [ "net" ]
> >>>           }
> >>>       }
> >>> }
> >>>
> >>> Signed-off-by: Parav Pandit<parav@xxxxxxxxxx>
> >>> Reviewed-by: Eli Cohen<elic@xxxxxxxxxx>
> >>> Reviewed-by: Jason Wang<jasowang@xxxxxxxxxx>
> >>> ---
> >>> Changelog:
> >>> v1->v2:
> >>>    - rebased
> >>>    - updated commit log example for management device name from
> >>>      "vdpasim" to "vdpasim_net"
> >>>    - removed device_id as net and block management devices are
> >>> separated
> >>
> >> So I wonder whether there could be a type of management devices that
> >> can deal with multiple types of virtio devices. If yes, we probably
> >> need to add device id back.
> > At this point mlx5 plan to support only net.
> > It is useful to see what type of vdpa device is supported by a management
> device.
> >
> > In future if a mgmt dev supports multiple types, user needs to choose
> desired type.
> > I guess we can differ this optional type to future, when such mgmt. device
> will/may be available.
> 
> 
> I worry if we remove device_id, it may gives a hint that multiple mgmt
> devices needs to be registered if it supports multiple types.
> 
No it shouldn't. because we do expose multiple supported types in mgmtdev attributes.

> So if possible I would like to keep the device_id here.
> 
Its possible to keep it. But with current drivers, mainly mlx5 and vdpa_sim, it is redundant.
Not sure of the ifc's plan.
We have been splitting modules to handle net and block differently in mlx5 as well as vdpa_sim.
So it looks to me that both may be separate management drivers (and management devices).
Such as vdpasim_net and vdpasim_block.
mlx5 doesn't have plan for block yet.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux