0001
0002
0003
0004
0005
0006
0007 #ifndef __NET_SCHED_FQ_H
0008 #define __NET_SCHED_FQ_H
0009
0010 #include <linux/skbuff.h>
0011 #include <linux/spinlock.h>
0012 #include <linux/types.h>
0013
0014 struct fq_tin;
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 struct fq_flow {
0032 struct fq_tin *tin;
0033 struct list_head flowchain;
0034 struct sk_buff_head queue;
0035 u32 backlog;
0036 int deficit;
0037 };
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 struct fq_tin {
0049 struct list_head new_flows;
0050 struct list_head old_flows;
0051 struct list_head tin_list;
0052 struct fq_flow default_flow;
0053 u32 backlog_bytes;
0054 u32 backlog_packets;
0055 u32 overlimit;
0056 u32 collisions;
0057 u32 flows;
0058 u32 tx_bytes;
0059 u32 tx_packets;
0060 };
0061
0062
0063
0064
0065
0066
0067
0068 struct fq {
0069 struct fq_flow *flows;
0070 unsigned long *flows_bitmap;
0071
0072 struct list_head tin_backlog;
0073 spinlock_t lock;
0074 u32 flows_cnt;
0075 u32 limit;
0076 u32 memory_limit;
0077 u32 memory_usage;
0078 u32 quantum;
0079 u32 backlog;
0080 u32 overlimit;
0081 u32 overmemory;
0082 u32 collisions;
0083 };
0084
0085 typedef struct sk_buff *fq_tin_dequeue_t(struct fq *,
0086 struct fq_tin *,
0087 struct fq_flow *flow);
0088
0089 typedef void fq_skb_free_t(struct fq *,
0090 struct fq_tin *,
0091 struct fq_flow *,
0092 struct sk_buff *);
0093
0094
0095 typedef bool fq_skb_filter_t(struct fq *,
0096 struct fq_tin *,
0097 struct fq_flow *,
0098 struct sk_buff *,
0099 void *);
0100
0101 typedef struct fq_flow *fq_flow_get_default_t(struct fq *,
0102 struct fq_tin *,
0103 int idx,
0104 struct sk_buff *);
0105
0106 #endif