Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Subtly adjust criteria for notification of Virti...
details: https://anonhg.NetBSD.org/src/rev/39ef4f1ddbaa
branches: trunk
changeset: 372901:39ef4f1ddbaa
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Jan 03 19:33:31 2023 +0000
description:
Subtly adjust criteria for notification of Virtio devices in
VIRTIO_F_RING_EVENT_IDX mode.
This fixes stalls in the vioif(4) transmit path that would happen sooner
or later, depending on interface transmit utilization, and were
particularly noticable with a NetBSD guest transmitting to its x86 KVM
host at multi-gigabit speeds.
diffstat:
sys/dev/pci/virtio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c44a28e61ffd -r 39ef4f1ddbaa sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c Tue Jan 03 18:30:33 2023 +0000
+++ b/sys/dev/pci/virtio.c Tue Jan 03 19:33:31 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.64 2022/12/30 21:38:13 jakllsch Exp $ */
+/* $NetBSD: virtio.c,v 1.65 2023/01/03 19:33:31 jakllsch Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.64 2022/12/30 21:38:13 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.65 2023/01/03 19:33:31 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1148,7 +1148,7 @@
uint16_t o, n, t;
uint16_t flags;
- o = virtio_rw16(sc, vq->vq_avail->idx);
+ o = virtio_rw16(sc, vq->vq_avail->idx) - 1;
n = vq->vq_avail_idx;
/*
Home |
Main Index |
Thread Index |
Old Index