summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-08-08 12:23:56 +0000
committerbluhm <bluhm@openbsd.org>2017-08-08 12:23:56 +0000
commitdb9f56ca8c1a252186c1464692ae0ae474496855 (patch)
treea81ac068bb0957a55dee60461425112e180fb3c7
parentHooks for after-select-pane and after-select-window. (diff)
downloadwireguard-openbsd-db9f56ca8c1a252186c1464692ae0ae474496855.tar.xz
wireguard-openbsd-db9f56ca8c1a252186c1464692ae0ae474496855.zip
Increase the limit of the IP protocol queues from 256 to 2048 mbufs.
The interface congestion algorithm kills performance at this place, with the large queues it never triggers. OK mpi@ claudio@
-rw-r--r--sys/netinet/ip.h6
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet6/ip6_input.c4
3 files changed, 9 insertions, 5 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h
index a208fcd8f8d..55779429d4a 100644
--- a/sys/netinet/ip.h
+++ b/sys/netinet/ip.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip.h,v 1.16 2014/07/13 13:57:56 mpi Exp $ */
+/* $OpenBSD: ip.h,v 1.17 2017/08/08 12:23:56 bluhm Exp $ */
/* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */
/*
@@ -209,6 +209,10 @@ struct ip_timestamp {
#define IP_MSS 576 /* default maximum segment size */
#ifdef _KERNEL
+
+/* Maximum lenght for IP protocol queues */
+#define IPQ_MAXLEN 2048
+
/*
* This is the real IPv4 pseudo header, used for computing the TCP and UDP
* checksums. For the Internet checksum, struct ipovly can be used instead.
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 3f74687177d..e1f7483f409 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.316 2017/08/04 14:24:05 florian Exp $ */
+/* $OpenBSD: ip_input.c,v 1.317 2017/08/08 12:23:56 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -120,7 +120,7 @@ int ip_frags = 0;
int *ipctl_vars[IPCTL_MAXID] = IPCTL_VARS;
-struct niqueue ipintrq = NIQUEUE_INITIALIZER(IFQ_MAXLEN, NETISR_IP);
+struct niqueue ipintrq = NIQUEUE_INITIALIZER(IPQ_MAXLEN, NETISR_IP);
struct pool ipqent_pool;
struct pool ipq_pool;
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index e200d5f1a67..63c7a635d10 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.199 2017/08/04 14:24:05 florian Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.200 2017/08/08 12:23:56 bluhm Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -114,7 +114,7 @@
#include <netinet/ip_carp.h>
#endif
-struct niqueue ip6intrq = NIQUEUE_INITIALIZER(IFQ_MAXLEN, NETISR_IPV6);
+struct niqueue ip6intrq = NIQUEUE_INITIALIZER(IPQ_MAXLEN, NETISR_IPV6);
struct cpumem *ip6counters;