Skip to content

Commit 7164675

Browse files
Zhu Lingshanmstsirkin
authored andcommitted
vDPA: add get_vq_irq() in vdpa_config_ops
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 <[email protected]> Suggested-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 2edd9cb commit 7164675

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/vdpa.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ struct vdpa_device {
8989
* @vdev: vdpa device
9090
* @idx: virtqueue index
9191
* Returns the notifcation area
92+
* @get_vq_irq: Get the irq number of a virtqueue (optional,
93+
* but must implemented if require vq irq offloading)
94+
* @vdev: vdpa device
95+
* @idx: virtqueue index
96+
* Returns int: irq number of a virtqueue,
97+
* negative number if no irq assigned.
9298
* @get_vq_align: Get the virtqueue align requirement
9399
* for the device
94100
* @vdev: vdpa device
@@ -180,6 +186,7 @@ struct vdpa_config_ops {
180186
u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx);
181187
struct vdpa_notification_area
182188
(*get_vq_notification)(struct vdpa_device *vdev, u16 idx);
189+
int (*get_vq_irq)(struct vdpa_device *vdv, u16 idx);
183190

184191
/* Device ops */
185192
u32 (*get_vq_align)(struct vdpa_device *vdev);

0 commit comments

Comments
 (0)