Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2015 08:56:24 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281295 - head/sys/netinet
Message-ID:  <201504090856.t398uOAk077262@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Thu Apr  9 08:56:23 2015
New Revision: 281295
URL: https://svnweb.freebsd.org/changeset/base/281295

Log:
  If V_maxnipq is set to zero, drain the queue here and now, instead of
  relying on timeouts.
  
  Sponsored by:	Nginx, Inc.

Modified:
  head/sys/netinet/ip_input.c

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c	Thu Apr  9 08:52:02 2015	(r281294)
+++ head/sys/netinet/ip_input.c	Thu Apr  9 08:56:23 2015	(r281295)
@@ -826,12 +826,12 @@ maxnipq_update(void)
 	if (V_maxnipq > 0)
 		uma_zone_set_max(V_ipq_zone, V_maxnipq);
 	/*
-	 * Zero specifies no further fragment queue allocation -- set the
-	 * bound very low, but rely on implementation elsewhere to actually
-	 * prevent allocation and reclaim current queues.
+	 * Zero specifies no further fragment queue allocation.
 	 */
-	if (V_maxnipq == 0)
+	if (V_maxnipq == 0) {
 		uma_zone_set_max(V_ipq_zone, 1);
+		ip_drain_vnet();
+	}
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504090856.t398uOAk077262>