Lines Matching refs:tin

19 	struct fq_tin *tin = flow->tin;  in __fq_adjust_removal()  local
22 tin->backlog_bytes -= bytes; in __fq_adjust_removal()
23 tin->backlog_packets -= packets; in __fq_adjust_removal()
31 if (flow == &tin->default_flow) { in __fq_adjust_removal()
32 list_del_init(&tin->tin_list); in __fq_adjust_removal()
67 struct fq_tin *tin = flow->tin; in fq_flow_drop() local
82 free_func(fq, tin, flow, skb); in fq_flow_drop()
91 struct fq_tin *tin, in fq_tin_dequeue() argument
101 head = &tin->new_flows; in fq_tin_dequeue()
103 head = &tin->old_flows; in fq_tin_dequeue()
113 &tin->old_flows); in fq_tin_dequeue()
117 skb = dequeue_func(fq, tin, flow); in fq_tin_dequeue()
120 if ((head == &tin->new_flows) && in fq_tin_dequeue()
121 !list_empty(&tin->old_flows)) { in fq_tin_dequeue()
122 list_move_tail(&flow->flowchain, &tin->old_flows); in fq_tin_dequeue()
125 flow->tin = NULL; in fq_tin_dequeue()
131 tin->tx_bytes += skb->len; in fq_tin_dequeue()
132 tin->tx_packets++; in fq_tin_dequeue()
145 struct fq_tin *tin, u32 idx, in fq_flow_classify() argument
153 if (flow->tin && flow->tin != tin) { in fq_flow_classify()
154 flow = &tin->default_flow; in fq_flow_classify()
155 tin->collisions++; in fq_flow_classify()
159 if (!flow->tin) in fq_flow_classify()
160 tin->flows++; in fq_flow_classify()
167 struct fq_tin *tin; in fq_find_fattest_flow() local
184 list_for_each_entry(tin, &fq->tin_backlog, tin_list) { in fq_find_fattest_flow()
185 unsigned int cur_len = tin->default_flow.backlog; in fq_find_fattest_flow()
190 flow = &tin->default_flow; in fq_find_fattest_flow()
198 struct fq_tin *tin, u32 idx, in fq_tin_enqueue() argument
208 flow = fq_flow_classify(fq, tin, idx, skb); in fq_tin_enqueue()
211 if (flow != &tin->default_flow) in fq_tin_enqueue()
213 else if (list_empty(&tin->tin_list)) in fq_tin_enqueue()
214 list_add(&tin->tin_list, &fq->tin_backlog); in fq_tin_enqueue()
217 flow->tin = tin; in fq_tin_enqueue()
221 tin->backlog_bytes += skb->len; in fq_tin_enqueue()
222 tin->backlog_packets++; in fq_tin_enqueue()
231 &tin->new_flows); in fq_tin_enqueue()
243 flow->tin->overlimit++; in fq_tin_enqueue()
258 struct fq_tin *tin = flow->tin; in fq_flow_filter() local
264 if (!filter_func(fq, tin, flow, skb, filter_data)) in fq_flow_filter()
269 free_func(fq, tin, flow, skb); in fq_flow_filter()
274 struct fq_tin *tin, in fq_tin_filter() argument
283 list_for_each_entry(flow, &tin->new_flows, flowchain) in fq_tin_filter()
285 list_for_each_entry(flow, &tin->old_flows, flowchain) in fq_tin_filter()
293 struct fq_tin *tin = flow->tin; in fq_flow_reset() local
297 free_func(fq, tin, flow, skb); in fq_flow_reset()
301 if (list_empty(&tin->new_flows) && in fq_flow_reset()
302 list_empty(&tin->old_flows)) in fq_flow_reset()
303 list_del_init(&tin->tin_list); in fq_flow_reset()
306 flow->tin = NULL; in fq_flow_reset()
312 struct fq_tin *tin, in fq_tin_reset() argument
319 head = &tin->new_flows; in fq_tin_reset()
321 head = &tin->old_flows; in fq_tin_reset()
330 WARN_ON_ONCE(!list_empty(&tin->tin_list)); in fq_tin_reset()
331 WARN_ON_ONCE(tin->backlog_bytes); in fq_tin_reset()
332 WARN_ON_ONCE(tin->backlog_packets); in fq_tin_reset()
341 static void fq_tin_init(struct fq_tin *tin) in fq_tin_init() argument
343 INIT_LIST_HEAD(&tin->new_flows); in fq_tin_init()
344 INIT_LIST_HEAD(&tin->old_flows); in fq_tin_init()
345 INIT_LIST_HEAD(&tin->tin_list); in fq_tin_init()
346 fq_flow_init(&tin->default_flow); in fq_tin_init()