1 /* FILE : /usr/src/linux/include/net/prio_kernel_qtype.h
\r
3 * This file define data structures used in kernel to run PRIO scheduler.
\r
6 #include <net/kernel_qtype.h>
\r
7 #include <net/qmgt_red.h> //added by Binbon
\r
10 #define MAX_NUM_OF_PRIO 1024
\r
11 //////Begin: Added by Payne For priority scheduling//////
\r
13 Policer_Spec p_spec; //the policer info of the queue
\r
14 Filter_Spec f_spec; //the filter bound to the queue
\r
16 struct t_flow *prev; //the previous flow
\r
17 struct t_flow *next; //the next flow
\r
18 struct t_pqspec *theQueue; //the queue to which the traffic belongs
\r
20 typedef struct t_flow Flow_Spec;
\r
24 Q_Stat q_stat; //the information of the queue
\r
25 Flow_Spec *flow_spec; //the flows bound to the queue
\r
28 //doubly linked list to manage ALL queues
\r
29 struct t_pqspec *prev;//the previous queue
\r
30 struct t_pqspec *next;//the next queue
\r
31 struct sk_buff_head pkt_list; //the packet list of the queue
\r
33 void *ext; // for future extension
\r
35 typedef struct t_pqspec PQ_Spec;
\r
39 //Precedence Order Entry
\r
40 struct PreOrderEntry
\r
44 u_int8_t enabled; //0: DISABLE_BPIPE, 1: ENABLE_BPIPE
\r
45 struct PreOrderEntry *prev;
\r
46 struct PreOrderEntry *next;
\r
50 /* Information of a PRIO scheduler
\r
53 struct prio_sch_data{
\r
54 PQ_Spec *head; //head of queue list which contains ALL queues
\r
55 //created in a NIC (Let say "ALL-queue list")
\r
56 int num_of_prio; //Max number of priorities supported
\r
57 PQ_Spec *default_q; //for Best Effort traffic
\r
59 u_int32_t BW; //bandwidth of link
\r
60 //NOTE that "bandwidth" may be less than
\r
61 //NIC's maximum capacity. If it is set
\r
62 //this way, mechanism of "Maximum output
\r
63 //rate control" will enforce the NIC to run
\r
64 //at speed no more faster than "bandwidth".
\r
65 u_int32_t BW_token; //for bandwidth control (maximum output rate
\r
66 //control), measured in BYTES
\r
67 struct timeval last_ctl_time; //to count residual tokens of a NIC
\r
68 struct timer_list deq_timer; //to regularly wake up scheduler to send
\r
72 struct PreOrderEntry *poHead;
\r
73 struct semaphore *poe_list_lock; //semaphore the precedence order list
\r
76 //////End: Added by Payne For priority scheduling//////
\r