From owner-svn-src-head@FreeBSD.ORG Wed Aug 19 20:13:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ABDB106568B; Wed, 19 Aug 2009 20:13:09 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50B2A8FC6B; Wed, 19 Aug 2009 20:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7JKD9Ie064196; Wed, 19 Aug 2009 20:13:09 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7JKD9RD064194; Wed, 19 Aug 2009 20:13:09 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200908192013.n7JKD9RD064194@svn.freebsd.org> From: Kip Macy Date: Wed, 19 Aug 2009 20:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196388 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 19 Aug 2009 20:13:09 -0000 Author: kmacy Date: Wed Aug 19 20:13:09 2009 New Revision: 196388 URL: http://svn.freebsd.org/changeset/base/196388 Log: This change fixes a comment and addresses a complaint by kib@ by moving a frequently executed flowtable syslog statement from being conditional on bootverbose to conditional on a per-vnet flowtable sysctl. Approved by: re@ Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Wed Aug 19 18:08:50 2009 (r196387) +++ head/sys/net/flowtable.c Wed Aug 19 20:13:09 2009 (r196388) @@ -199,6 +199,7 @@ static uint32_t flowclean_cycles; * - idetach() cleanup for options VIMAGE builds. */ VNET_DEFINE(int, flowtable_enable) = 1; +static VNET_DEFINE(int, flowtable_debug); static VNET_DEFINE(int, flowtable_hits); static VNET_DEFINE(int, flowtable_lookups); static VNET_DEFINE(int, flowtable_misses); @@ -214,6 +215,7 @@ static VNET_DEFINE(int, flowtable_nmbflo static VNET_DEFINE(int, flowtable_ready) = 0; #define V_flowtable_enable VNET(flowtable_enable) +#define V_flowtable_debug VNET(flowtable_debug) #define V_flowtable_hits VNET(flowtable_hits) #define V_flowtable_lookups VNET(flowtable_lookups) #define V_flowtable_misses VNET(flowtable_misses) @@ -229,6 +231,8 @@ static VNET_DEFINE(int, flowtable_ready) #define V_flowtable_ready VNET(flowtable_ready) SYSCTL_NODE(_net_inet, OID_AUTO, flowtable, CTLFLAG_RD, NULL, "flowtable"); +SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, debug, CTLFLAG_RW, + &VNET_NAME(flowtable_debug), 0, "print debug info."); SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(flowtable_enable), 0, "enable flowtable caching."); SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, hits, CTLFLAG_RD, @@ -902,7 +906,7 @@ flowtable_free_stale(struct flowtable *f V_flowtable_frees++; fle_free(fle); } - if (bootverbose && count) + if (V_flowtable_debug && count) log(LOG_DEBUG, "freed %d flow entries\n", count); } @@ -954,7 +958,7 @@ flowtable_cleaner(void) flowclean_cycles++; /* - * The 20 second interval between cleaning checks + * The 10 second interval between cleaning checks * is arbitrary */ mtx_lock(&flowclean_lock);