diff options
author | luigi <luigi@FreeBSD.org> | 2010-09-28 22:46:13 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2010-09-28 22:46:13 +0000 |
commit | 9c86b371d662f0277075f7439f90e8371c63493b (patch) | |
tree | 470f493e99d65f99f6034e4294c5811c15707df2 /sys/netinet | |
parent | 58ec2fd820078708aa5c97b1150f36d7f4ac91f3 (diff) | |
download | FreeBSD-src-9c86b371d662f0277075f7439f90e8371c63493b.zip FreeBSD-src-9c86b371d662f0277075f7439f90e8371c63493b.tar.gz |
Whitespace changes to reduce diffs wrt the most recent ipfw/dummynet code:
+ remove an unused macro,
+ adjust the constants in an enum
+ small whitespace changes
MFC after: 3 days
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipfw/dn_sched_qfq.c | 6 | ||||
-rw-r--r-- | sys/netinet/ipfw/ip_dn_private.h | 9 | ||||
-rw-r--r-- | sys/netinet/ipfw/ip_dummynet.c | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/sys/netinet/ipfw/dn_sched_qfq.c b/sys/netinet/ipfw/dn_sched_qfq.c index 44555ee..c37b65e 100644 --- a/sys/netinet/ipfw/dn_sched_qfq.c +++ b/sys/netinet/ipfw/dn_sched_qfq.c @@ -61,7 +61,7 @@ typedef unsigned long bitmap; * bitmaps ops are critical. Some linux versions have __fls * and the bitmap ops. Some machines have ffs */ -#if defined(_WIN32) +#if defined(_WIN32) || (defined(__MIPSEL__) && defined(LINUX_24)) int fls(unsigned int n) { int i = 0; @@ -71,7 +71,7 @@ int fls(unsigned int n) } #endif -#if !defined(_KERNEL) || defined( __FreeBSD__ ) || defined(_WIN32) +#if !defined(_KERNEL) || defined( __FreeBSD__ ) || defined(_WIN32) || (defined(__MIPSEL__) && defined(LINUX_24)) static inline unsigned long __fls(unsigned long word) { return fls(word) - 1; @@ -107,7 +107,7 @@ void __clear_bit(int ix, bitmap *p) #endif /* !__linux__ */ #ifdef __MIPSEL__ -#define __clear_bit(ix, pData) (*pData) &= ~(1<<(ix)) +#define __clear_bit(ix, pData) (*pData) &= ~(1<<(ix)) #endif /*-------------------------------------------*/ diff --git a/sys/netinet/ipfw/ip_dn_private.h b/sys/netinet/ipfw/ip_dn_private.h index 03b43db..159ddc9 100644 --- a/sys/netinet/ipfw/ip_dn_private.h +++ b/sys/netinet/ipfw/ip_dn_private.h @@ -49,10 +49,6 @@ MALLOC_DECLARE(M_DUMMYNET); -#ifndef FREE_PKT -#define FREE_PKT(m) m_freem(m) -#endif - #ifndef __linux__ #define div64(a, b) ((int64_t)(a) / (int64_t)(b)) #endif @@ -351,13 +347,14 @@ enum { DN_DETACH = 0x0010, DN_ACTIVE = 0x0020, /* object is in evheap */ DN_F_DLINE = 0x0040, /* object is a delay line */ - DN_F_SCHI = 0x00C0, /* object is a sched.instance */ + DN_DEL_SAFE = 0x0080, /* delete a queue only if no longer needed + * by scheduler */ DN_QHT_IS_Q = 0x0100, /* in flowset, qht is a single queue */ }; extern struct dn_parms dn_cfg; //VNET_DECLARE(struct dn_parms, _base_dn_cfg); -//#define dn_cfg VNET(_base_dn_cfg) +//#define dn_cfg VNET(_base_dn_cfg) int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); diff --git a/sys/netinet/ipfw/ip_dummynet.c b/sys/netinet/ipfw/ip_dummynet.c index 01714aa..6c35876 100644 --- a/sys/netinet/ipfw/ip_dummynet.c +++ b/sys/netinet/ipfw/ip_dummynet.c @@ -2300,7 +2300,7 @@ MODULE_VERSION(dummynet, 1); * VNET_SYSINIT is also called for each existing vnet and each new vnet. */ //VNET_SYSINIT(vnet_dn_init, DN_SI_SUB, DN_MODEV_ORD+2, ip_dn_init, NULL); - + /* * Shutdown handlers up shop. These are done in REVERSE ORDER, but still * after dummynet_modevent() has been called. Not called on reboot. |