Lines Matching refs:flow
184 struct hh_flow_state *flow, *next; in seek_list() local
190 list_for_each_entry_safe(flow, next, head, flowchain) { in seek_list()
191 u32 prev = flow->hit_timestamp + q->hhf_evict_timeout; in seek_list()
197 if (list_is_last(&flow->flowchain, head)) in seek_list()
199 list_del(&flow->flowchain); in seek_list()
200 kfree(flow); in seek_list()
202 } else if (flow->hash_id == hash) { in seek_list()
203 return flow; in seek_list()
215 struct hh_flow_state *flow; in alloc_new_hh() local
220 list_for_each_entry(flow, head, flowchain) { in alloc_new_hh()
221 u32 prev = flow->hit_timestamp + q->hhf_evict_timeout; in alloc_new_hh()
224 return flow; in alloc_new_hh()
233 flow = kzalloc(sizeof(struct hh_flow_state), GFP_ATOMIC); in alloc_new_hh()
234 if (!flow) in alloc_new_hh()
238 INIT_LIST_HEAD(&flow->flowchain); in alloc_new_hh()
239 list_add_tail(&flow->flowchain, head); in alloc_new_hh()
241 return flow; in alloc_new_hh()
252 struct hh_flow_state *flow; in hhf_classify() local
271 flow = seek_list(hash, &q->hh_flows[flow_pos], q); in hhf_classify()
272 if (flow) { /* found its HH flow */ in hhf_classify()
273 flow->hit_timestamp = now; in hhf_classify()
307 flow = alloc_new_hh(&q->hh_flows[flow_pos], q); in hhf_classify()
308 if (!flow) /* memory alloc problem */ in hhf_classify()
310 flow->hash_id = hash; in hhf_classify()
311 flow->hit_timestamp = now; in hhf_classify()
485 struct hh_flow_state *flow, *next; in hhf_destroy() local
490 list_for_each_entry_safe(flow, next, head, flowchain) { in hhf_destroy()
491 list_del(&flow->flowchain); in hhf_destroy()
492 kfree(flow); in hhf_destroy()