Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/dn_sched.h
Show All 29 Lines | |||||
* The API to write a packet scheduling algorithm for dummynet. | * The API to write a packet scheduling algorithm for dummynet. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _DN_SCHED_H | #ifndef _DN_SCHED_H | ||||
#define _DN_SCHED_H | #define _DN_SCHED_H | ||||
#include <sys/ck.h> | |||||
#define DN_MULTIQUEUE 0x01 | #define DN_MULTIQUEUE 0x01 | ||||
/* | /* | ||||
* Descriptor for a scheduling algorithm. | * Descriptor for a scheduling algorithm. | ||||
* Contains all function pointers for a given scheduler | * Contains all function pointers for a given scheduler | ||||
* This is typically created when a module is loaded, and stored | * This is typically created when a module is loaded, and stored | ||||
* in a global list of schedulers. | * in a global list of schedulers. | ||||
*/ | */ | ||||
struct dn_alg { | struct dn_alg { | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | struct dn_alg { | ||||
int (*free_queue)(struct dn_queue *q); | int (*free_queue)(struct dn_queue *q); | ||||
#ifdef NEW_AQM | #ifdef NEW_AQM | ||||
/* Getting scheduler extra parameters */ | /* Getting scheduler extra parameters */ | ||||
int (*getconfig)(struct dn_schk *, struct dn_extra_parms *); | int (*getconfig)(struct dn_schk *, struct dn_extra_parms *); | ||||
#endif | #endif | ||||
/* run-time fields */ | /* run-time fields */ | ||||
int ref_count; /* XXX number of instances in the system */ | int ref_count; /* XXX number of instances in the system */ | ||||
SLIST_ENTRY(dn_alg) next; /* Next scheduler in the list */ | CK_LIST_ENTRY(dn_alg) next; /* Next scheduler in the list */ | ||||
}; | }; | ||||
/* MSVC does not support initializers so we need this ugly macro */ | /* MSVC does not support initializers so we need this ugly macro */ | ||||
#ifdef _WIN32 | #ifdef _WIN32 | ||||
#define _SI(fld) | #define _SI(fld) | ||||
#else | #else | ||||
#define _SI(fld) fld | #define _SI(fld) fld | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |