diff options
author | glebius <glebius@FreeBSD.org> | 2015-04-09 08:56:23 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-04-09 08:56:23 +0000 |
commit | 03afa5278008b4127d40c65209ce226f9273d194 (patch) | |
tree | de353b6eac9d0e064d9220d629c91456f2521842 /sys/netinet | |
parent | ddd581998f857a0baa54e5ffe4173a0a4e8f1c09 (diff) | |
download | FreeBSD-src-03afa5278008b4127d40c65209ce226f9273d194.zip FreeBSD-src-03afa5278008b4127d40c65209ce226f9273d194.tar.gz |
If V_maxnipq is set to zero, drain the queue here and now, instead of
relying on timeouts.
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 21fec1a..71db168 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -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 |