Lines Matching refs:flow

20  * buckets. Initially, a new flow starts as non-heavy-hitter. Once classified
37 * - For a heavy-hitter flow: *all* of its k array counters must be large.
38 * - For a non-heavy-hitter flow: some of its k array counters can be large
59 * Once a flow is classified as heavy-hitter, we also save its per-flow state
60 * in an exact-matching flow table so that its subsequent packets can be
66 * - If the flow-id of p (e.g., TCP 5-tuple) is already in the exact-matching
67 * heavy-hitter flow table, denoted table T, then send p to the heavy-hitter
70 * + If F decides that p belongs to a non-heavy-hitter flow, then send p
72 * + Otherwise, if F decides that p belongs to a new heavy-hitter flow,
73 * then set up a new flow entry for the flow-id of p in the table T and
112 /* Heavy-hitter per-flow state */
114 u32 hash_id; /* hash of flow-id (e.g. TCP 5-tuple) */
195 /* Looks up a heavy-hitter flow in a chaining list of table T. */
200 struct hh_flow_state *flow, *next;
206 list_for_each_entry_safe(flow, next, head, flowchain) {
207 u32 prev = flow->hit_timestamp + q->hhf_evict_timeout;
213 if (list_is_last(&flow->flowchain, head))
215 list_del(&flow->flowchain);
216 kfree(flow);
218 } else if (flow->hash_id == hash) {
219 return flow;
225 /* Returns a flow state entry for a new heavy-hitter. Either reuses an expired
231 struct hh_flow_state *flow;
235 /* Find an expired heavy-hitter flow entry. */
236 list_for_each_entry(flow, head, flowchain) {
237 u32 prev = flow->hit_timestamp + q->hhf_evict_timeout;
240 return flow;
249 flow = kzalloc(sizeof(struct hh_flow_state), GFP_ATOMIC);
250 if (!flow)
254 INIT_LIST_HEAD(&flow->flowchain);
255 list_add_tail(&flow->flowchain, head);
257 return flow;
268 struct hh_flow_state *flow;
282 /* Get hashed flow-id of the skb. */
285 /* Check if this packet belongs to an already established HH flow. */
287 flow = seek_list(hash, &q->hh_flows[flow_pos], q);
288 if (flow) { /* found its HH flow */
289 flow->hit_timestamp = now;
323 flow = alloc_new_hh(&q->hh_flows[flow_pos], q);
324 if (!flow) /* memory alloc problem */
326 flow->hash_id = hash;
327 flow->hit_timestamp = now;
511 struct hh_flow_state *flow, *next;
516 list_for_each_entry_safe(flow, next, head, flowchain) {
517 list_del(&flow->flowchain);
518 kfree(flow);
624 /* Initialize heavy-hitter flow table. */