increase vmd(8) virtio queue size from 64 to 128. Also fix an old
authormlarkin <mlarkin@openbsd.org>
Tue, 30 May 2017 13:13:47 +0000 (13:13 +0000)
committermlarkin <mlarkin@openbsd.org>
Tue, 30 May 2017 13:13:47 +0000 (13:13 +0000)
copypaste bug that didn't hurt us as long as all the queue sizes were
the same, which was the case up to now.

suggested by sf@, ok krw@

usr.sbin/vmd/virtio.c
usr.sbin/vmd/virtio.h

index 14525cf..38469c4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: virtio.c,v 1.47 2017/05/27 23:58:16 tedu Exp $        */
+/*     $OpenBSD: virtio.c,v 1.48 2017/05/30 13:13:47 mlarkin Exp $     */
 
 /*
  * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -1668,7 +1668,7 @@ virtio_init(struct vmd_vm *vm, int *child_disks, int *child_taps)
                        }
                        vioblk[i].vq[0].qs = VIOBLK_QUEUE_SIZE;
                        vioblk[i].vq[0].vq_availoffset =
-                           sizeof(struct vring_desc) * VIORND_QUEUE_SIZE;
+                           sizeof(struct vring_desc) * VIOBLK_QUEUE_SIZE;
                        vioblk[i].vq[0].vq_usedoffset = VIRTQUEUE_ALIGN(
                            sizeof(struct vring_desc) * VIOBLK_QUEUE_SIZE
                            + sizeof(uint16_t) * (2 + VIOBLK_QUEUE_SIZE));
index d996bc3..cc31e28 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: virtio.h,v 1.17 2017/05/08 09:08:40 reyk Exp $        */
+/*     $OpenBSD: virtio.h,v 1.18 2017/05/30 13:13:47 mlarkin Exp $     */
 
 /*
  * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
 #define VIORND_QUEUE_SIZE      64
 #define VIORND_QUEUE_MASK      (VIORND_QUEUE_SIZE - 1)
 
-#define VIOBLK_QUEUE_SIZE      64
+#define VIOBLK_QUEUE_SIZE      128
 #define VIOBLK_QUEUE_MASK      (VIOBLK_QUEUE_SIZE - 1)
 
-#define VIONET_QUEUE_SIZE      64
+#define VIONET_QUEUE_SIZE      128
 #define VIONET_QUEUE_MASK      (VIONET_QUEUE_SIZE - 1)
 
 /* VMM Control Interface shutdown timeout (in seconds) */