Date: Wed, 19 Aug 2009 20:13:09 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r196388 - head/sys/net Message-ID: <200908192013.n7JKD9RD064194@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908192013.n7JKD9RD064194>