diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-04 15:57:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 15:57:35 +0100 |
commit | 1b8f3e66037b3cb59fec6c0fe778c8b3734b7093 (patch) | |
tree | 90009988f68b78ba44cd02375454a424eae2ea79 /lib/irq.h | |
parent | 1bf9674158f8e9df1babc5d68d573e6fb06225ff (diff) | |
download | libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.zip libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.tar.gz libvfio-user-1b8f3e66037b3cb59fec6c0fe778c8b3734b7093.tar.bz2 |
refactor message handling path (#376)
Capture message handling inside a new vfu_msg_t private structure and pass that
around to the handlers. This provides no functional change, but greatly
simplifies and cleans up that path, especially around fd and iovec handling.
As part of fixing up the unit tests, start using global variables to reduce the
amount of boiler-plate.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/irq.h')
-rw-r--r-- | lib/irq.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -39,12 +39,10 @@ void irqs_reset(vfu_ctx_t *vfu_ctx); int -handle_device_get_irq_info(vfu_ctx_t *vfu_ctx, uint32_t size, - struct vfio_irq_info *irq_info_in, - struct vfio_irq_info *irq_info_out); +handle_device_get_irq_info(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); + int -handle_device_set_irqs(vfu_ctx_t *vfu_ctx, uint32_t size, - int *fds, size_t nr_fds, struct vfio_irq_set *irq_set); +handle_device_set_irqs(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); #endif /* LIB_VFIO_USER_IRQ_H */ |