1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00

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
This commit is contained in:
Luigi Rizzo 2010-09-28 22:46:13 +00:00
parent 09bc43b0cf
commit c08e545e99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213253
3 changed files with 7 additions and 10 deletions

View File

@ -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
/*-------------------------------------------*/

View File

@ -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);

View File

@ -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.