svn commit: r226901 - projects/diffused_head/sys/netinet/ipfw
Lawrence Stewart
lstewart at FreeBSD.org
Sat Oct 29 08:09:38 UTC 2011
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. */
More information about the svn-src-projects
mailing list