diff options
author | 2022-12-16 11:34:51 +0100 | |
---|---|---|
committer | 2023-10-03 15:18:54 +0300 | |
commit | 9a58d030b9d4d7db297ed0b5d716580526058f78 (patch) | |
tree | a90e3aed2a49808a8ca7647a935da4a497cb1f73 /virtio_loopback.c | |
parent | 8b82f2a4574e70ad1667c53a6fa6e896d9cb8d77 (diff) |
Virtio-loopback-adapter Delta release:
- Add queue num and size in the arguments
- Stop creating user-space threads for its virtio-loopback notification
Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>
Diffstat (limited to 'virtio_loopback.c')
-rw-r--r-- | virtio_loopback.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/virtio_loopback.c b/virtio_loopback.c index 174e263..1e40136 100644 --- a/virtio_loopback.c +++ b/virtio_loopback.c @@ -1327,7 +1327,8 @@ void virtio_loopback_update_irq(VirtIODevice *vdev) DBG("Trigger interrupt (ioctl)\n"); DBG("Interrupt counter: %d\n", int_count++); - (void)pthread_create(&my_thread_id, NULL, my_notify, NULL); + //(void)pthread_create(&my_thread_id, NULL, my_notify, NULL); + (void) ioctl(fd, IRQ, &irq_num); } @@ -1768,6 +1769,8 @@ void virtio_loopback_write(VirtIODevice *vdev, uint64_t offset, uint64_t desc_addr; uint32_t vqs_size = get_vqs_max_size(global_vdev); + ioctl(fd, SHARE_VQS, &vdev->queue_sel); + desc_addr = (uint64_t)mmap(NULL, vqs_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); |