Lines Matching refs:flow
809 static struct sk_buff *dequeue_head(struct cake_flow *flow) in dequeue_head() argument
811 struct sk_buff *skb = flow->head; in dequeue_head()
814 flow->head = skb->next; in dequeue_head()
823 static void flow_queue_add(struct cake_flow *flow, struct sk_buff *skb) in flow_queue_add() argument
825 if (!flow->head) in flow_queue_add()
826 flow->head = skb; in flow_queue_add()
828 flow->tail->next = skb; in flow_queue_add()
829 flow->tail = skb; in flow_queue_add()
1105 struct cake_flow *flow) in cake_ack_filter() argument
1122 if (flow->head == flow->tail) in cake_ack_filter()
1125 skb = flow->tail; in cake_ack_filter()
1145 for (skb_check = flow->head; in cake_ack_filter()
1253 flow->head = elig_ack->next; in cake_ack_filter()
1461 struct cake_flow *flow; in cake_drop() local
1478 flow = &b->flows[idx]; in cake_drop()
1479 skb = dequeue_head(flow); in cake_drop()
1486 if (cobalt_queue_full(&flow->cvars, &b->cparams, now)) in cake_drop()
1496 flow->dropped++; in cake_drop()
1586 u16 flow = 0, host = 0; in cake_classify() local
1609 flow = TC_H_MIN(res.classid); in cake_classify()
1615 return cake_hash(*t, skb, flow_mode, flow, host) + 1; in cake_classify()
1629 struct cake_flow *flow; in cake_enqueue() local
1641 flow = &b->flows[idx]; in cake_enqueue()
1683 flow_queue_add(flow, segs); in cake_enqueue()
1705 flow_queue_add(flow, skb); in cake_enqueue()
1708 ack = cake_ack_filter(q, flow); in cake_enqueue()
1781 if (!flow->set || flow->set == CAKE_SET_DECAYING) { in cake_enqueue()
1782 struct cake_host *srchost = &b->hosts[flow->srchost]; in cake_enqueue()
1783 struct cake_host *dsthost = &b->hosts[flow->dsthost]; in cake_enqueue()
1786 if (!flow->set) { in cake_enqueue()
1787 list_add_tail(&flow->flowchain, &b->new_flows); in cake_enqueue()
1790 list_move_tail(&flow->flowchain, &b->new_flows); in cake_enqueue()
1792 flow->set = CAKE_SET_SPARSE; in cake_enqueue()
1801 flow->deficit = (b->flow_quantum * in cake_enqueue()
1803 } else if (flow->set == CAKE_SET_SPARSE_WAIT) { in cake_enqueue()
1807 flow->set = CAKE_SET_BULK; in cake_enqueue()
1831 struct cake_flow *flow = &b->flows[q->cur_flow]; in cake_dequeue_one() local
1835 if (flow->head) { in cake_dequeue_one()
1836 skb = dequeue_head(flow); in cake_dequeue_one()
1868 struct cake_flow *flow; in cake_dequeue() local
1968 flow = list_first_entry(head, struct cake_flow, flowchain); in cake_dequeue()
1969 q->cur_flow = flow - b->flows; in cake_dequeue()
1973 srchost = &b->hosts[flow->srchost]; in cake_dequeue()
1974 dsthost = &b->hosts[flow->dsthost]; in cake_dequeue()
1986 if (flow->deficit <= 0) { in cake_dequeue()
1990 flow->deficit += (b->flow_quantum * quantum_div[host_load] + in cake_dequeue()
1992 list_move_tail(&flow->flowchain, &b->old_flows); in cake_dequeue()
1998 if (flow->set == CAKE_SET_SPARSE) { in cake_dequeue()
1999 if (flow->head) { in cake_dequeue()
2002 flow->set = CAKE_SET_BULK; in cake_dequeue()
2008 flow->set = CAKE_SET_SPARSE_WAIT; in cake_dequeue()
2019 if (cobalt_queue_empty(&flow->cvars, &b->cparams, now)) in cake_dequeue()
2022 if (flow->cvars.p_drop || flow->cvars.count || in cake_dequeue()
2023 ktime_before(now, flow->cvars.drop_next)) { in cake_dequeue()
2027 list_move_tail(&flow->flowchain, in cake_dequeue()
2029 if (flow->set == CAKE_SET_BULK) { in cake_dequeue()
2032 } else if (flow->set == CAKE_SET_SPARSE || in cake_dequeue()
2033 flow->set == CAKE_SET_SPARSE_WAIT) { in cake_dequeue()
2037 flow->set = CAKE_SET_DECAYING; in cake_dequeue()
2040 list_del_init(&flow->flowchain); in cake_dequeue()
2041 if (flow->set == CAKE_SET_SPARSE || in cake_dequeue()
2042 flow->set == CAKE_SET_SPARSE_WAIT) in cake_dequeue()
2044 else if (flow->set == CAKE_SET_BULK) in cake_dequeue()
2049 flow->set = CAKE_SET_NONE; in cake_dequeue()
2057 if (!cobalt_should_drop(&flow->cvars, &b->cparams, now, skb, in cake_dequeue()
2061 !flow->head) in cake_dequeue()
2068 flow->deficit -= len; in cake_dequeue()
2071 flow->dropped++; in cake_dequeue()
2080 b->tin_ecn_mark += !!flow->cvars.ecn_marked; in cake_dequeue()
2092 flow->deficit -= len; in cake_dequeue()
2663 struct cake_flow *flow = b->flows + j; in cake_init() local
2666 INIT_LIST_HEAD(&flow->flowchain); in cake_init()
2667 cobalt_vars_init(&flow->cvars); in cake_init()
2897 const struct cake_flow *flow = NULL; in cake_dump_class_stats() local
2907 flow = &b->flows[idx % CAKE_QUEUES]; in cake_dump_class_stats()
2909 if (flow->head) { in cake_dump_class_stats()
2911 skb = flow->head; in cake_dump_class_stats()
2919 qs.drops = flow->dropped; in cake_dump_class_stats()
2923 if (flow) { in cake_dump_class_stats()
2939 PUT_STAT_S32(DEFICIT, flow->deficit); in cake_dump_class_stats()
2940 PUT_STAT_U32(DROPPING, flow->cvars.dropping); in cake_dump_class_stats()
2941 PUT_STAT_U32(COBALT_COUNT, flow->cvars.count); in cake_dump_class_stats()
2942 PUT_STAT_U32(P_DROP, flow->cvars.p_drop); in cake_dump_class_stats()
2943 if (flow->cvars.p_drop) { in cake_dump_class_stats()
2947 flow->cvars.blue_timer))); in cake_dump_class_stats()
2949 if (flow->cvars.dropping) { in cake_dump_class_stats()
2953 flow->cvars.drop_next))); in cake_dump_class_stats()