summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2020-04-20 12:33:03 +0000
committerjmatthew <jmatthew@openbsd.org>2020-04-20 12:33:03 +0000
commit57678b0559ea557aec3b34a921a01009034c03cd (patch)
treeedec2f5024727acb4842736188361eb27e452eb6
parentCheck if we've reached the end of the current mailbox before writing past (diff)
downloadwireguard-openbsd-57678b0559ea557aec3b34a921a01009034c03cd.tar.xz
wireguard-openbsd-57678b0559ea557aec3b34a921a01009034c03cd.zip
Increase the completion queue size to prevent overflow. Under reasonably
unlikely circumstances - lots of single-fragment packets being sent, a significant number of packets being received, while the interrupt handler was unable to process the completion queue - the completion queue could overflow, which would result in the interface locking up. ok dlg@
-rw-r--r--sys/dev/pci/if_mcx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index e05cdee83e0..dc94b5d6791 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.41 2020/04/20 12:23:53 jmatthew Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.42 2020/04/20 12:33:03 jmatthew Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -71,7 +71,7 @@
/* queue sizes */
#define MCX_LOG_EQ_SIZE 6 /* one page */
-#define MCX_LOG_CQ_SIZE 11
+#define MCX_LOG_CQ_SIZE 12
#define MCX_LOG_RQ_SIZE 10
#define MCX_LOG_SQ_SIZE 11