altq_hfsc.h (416ba5c74546f32a993436a99516d35008e9f384) altq_hfsc.h (0a70aaf8f5d93454d0940a09b94deecd7aa5fa0d)
1/*-
2 * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved.
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation is hereby granted (including for commercial or
6 * for-profit use), provided that both the copyright notice and this
7 * permission notice appear in all copies of the software, derivative
8 * works, or modified versions, and any portions thereof.

--- 21 unchanged lines hidden (view full) ---

30 * $KAME: altq_hfsc.h,v 1.12 2003/12/05 05:40:46 kjc Exp $
31 * $FreeBSD$
32 */
33#ifndef _ALTQ_ALTQ_HFSC_H_
34#define _ALTQ_ALTQ_HFSC_H_
35
36#include <net/altq/altq.h>
37#include <net/altq/altq_classq.h>
1/*-
2 * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved.
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation is hereby granted (including for commercial or
6 * for-profit use), provided that both the copyright notice and this
7 * permission notice appear in all copies of the software, derivative
8 * works, or modified versions, and any portions thereof.

--- 21 unchanged lines hidden (view full) ---

30 * $KAME: altq_hfsc.h,v 1.12 2003/12/05 05:40:46 kjc Exp $
31 * $FreeBSD$
32 */
33#ifndef _ALTQ_ALTQ_HFSC_H_
34#define _ALTQ_ALTQ_HFSC_H_
35
36#include <net/altq/altq.h>
37#include <net/altq/altq_classq.h>
38#include <net/altq/altq_codel.h>
38#include <net/altq/altq_red.h>
39#include <net/altq/altq_rio.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45struct service_curve {

--- 5 unchanged lines hidden (view full) ---

51/* special class handles */
52#define HFSC_NULLCLASS_HANDLE 0
53#define HFSC_MAX_CLASSES 64
54
55/* hfsc class flags */
56#define HFCF_RED 0x0001 /* use RED */
57#define HFCF_ECN 0x0002 /* use RED/ECN */
58#define HFCF_RIO 0x0004 /* use RIO */
39#include <net/altq/altq_red.h>
40#include <net/altq/altq_rio.h>
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46struct service_curve {

--- 5 unchanged lines hidden (view full) ---

52/* special class handles */
53#define HFSC_NULLCLASS_HANDLE 0
54#define HFSC_MAX_CLASSES 64
55
56/* hfsc class flags */
57#define HFCF_RED 0x0001 /* use RED */
58#define HFCF_ECN 0x0002 /* use RED/ECN */
59#define HFCF_RIO 0x0004 /* use RIO */
60#define HFCF_CODEL 0x0008 /* use CoDel */
59#define HFCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
60#define HFCF_DEFAULTCLASS 0x1000 /* default class */
61
62/* service curve types */
63#define HFSC_REALTIMESC 1
64#define HFSC_LINKSHARINGSC 2
65#define HFSC_UPPERLIMITSC 4
66#define HFSC_DEFAULTSC (HFSC_REALTIMESC|HFSC_LINKSHARINGSC)

--- 30 unchanged lines hidden (view full) ---

97 struct pktcntr xmit_cnt;
98 struct pktcntr drop_cnt;
99 u_int period;
100
101 u_int vtperiod; /* vt period sequence no */
102 u_int parentperiod; /* parent's vt period seqno */
103 int nactive; /* number of active children */
104
61#define HFCF_CLEARDSCP 0x0010 /* clear diffserv codepoint */
62#define HFCF_DEFAULTCLASS 0x1000 /* default class */
63
64/* service curve types */
65#define HFSC_REALTIMESC 1
66#define HFSC_LINKSHARINGSC 2
67#define HFSC_UPPERLIMITSC 4
68#define HFSC_DEFAULTSC (HFSC_REALTIMESC|HFSC_LINKSHARINGSC)

--- 30 unchanged lines hidden (view full) ---

99 struct pktcntr xmit_cnt;
100 struct pktcntr drop_cnt;
101 u_int period;
102
103 u_int vtperiod; /* vt period sequence no */
104 u_int parentperiod; /* parent's vt period seqno */
105 int nactive; /* number of active children */
106
105 /* red and rio related info */
107 /* codel, red and rio related info */
106 int qtype;
107 struct redstats red[3];
108 int qtype;
109 struct redstats red[3];
110 struct codel_stats codel;
108};
109
110#ifdef ALTQ3_COMPAT
111struct hfsc_interface {
112 char hfsc_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */
113};
114
115struct hfsc_attach {

--- 109 unchanged lines hidden (view full) ---

225 struct hfsc_if *cl_hif; /* back pointer to struct hfsc_if */
226 int cl_flags; /* misc flags */
227
228 struct hfsc_class *cl_parent; /* parent class */
229 struct hfsc_class *cl_siblings; /* sibling classes */
230 struct hfsc_class *cl_children; /* child classes */
231
232 class_queue_t *cl_q; /* class queue structure */
111};
112
113#ifdef ALTQ3_COMPAT
114struct hfsc_interface {
115 char hfsc_ifname[IFNAMSIZ]; /* interface name (e.g., fxp0) */
116};
117
118struct hfsc_attach {

--- 109 unchanged lines hidden (view full) ---

228 struct hfsc_if *cl_hif; /* back pointer to struct hfsc_if */
229 int cl_flags; /* misc flags */
230
231 struct hfsc_class *cl_parent; /* parent class */
232 struct hfsc_class *cl_siblings; /* sibling classes */
233 struct hfsc_class *cl_children; /* child classes */
234
235 class_queue_t *cl_q; /* class queue structure */
233 struct red *cl_red; /* RED state */
236 union {
237 struct red *cl_red; /* RED state */
238 struct codel *cl_codel; /* CoDel state */
239 } cl_aqm;
240#define cl_red cl_aqm.cl_red
241#define cl_codel cl_aqm.cl_codel
234 struct altq_pktattr *cl_pktattr; /* saved header used by ECN */
235
236 u_int64_t cl_total; /* total work in bytes */
237 u_int64_t cl_cumul; /* cumulative work in bytes
238 done by real-time criteria */
239 u_int64_t cl_d; /* deadline */
240 u_int64_t cl_e; /* eligible time */
241 u_int64_t cl_vt; /* virtual time */

--- 70 unchanged lines hidden ---
242 struct altq_pktattr *cl_pktattr; /* saved header used by ECN */
243
244 u_int64_t cl_total; /* total work in bytes */
245 u_int64_t cl_cumul; /* cumulative work in bytes
246 done by real-time criteria */
247 u_int64_t cl_d; /* deadline */
248 u_int64_t cl_e; /* eligible time */
249 u_int64_t cl_vt; /* virtual time */

--- 70 unchanged lines hidden ---