aboutsummaryrefslogtreecommitdiff
path: root/sys/netpfil/ipfw/ip_dn_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netpfil/ipfw/ip_dn_private.h')
-rw-r--r--sys/netpfil/ipfw/ip_dn_private.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/sys/netpfil/ipfw/ip_dn_private.h b/sys/netpfil/ipfw/ip_dn_private.h
index 86dd5a8a0cbb..8f8fca5fbd58 100644
--- a/sys/netpfil/ipfw/ip_dn_private.h
+++ b/sys/netpfil/ipfw/ip_dn_private.h
@@ -46,7 +46,7 @@
#define D(fmt, ...) printf("%-10s " fmt "\n", \
__FUNCTION__, ## __VA_ARGS__)
#define DX(lev, fmt, ...) do { \
- if (dn_cfg.debug > lev) D(fmt, ## __VA_ARGS__); } while (0)
+ if (V_dn_cfg.debug > lev) D(fmt, ## __VA_ARGS__); } while (0)
#endif
MALLOC_DECLARE(M_DUMMYNET);
@@ -56,26 +56,26 @@ MALLOC_DECLARE(M_DUMMYNET);
#endif
#define DN_LOCK_INIT() do { \
- mtx_init(&dn_cfg.uh_mtx, "dn_uh", NULL, MTX_DEF); \
- mtx_init(&dn_cfg.bh_mtx, "dn_bh", NULL, MTX_DEF); \
+ mtx_init(&V_dn_cfg.uh_mtx, "dn_uh", NULL, MTX_DEF); \
+ mtx_init(&V_dn_cfg.bh_mtx, "dn_bh", NULL, MTX_DEF); \
} while (0)
#define DN_LOCK_DESTROY() do { \
- mtx_destroy(&dn_cfg.uh_mtx); \
- mtx_destroy(&dn_cfg.bh_mtx); \
+ mtx_destroy(&V_dn_cfg.uh_mtx); \
+ mtx_destroy(&V_dn_cfg.bh_mtx); \
} while (0)
#if 0 /* not used yet */
-#define DN_UH_RLOCK() mtx_lock(&dn_cfg.uh_mtx)
-#define DN_UH_RUNLOCK() mtx_unlock(&dn_cfg.uh_mtx)
-#define DN_UH_WLOCK() mtx_lock(&dn_cfg.uh_mtx)
-#define DN_UH_WUNLOCK() mtx_unlock(&dn_cfg.uh_mtx)
-#define DN_UH_LOCK_ASSERT() mtx_assert(&dn_cfg.uh_mtx, MA_OWNED)
+#define DN_UH_RLOCK() mtx_lock(&V_dn_cfg.uh_mtx)
+#define DN_UH_RUNLOCK() mtx_unlock(&V_dn_cfg.uh_mtx)
+#define DN_UH_WLOCK() mtx_lock(&V_dn_cfg.uh_mtx)
+#define DN_UH_WUNLOCK() mtx_unlock(&V_dn_cfg.uh_mtx)
+#define DN_UH_LOCK_ASSERT() mtx_assert(&V_dn_cfg.uh_mtx, MA_OWNED)
#endif
-#define DN_BH_RLOCK() mtx_lock(&dn_cfg.uh_mtx)
-#define DN_BH_RUNLOCK() mtx_unlock(&dn_cfg.uh_mtx)
-#define DN_BH_WLOCK() mtx_lock(&dn_cfg.uh_mtx)
-#define DN_BH_WUNLOCK() mtx_unlock(&dn_cfg.uh_mtx)
-#define DN_BH_LOCK_ASSERT() mtx_assert(&dn_cfg.uh_mtx, MA_OWNED)
+#define DN_BH_RLOCK() mtx_lock(&V_dn_cfg.uh_mtx)
+#define DN_BH_RUNLOCK() mtx_unlock(&V_dn_cfg.uh_mtx)
+#define DN_BH_WLOCK() mtx_lock(&V_dn_cfg.uh_mtx)
+#define DN_BH_WUNLOCK() mtx_unlock(&V_dn_cfg.uh_mtx)
+#define DN_BH_LOCK_ASSERT() mtx_assert(&V_dn_cfg.uh_mtx, MA_OWNED)
SLIST_HEAD(dn_schk_head, dn_schk);
SLIST_HEAD(dn_sch_inst_head, dn_sch_inst);
@@ -101,7 +101,7 @@ set_oid(struct dn_id *o, int type, int len)
}
/*
- * configuration and global data for a dummynet instance
+ * configuration and data for a dummynet instance
*
* When a configuration is modified from userland, 'id' is incremented
* so we can use the value to check for stale pointers.
@@ -154,10 +154,6 @@ struct dn_parms {
struct dn_ht *schedhash;
/* list of flowsets without a scheduler -- use sch_chain */
struct dn_fsk_head fsu; /* list of unlinked flowsets */
- struct dn_alg_head schedlist; /* list of algorithms */
-#ifdef NEW_AQM
- struct dn_aqm_head aqmlist; /* list of AQMs */
-#endif
/* Store the fs/sch to scan when draining. The value is the
* bucket number of the hash table. Expire can be disabled
@@ -393,9 +389,8 @@ struct dn_pkt_tag {
uint16_t iphdr_off; /* IP header offset for mtodo() */
};
-extern struct dn_parms dn_cfg;
-//VNET_DECLARE(struct dn_parms, _base_dn_cfg);
-//#define dn_cfg VNET(_base_dn_cfg)
+VNET_DECLARE(struct dn_parms, dn_cfg);
+#define V_dn_cfg VNET(dn_cfg)
int dummynet_io(struct mbuf **, int , struct ip_fw_args *);
void dummynet_task(void *context, int pending);