Changeset View
Changeset View
Standalone View
Standalone View
sys/net/altq/altq_priq.h
Show All 26 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _ALTQ_ALTQ_PRIQ_H_ | #ifndef _ALTQ_ALTQ_PRIQ_H_ | ||||
#define _ALTQ_ALTQ_PRIQ_H_ | #define _ALTQ_ALTQ_PRIQ_H_ | ||||
#include <net/altq/altq.h> | #include <net/altq/altq.h> | ||||
#include <net/altq/altq_classq.h> | #include <net/altq/altq_classq.h> | ||||
#include <net/altq/altq_codel.h> | |||||
#include <net/altq/altq_red.h> | #include <net/altq/altq_red.h> | ||||
#include <net/altq/altq_rio.h> | #include <net/altq/altq_rio.h> | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
#define PRIQ_MAXPRI 16 /* upper limit of the number of priorities */ | #define PRIQ_MAXPRI 16 /* upper limit of the number of priorities */ | ||||
Show All 13 Lines | struct priq_add_class { | ||||
u_int32_t class_handle; /* return value */ | u_int32_t class_handle; /* return value */ | ||||
}; | }; | ||||
#endif /* ALTQ3_COMPAT */ | #endif /* ALTQ3_COMPAT */ | ||||
/* priq class flags */ | /* priq class flags */ | ||||
#define PRCF_RED 0x0001 /* use RED */ | #define PRCF_RED 0x0001 /* use RED */ | ||||
#define PRCF_ECN 0x0002 /* use RED/ECN */ | #define PRCF_ECN 0x0002 /* use RED/ECN */ | ||||
#define PRCF_RIO 0x0004 /* use RIO */ | #define PRCF_RIO 0x0004 /* use RIO */ | ||||
#define PRCF_CODEL 0x0008 /* use CoDel */ | |||||
#define PRCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */ | #define PRCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */ | ||||
#define PRCF_DEFAULTCLASS 0x1000 /* default class */ | #define PRCF_DEFAULTCLASS 0x1000 /* default class */ | ||||
/* special class handles */ | /* special class handles */ | ||||
#define PRIQ_NULLCLASS_HANDLE 0 | #define PRIQ_NULLCLASS_HANDLE 0 | ||||
#ifdef ALTQ3_COMPAT | #ifdef ALTQ3_COMPAT | ||||
struct priq_delete_class { | struct priq_delete_class { | ||||
Show All 27 Lines | struct priq_classstats { | ||||
u_int32_t class_handle; | u_int32_t class_handle; | ||||
u_int qlength; | u_int qlength; | ||||
u_int qlimit; | u_int qlimit; | ||||
u_int period; | u_int period; | ||||
struct pktcntr xmitcnt; /* transmitted packet counter */ | struct pktcntr xmitcnt; /* transmitted packet counter */ | ||||
struct pktcntr dropcnt; /* dropped packet counter */ | struct pktcntr dropcnt; /* dropped packet counter */ | ||||
/* red and rio related info */ | /* codel, red and rio related info */ | ||||
int qtype; | int qtype; | ||||
struct redstats red[3]; /* rio has 3 red stats */ | struct redstats red[3]; /* rio has 3 red stats */ | ||||
struct codel_stats codel; | |||||
}; | }; | ||||
#ifdef ALTQ3_COMPAT | #ifdef ALTQ3_COMPAT | ||||
struct priq_class_stats { | struct priq_class_stats { | ||||
struct priq_interface iface; | struct priq_interface iface; | ||||
int maxpri; /* in/out */ | int maxpri; /* in/out */ | ||||
struct priq_classstats *stats; /* pointer to stats array */ | struct priq_classstats *stats; /* pointer to stats array */ | ||||
Show All 13 Lines | |||||
#endif /* ALTQ3_COMPAT */ | #endif /* ALTQ3_COMPAT */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct priq_class { | struct priq_class { | ||||
u_int32_t cl_handle; /* class handle */ | u_int32_t cl_handle; /* class handle */ | ||||
class_queue_t *cl_q; /* class queue structure */ | class_queue_t *cl_q; /* class queue structure */ | ||||
union { | |||||
struct red *cl_red; /* RED state */ | struct red *cl_red; /* RED state */ | ||||
struct codel *cl_codel; /* CoDel state */ | |||||
} cl_aqm; | |||||
#define cl_red cl_aqm.cl_red | |||||
#define cl_codel cl_aqm.cl_codel | |||||
int cl_pri; /* priority */ | int cl_pri; /* priority */ | ||||
int cl_flags; /* class flags */ | int cl_flags; /* class flags */ | ||||
struct priq_if *cl_pif; /* back pointer to pif */ | struct priq_if *cl_pif; /* back pointer to pif */ | ||||
struct altq_pktattr *cl_pktattr; /* saved header used by ECN */ | struct altq_pktattr *cl_pktattr; /* saved header used by ECN */ | ||||
/* statistics */ | /* statistics */ | ||||
u_int cl_period; /* backlog period */ | u_int cl_period; /* backlog period */ | ||||
struct pktcntr cl_xmitcnt; /* transmitted packet counter */ | struct pktcntr cl_xmitcnt; /* transmitted packet counter */ | ||||
Show All 25 Lines |