• Home
  • Raw
  • Download

Lines Matching full:flow

16 			      struct fq_flow *flow,  in fq_adjust_removal()  argument
19 struct fq_tin *tin = flow->tin; in fq_adjust_removal()
23 flow->backlog -= skb->len; in fq_adjust_removal()
28 static void fq_rejigger_backlog(struct fq *fq, struct fq_flow *flow) in fq_rejigger_backlog() argument
32 if (flow->backlog == 0) { in fq_rejigger_backlog()
33 list_del_init(&flow->backlogchain); in fq_rejigger_backlog()
35 i = flow; in fq_rejigger_backlog()
38 if (i->backlog < flow->backlog) in fq_rejigger_backlog()
41 list_move_tail(&flow->backlogchain, in fq_rejigger_backlog()
47 struct fq_flow *flow) in fq_flow_dequeue() argument
53 skb = __skb_dequeue(&flow->queue); in fq_flow_dequeue()
57 fq_adjust_removal(fq, flow, skb); in fq_flow_dequeue()
58 fq_rejigger_backlog(fq, flow); in fq_flow_dequeue()
67 struct fq_flow *flow; in fq_tin_dequeue() local
81 flow = list_first_entry(head, struct fq_flow, flowchain); in fq_tin_dequeue()
83 if (flow->deficit <= 0) { in fq_tin_dequeue()
84 flow->deficit += fq->quantum; in fq_tin_dequeue()
85 list_move_tail(&flow->flowchain, in fq_tin_dequeue()
90 skb = dequeue_func(fq, tin, flow); in fq_tin_dequeue()
95 list_move_tail(&flow->flowchain, &tin->old_flows); in fq_tin_dequeue()
97 list_del_init(&flow->flowchain); in fq_tin_dequeue()
98 flow->tin = NULL; in fq_tin_dequeue()
103 flow->deficit -= skb->len; in fq_tin_dequeue()
115 struct fq_flow *flow; in fq_flow_classify() local
123 flow = &fq->flows[idx]; in fq_flow_classify()
125 if (flow->tin && flow->tin != tin) { in fq_flow_classify()
126 flow = get_default_func(fq, tin, idx, skb); in fq_flow_classify()
131 if (!flow->tin) in fq_flow_classify()
134 return flow; in fq_flow_classify()
139 struct fq_flow *flow) in fq_recalc_backlog() argument
143 if (list_empty(&flow->backlogchain)) in fq_recalc_backlog()
144 list_add_tail(&flow->backlogchain, &fq->backlogs); in fq_recalc_backlog()
146 i = flow; in fq_recalc_backlog()
149 if (i->backlog > flow->backlog) in fq_recalc_backlog()
152 list_move(&flow->backlogchain, &i->backlogchain); in fq_recalc_backlog()
161 struct fq_flow *flow; in fq_tin_enqueue() local
166 flow = fq_flow_classify(fq, tin, skb, get_default_func); in fq_tin_enqueue()
168 flow->tin = tin; in fq_tin_enqueue()
169 flow->backlog += skb->len; in fq_tin_enqueue()
175 fq_recalc_backlog(fq, tin, flow); in fq_tin_enqueue()
177 if (list_empty(&flow->flowchain)) { in fq_tin_enqueue()
178 flow->deficit = fq->quantum; in fq_tin_enqueue()
179 list_add_tail(&flow->flowchain, in fq_tin_enqueue()
183 __skb_queue_tail(&flow->queue, skb); in fq_tin_enqueue()
186 flow = list_first_entry_or_null(&fq->backlogs, in fq_tin_enqueue()
189 if (!flow) in fq_tin_enqueue()
192 skb = fq_flow_dequeue(fq, flow); in fq_tin_enqueue()
196 free_func(fq, flow->tin, flow, skb); in fq_tin_enqueue()
198 flow->tin->overlimit++; in fq_tin_enqueue()
208 struct fq_flow *flow, in fq_flow_filter() argument
213 struct fq_tin *tin = flow->tin; in fq_flow_filter()
218 skb_queue_walk_safe(&flow->queue, skb, tmp) { in fq_flow_filter()
219 if (!filter_func(fq, tin, flow, skb, filter_data)) in fq_flow_filter()
222 __skb_unlink(skb, &flow->queue); in fq_flow_filter()
223 fq_adjust_removal(fq, flow, skb); in fq_flow_filter()
224 free_func(fq, tin, flow, skb); in fq_flow_filter()
227 fq_rejigger_backlog(fq, flow); in fq_flow_filter()
236 struct fq_flow *flow; in fq_tin_filter() local
240 list_for_each_entry(flow, &tin->new_flows, flowchain) in fq_tin_filter()
241 fq_flow_filter(fq, flow, filter_func, filter_data, free_func); in fq_tin_filter()
242 list_for_each_entry(flow, &tin->old_flows, flowchain) in fq_tin_filter()
243 fq_flow_filter(fq, flow, filter_func, filter_data, free_func); in fq_tin_filter()
247 struct fq_flow *flow, in fq_flow_reset() argument
252 while ((skb = fq_flow_dequeue(fq, flow))) in fq_flow_reset()
253 free_func(fq, flow->tin, flow, skb); in fq_flow_reset()
255 if (!list_empty(&flow->flowchain)) in fq_flow_reset()
256 list_del_init(&flow->flowchain); in fq_flow_reset()
258 if (!list_empty(&flow->backlogchain)) in fq_flow_reset()
259 list_del_init(&flow->backlogchain); in fq_flow_reset()
261 flow->tin = NULL; in fq_flow_reset()
263 WARN_ON_ONCE(flow->backlog); in fq_flow_reset()
271 struct fq_flow *flow; in fq_tin_reset() local
281 flow = list_first_entry(head, struct fq_flow, flowchain); in fq_tin_reset()
282 fq_flow_reset(fq, flow, free_func); in fq_tin_reset()
289 static void fq_flow_init(struct fq_flow *flow) in fq_flow_init() argument
291 INIT_LIST_HEAD(&flow->flowchain); in fq_flow_init()
292 INIT_LIST_HEAD(&flow->backlogchain); in fq_flow_init()
293 __skb_queue_head_init(&flow->queue); in fq_flow_init()