On Tue, Aug 08, 2017 at 12:00:58AM +0200, Alexander Bluhm wrote:
> By increasing this value from 256 to 2048 I get much better results.

Now with a define instead of a magic value.

I think the if_congestion algorithm is not compatible with the way
the network stack works now.  But to make progress with performance
tuning, I think we should increase the limit here, so that it is
not hit.  Then we can see real bottlenecks, learn and revisit the
congestion algorithm later.

ok?

bluhm

Index: netinet/ip.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip.h,v
retrieving revision 1.16
diff -u -p -r1.16 ip.h
--- netinet/ip.h        13 Jul 2014 13:57:56 -0000      1.16
+++ netinet/ip.h        8 Aug 2017 11:19:30 -0000
@@ -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.
Index: netinet/ip_input.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.316
diff -u -p -r1.316 ip_input.c
--- netinet/ip_input.c  4 Aug 2017 14:24:05 -0000       1.316
+++ netinet/ip_input.c  8 Aug 2017 11:19:23 -0000
@@ -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;
Index: netinet6/ip6_input.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/ip6_input.c,v
retrieving revision 1.199
diff -u -p -r1.199 ip6_input.c
--- netinet6/ip6_input.c        4 Aug 2017 14:24:05 -0000       1.199
+++ netinet6/ip6_input.c        8 Aug 2017 11:19:43 -0000
@@ -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;
 

Reply via email to