From owner-svn-src-projects@FreeBSD.ORG Sat Oct 29 08:09:38 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 912C6106566B; Sat, 29 Oct 2011 08:09:38 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 803228FC08; Sat, 29 Oct 2011 08:09:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9T89cNY001232; Sat, 29 Oct 2011 08:09:38 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T89cLX001228; Sat, 29 Oct 2011 08:09:38 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201110290809.p9T89cLX001228@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 29 Oct 2011 08:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226901 - projects/diffused_head/sys/netinet/ipfw X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 08:09:38 -0000 Author: lstewart Date: Sat Oct 29 08:09:37 2011 New Revision: 226901 URL: http://svn.freebsd.org/changeset/base/226901 Log: s/di_conf/di_config in the files which had been accidentally missed. Sponsored by: FreeBSD Foundation Modified: projects/diffused_head/sys/netinet/ipfw/diffuse_export.c projects/diffused_head/sys/netinet/ipfw/diffuse_flowtable.c projects/diffused_head/sys/netinet/ipfw/diffuse_private.h Modified: projects/diffused_head/sys/netinet/ipfw/diffuse_export.c ============================================================================== --- projects/diffused_head/sys/netinet/ipfw/diffuse_export.c Sat Oct 29 07:17:47 2011 (r226900) +++ projects/diffused_head/sys/netinet/ipfw/diffuse_export.c Sat Oct 29 08:09:37 2011 (r226901) @@ -199,9 +199,9 @@ remove_rec(struct di_export_rec *r) DI_ER_LOCK_ASSERT(); - TAILQ_REMOVE(&di_conf.export_rec_list, r, next); + TAILQ_REMOVE(&di_config.export_rec_list, r, next); uma_zfree(di_rec_zone, r); - di_conf.export_rec_count--; + di_config.export_rec_count--; } struct di_export_rec * @@ -222,7 +222,7 @@ diffuse_export_add_rec(struct di_ft_entr DI_ER_LOCK(); /* Update and export entry if we have one for this flow already. */ - TAILQ_FOREACH(s, &di_conf.export_rec_list, next) { + TAILQ_FOREACH(s, &di_config.export_rec_list, next) { /* * Only compare pointer for speed. If new flow with same 5-tuple * we may add another record for same 5-tuple @@ -249,7 +249,7 @@ diffuse_export_add_rec(struct di_ft_entr r->fcnt = q->fcnt; r->ftype = q->ftype; r->mtype = add_command ? DIP_MSG_ADD : DIP_MSG_REMOVE; - r->ttype = di_conf.an_rule_removal; + r->ttype = di_config.an_rule_removal; r->pcnt = q->pcnt; /* * The flow byte count we send across the wire is in KBytes @@ -286,8 +286,8 @@ diffuse_export_add_rec(struct di_ft_entr strcpy(r->action, ex->conf.action); strcpy(r->act_params, ex->conf.action_param); - TAILQ_INSERT_TAIL(&di_conf.export_rec_list, r, next); - di_conf.export_rec_count++; + TAILQ_INSERT_TAIL(&di_config.export_rec_list, r, next); + di_config.export_rec_count++; r->no_earlier.tv_sec = r->no_earlier.tv_usec = 0; } @@ -310,8 +310,8 @@ diffuse_export_prune_recs(void) if (V_ex_max_qsize < 0) V_ex_max_qsize = 0; - while (di_conf.export_rec_count > V_ex_max_qsize) { - r = TAILQ_FIRST(&di_conf.export_rec_list); + while (di_config.export_rec_count > V_ex_max_qsize) { + r = TAILQ_FIRST(&di_config.export_rec_list); remove_rec(r); } @@ -325,7 +325,7 @@ diffuse_export_remove_recs(char *ename) DI_ER_LOCK(); - TAILQ_FOREACH_SAFE(r, &di_conf.export_rec_list, next, tmp) { + TAILQ_FOREACH_SAFE(r, &di_config.export_rec_list, next, tmp) { if (ename == NULL || !strcmp(r->ename, ename)) remove_rec(r); } @@ -627,8 +627,8 @@ diffuse_export_send(struct di_export *ex DI_ER_LOCK(); - if (di_conf.export_rec_count == 0 || - waiting + di_conf.export_rec_count < conf->min_batch) { + if (di_config.export_rec_count == 0 || + waiting + di_config.export_rec_count < conf->min_batch) { DI_ER_UNLOCK(); return (0); } @@ -637,7 +637,7 @@ diffuse_export_send(struct di_export *ex /* Export the records that are over max delay, if max_delay set. */ if (conf->max_delay > 0) { - TAILQ_FOREACH_SAFE(r, &di_conf.export_rec_list, next, tmp) { + TAILQ_FOREACH_SAFE(r, &di_config.export_rec_list, next, tmp) { if (tv_sub0_ms(&tv, &r->time) >= conf->max_delay && tv_sub0_ms(&tv, &r->no_earlier) > 0) { dyn_rsize = get_data_size(r); @@ -656,8 +656,8 @@ diffuse_export_send(struct di_export *ex /* Export up to max_batch or if max_batch is not set export the rest. */ if ((conf->max_batch == 0 || cnt < conf->max_batch) && - di_conf.export_rec_count > 0) { - TAILQ_FOREACH_SAFE(r, &di_conf.export_rec_list, next, tmp) { + di_config.export_rec_count > 0) { + TAILQ_FOREACH_SAFE(r, &di_config.export_rec_list, next, tmp) { if (tv_sub0_ms(&tv, &r->no_earlier) > 0) { dyn_rsize = get_data_size(r); if (queue_tx_pkt_if(ex, dyn_rsize, &tv, @@ -671,7 +671,7 @@ diffuse_export_send(struct di_export *ex cnt++; } if ((conf->max_batch > 0 && cnt >= conf->max_batch) || - di_conf.export_rec_count == 0) + di_config.export_rec_count == 0) break; } } Modified: projects/diffused_head/sys/netinet/ipfw/diffuse_flowtable.c ============================================================================== --- projects/diffused_head/sys/netinet/ipfw/diffuse_flowtable.c Sat Oct 29 07:17:47 2011 (r226900) +++ projects/diffused_head/sys/netinet/ipfw/diffuse_flowtable.c Sat Oct 29 08:09:37 2011 (r226901) @@ -525,7 +525,7 @@ update_lifetime(struct di_ft_entry *q, s #ifdef _KERNEL - if (di_conf.an_rule_removal == DIP_TIMEOUT_NONE && + if (di_config.an_rule_removal == DIP_TIMEOUT_NONE && (!q->to || q->expire != old_expire)) { /* * Guard against too big timeout values. @@ -1298,13 +1298,13 @@ diffuse_ft_do_export(struct di_ft_entry struct di_flow_class *c; struct timeval now; - if (di_conf.an_rule_removal == DIP_TIMEOUT_RULE) + if (di_config.an_rule_removal == DIP_TIMEOUT_RULE) getmicrotime(&now); DI_FT_RLOCK(); /* Export if rule timeout used and we are close to expiry. */ - if (di_conf.an_rule_removal == DIP_TIMEOUT_RULE && + if (di_config.an_rule_removal == DIP_TIMEOUT_RULE && q->ex_time.tv_sec > 0 && now.tv_sec > q->ex_time.tv_sec && q->expire - time_uptime < TIME_BEFORE_EXPIRE) { Modified: projects/diffused_head/sys/netinet/ipfw/diffuse_private.h ============================================================================== --- projects/diffused_head/sys/netinet/ipfw/diffuse_private.h Sat Oct 29 07:17:47 2011 (r226900) +++ projects/diffused_head/sys/netinet/ipfw/diffuse_private.h Sat Oct 29 08:09:37 2011 (r226901) @@ -54,14 +54,14 @@ MALLOC_DECLARE(M_DIFFUSE); -#define DI_LOCK_INIT() rw_init(&di_conf.mtx, "diffuse main lock") -#define DI_LOCK_DESTROY() rw_destroy(&di_conf.mtx) -#define DI_RLOCK() rw_rlock(&di_conf.mtx) -#define DI_WLOCK() rw_wlock(&di_conf.mtx) -#define DI_UNLOCK() rw_unlock(&di_conf.mtx) -#define DI_RLOCK_ASSERT() rw_assert(&di_conf.mtx, RA_RLOCKED) -#define DI_WLOCK_ASSERT() rw_assert(&di_conf.mtx, RA_WLOCKED) -#define DI_LOCK_ASSERT() rw_assert(&di_conf.mtx, RA_LOCKED) +#define DI_LOCK_INIT() rw_init(&di_config.mtx, "diffuse main lock") +#define DI_LOCK_DESTROY() rw_destroy(&di_config.mtx) +#define DI_RLOCK() rw_rlock(&di_config.mtx) +#define DI_WLOCK() rw_wlock(&di_config.mtx) +#define DI_UNLOCK() rw_unlock(&di_config.mtx) +#define DI_RLOCK_ASSERT() rw_assert(&di_config.mtx, RA_RLOCKED) +#define DI_WLOCK_ASSERT() rw_assert(&di_config.mtx, RA_WLOCKED) +#define DI_LOCK_ASSERT() rw_assert(&di_config.mtx, RA_LOCKED) SLIST_HEAD(di_feature_alg_head, di_feature_alg); LIST_HEAD(di_features_head, di_feature); @@ -254,7 +254,7 @@ struct di_class_tag { }; /* Global configuration. */ -extern struct di_parms di_conf; +extern struct di_parms di_config; /* Function prototypes. */