Skip to content

Commit

Permalink
vDPA: add get_vq_irq() in vdpa_config_ops
Browse files Browse the repository at this point in the history
This commit adds a new function get_vq_irq() in struct
vdpa_config_ops, which will return the irq number of a
virtqueue.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200731065533.4144-4-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Zhu Lingshan authored and Michael S. Tsirkin committed Aug 5, 2020
1 parent 2edd9cb commit 7164675
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/vdpa.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ struct vdpa_device {
* @vdev: vdpa device
* @idx: virtqueue index
* Returns the notifcation area
* @get_vq_irq: Get the irq number of a virtqueue (optional,
* but must implemented if require vq irq offloading)
* @vdev: vdpa device
* @idx: virtqueue index
* Returns int: irq number of a virtqueue,
* negative number if no irq assigned.
* @get_vq_align: Get the virtqueue align requirement
* for the device
* @vdev: vdpa device
Expand Down Expand Up @@ -180,6 +186,7 @@ struct vdpa_config_ops {
u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);
struct vdpa_notification_area
(*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
int (*get_vq_irq)(struct vdpa_device *vdv, u16 idx);

/* Device ops */
u32 (*get_vq_align)(struct vdpa_device *vdev);
Expand Down

0 comments on commit 7164675

Please sign in to comment.