mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
vdpa: add get_config_size callback in vdpa_config_ops
This new callback is used to get the size of the configuration space of vDPA devices. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20210315163450.254396-9-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
bc433e5e0d
commit
442706f9f9
@@ -150,6 +150,9 @@ struct vdpa_iova_range {
|
||||
* @set_status: Set the device status
|
||||
* @vdev: vdpa device
|
||||
* @status: virtio device status
|
||||
* @get_config_size: Get the size of the configuration space
|
||||
* @vdev: vdpa device
|
||||
* Returns size_t: configuration size
|
||||
* @get_config: Read from device specific configuration space
|
||||
* @vdev: vdpa device
|
||||
* @offset: offset from the beginning of
|
||||
@@ -231,6 +234,7 @@ struct vdpa_config_ops {
|
||||
u32 (*get_vendor_id)(struct vdpa_device *vdev);
|
||||
u8 (*get_status)(struct vdpa_device *vdev);
|
||||
void (*set_status)(struct vdpa_device *vdev, u8 status);
|
||||
size_t (*get_config_size)(struct vdpa_device *vdev);
|
||||
void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
|
||||
void *buf, unsigned int len);
|
||||
void (*set_config)(struct vdpa_device *vdev, unsigned int offset,
|
||||
|
||||
Reference in New Issue
Block a user