From owner-svn-src-head@FreeBSD.ORG Mon Dec 17 10:10:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 184EF109; Mon, 17 Dec 2012 10:10:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D81508FC0A; Mon, 17 Dec 2012 10:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHAADSo064354; Mon, 17 Dec 2012 10:10:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBHAADYP064352; Mon, 17 Dec 2012 10:10:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201212171010.qBHAADYP064352@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 17 Dec 2012 10:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244347 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 10:10:14 -0000 Author: pjd Date: Mon Dec 17 10:10:13 2012 New Revision: 244347 URL: http://svnweb.freebsd.org/changeset/base/244347 Log: Warn about reaching various PF limits. Reviewed by: glebius Obtained from: WHEEL Systems Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Dec 17 09:36:43 2012 (r244346) +++ head/sys/netpfil/pf/pf.c Mon Dec 17 10:10:13 2012 (r244347) @@ -713,6 +713,7 @@ pf_initialize() NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); V_pf_limits[PF_LIMIT_STATES].zone = V_pf_state_z; uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT); + uma_zone_set_warning(V_pf_state_z, "PF states limit reached"); V_pf_state_key_z = uma_zcreate("pf state keys", sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL, @@ -734,6 +735,7 @@ pf_initialize() 0); V_pf_limits[PF_LIMIT_SRC_NODES].zone = V_pf_sources_z; uma_zone_set_max(V_pf_sources_z, PFSNODE_HIWAT); + uma_zone_set_warning(V_pf_sources_z, "PF source nodes limit reached"); V_pf_srchash = malloc(V_pf_srchashsize * sizeof(struct pf_srchash), M_PFHASH, M_WAITOK|M_ZERO); V_pf_srchashmask = V_pf_srchashsize - 1; Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Mon Dec 17 09:36:43 2012 (r244346) +++ head/sys/netpfil/pf/pf_norm.c Mon Dec 17 10:10:13 2012 (r244347) @@ -161,6 +161,7 @@ pf_normalize_init(void) V_pf_limits[PF_LIMIT_FRAGS].zone = V_pf_frent_z; V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT; uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT); + uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached"); mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF);