Changeset View
Changeset View
Standalone View
Standalone View
sys/net/altq/altq_hfsc.h
Show All 29 Lines | |||||
* $KAME: altq_hfsc.h,v 1.12 2003/12/05 05:40:46 kjc Exp $ | * $KAME: altq_hfsc.h,v 1.12 2003/12/05 05:40:46 kjc Exp $ | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _ALTQ_ALTQ_HFSC_H_ | #ifndef _ALTQ_ALTQ_HFSC_H_ | ||||
#define _ALTQ_ALTQ_HFSC_H_ | #define _ALTQ_ALTQ_HFSC_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 | ||||
struct service_curve { | struct service_curve { | ||||
u_int m1; /* slope of the first segment in bits/sec */ | u_int m1; /* slope of the first segment in bits/sec */ | ||||
u_int d; /* the x-projection of the first segment in msec */ | u_int d; /* the x-projection of the first segment in msec */ | ||||
u_int m2; /* slope of the second segment in bits/sec */ | u_int m2; /* slope of the second segment in bits/sec */ | ||||
}; | }; | ||||
/* special class handles */ | /* special class handles */ | ||||
#define HFSC_NULLCLASS_HANDLE 0 | #define HFSC_NULLCLASS_HANDLE 0 | ||||
#define HFSC_MAX_CLASSES 64 | #define HFSC_MAX_CLASSES 64 | ||||
/* hfsc class flags */ | /* hfsc class flags */ | ||||
#define HFCF_RED 0x0001 /* use RED */ | #define HFCF_RED 0x0001 /* use RED */ | ||||
#define HFCF_ECN 0x0002 /* use RED/ECN */ | #define HFCF_ECN 0x0002 /* use RED/ECN */ | ||||
#define HFCF_RIO 0x0004 /* use RIO */ | #define HFCF_RIO 0x0004 /* use RIO */ | ||||
#define HFCF_CODEL 0x0008 /* use CoDel */ | |||||
#define HFCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */ | #define HFCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */ | ||||
#define HFCF_DEFAULTCLASS 0x1000 /* default class */ | #define HFCF_DEFAULTCLASS 0x1000 /* default class */ | ||||
/* service curve types */ | /* service curve types */ | ||||
#define HFSC_REALTIMESC 1 | #define HFSC_REALTIMESC 1 | ||||
#define HFSC_LINKSHARINGSC 2 | #define HFSC_LINKSHARINGSC 2 | ||||
#define HFSC_UPPERLIMITSC 4 | #define HFSC_UPPERLIMITSC 4 | ||||
#define HFSC_DEFAULTSC (HFSC_REALTIMESC|HFSC_LINKSHARINGSC) | #define HFSC_DEFAULTSC (HFSC_REALTIMESC|HFSC_LINKSHARINGSC) | ||||
Show All 30 Lines | struct hfsc_classstats { | ||||
struct pktcntr xmit_cnt; | struct pktcntr xmit_cnt; | ||||
struct pktcntr drop_cnt; | struct pktcntr drop_cnt; | ||||
u_int period; | u_int period; | ||||
u_int vtperiod; /* vt period sequence no */ | u_int vtperiod; /* vt period sequence no */ | ||||
u_int parentperiod; /* parent's vt period seqno */ | u_int parentperiod; /* parent's vt period seqno */ | ||||
int nactive; /* number of active children */ | int nactive; /* number of active children */ | ||||
/* red and rio related info */ | /* codel, red and rio related info */ | ||||
int qtype; | int qtype; | ||||
struct redstats red[3]; | struct redstats red[3]; | ||||
struct codel_stats codel; | |||||
}; | }; | ||||
#ifdef ALTQ3_COMPAT | #ifdef ALTQ3_COMPAT | ||||
struct hfsc_interface { | struct hfsc_interface { | ||||
char hfsc_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */ | char hfsc_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */ | ||||
}; | }; | ||||
struct hfsc_attach { | struct hfsc_attach { | ||||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | struct hfsc_class { | ||||
struct hfsc_if *cl_hif; /* back pointer to struct hfsc_if */ | struct hfsc_if *cl_hif; /* back pointer to struct hfsc_if */ | ||||
int cl_flags; /* misc flags */ | int cl_flags; /* misc flags */ | ||||
struct hfsc_class *cl_parent; /* parent class */ | struct hfsc_class *cl_parent; /* parent class */ | ||||
struct hfsc_class *cl_siblings; /* sibling classes */ | struct hfsc_class *cl_siblings; /* sibling classes */ | ||||
struct hfsc_class *cl_children; /* child classes */ | struct hfsc_class *cl_children; /* child classes */ | ||||
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 | |||||
struct altq_pktattr *cl_pktattr; /* saved header used by ECN */ | struct altq_pktattr *cl_pktattr; /* saved header used by ECN */ | ||||
u_int64_t cl_total; /* total work in bytes */ | u_int64_t cl_total; /* total work in bytes */ | ||||
u_int64_t cl_cumul; /* cumulative work in bytes | u_int64_t cl_cumul; /* cumulative work in bytes | ||||
done by real-time criteria */ | done by real-time criteria */ | ||||
u_int64_t cl_d; /* deadline */ | u_int64_t cl_d; /* deadline */ | ||||
u_int64_t cl_e; /* eligible time */ | u_int64_t cl_e; /* eligible time */ | ||||
u_int64_t cl_vt; /* virtual time */ | u_int64_t cl_vt; /* virtual time */ | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |