Lines Matching refs:flow
634 struct cake_flow *flow, in cake_dec_srchost_bulk_flow_count() argument
638 q->hosts[flow->srchost].srchost_bulk_flow_count)) in cake_dec_srchost_bulk_flow_count()
639 q->hosts[flow->srchost].srchost_bulk_flow_count--; in cake_dec_srchost_bulk_flow_count()
643 struct cake_flow *flow, in cake_inc_srchost_bulk_flow_count() argument
647 q->hosts[flow->srchost].srchost_bulk_flow_count < CAKE_QUEUES)) in cake_inc_srchost_bulk_flow_count()
648 q->hosts[flow->srchost].srchost_bulk_flow_count++; in cake_inc_srchost_bulk_flow_count()
652 struct cake_flow *flow, in cake_dec_dsthost_bulk_flow_count() argument
656 q->hosts[flow->dsthost].dsthost_bulk_flow_count)) in cake_dec_dsthost_bulk_flow_count()
657 q->hosts[flow->dsthost].dsthost_bulk_flow_count--; in cake_dec_dsthost_bulk_flow_count()
661 struct cake_flow *flow, in cake_inc_dsthost_bulk_flow_count() argument
665 q->hosts[flow->dsthost].dsthost_bulk_flow_count < CAKE_QUEUES)) in cake_inc_dsthost_bulk_flow_count()
666 q->hosts[flow->dsthost].dsthost_bulk_flow_count++; in cake_inc_dsthost_bulk_flow_count()
670 struct cake_flow *flow, in cake_get_flow_quantum() argument
677 q->hosts[flow->srchost].srchost_bulk_flow_count); in cake_get_flow_quantum()
681 q->hosts[flow->dsthost].dsthost_bulk_flow_count); in cake_get_flow_quantum()
899 static struct sk_buff *dequeue_head(struct cake_flow *flow) in dequeue_head() argument
901 struct sk_buff *skb = flow->head; in dequeue_head()
904 flow->head = skb->next; in dequeue_head()
913 static void flow_queue_add(struct cake_flow *flow, struct sk_buff *skb) in flow_queue_add() argument
915 if (!flow->head) in flow_queue_add()
916 flow->head = skb; in flow_queue_add()
918 flow->tail->next = skb; in flow_queue_add()
919 flow->tail = skb; in flow_queue_add()
1199 struct cake_flow *flow) in cake_ack_filter() argument
1216 if (flow->head == flow->tail) in cake_ack_filter()
1219 skb = flow->tail; in cake_ack_filter()
1239 for (skb_check = flow->head; in cake_ack_filter()
1347 flow->head = elig_ack->next; in cake_ack_filter()
1558 struct cake_flow *flow; in cake_drop() local
1575 flow = &b->flows[idx]; in cake_drop()
1576 skb = dequeue_head(flow); in cake_drop()
1583 if (cobalt_queue_full(&flow->cvars, &b->cparams, now)) in cake_drop()
1592 flow->dropped++; in cake_drop()
1709 u16 flow = 0, host = 0; in cake_classify() local
1732 flow = TC_H_MIN(res.classid); in cake_classify()
1738 return cake_hash(*t, skb, flow_mode, flow, host) + 1; in cake_classify()
1752 struct cake_flow *flow; in cake_enqueue() local
1764 flow = &b->flows[idx]; in cake_enqueue()
1805 flow_queue_add(flow, segs); in cake_enqueue()
1827 flow_queue_add(flow, skb); in cake_enqueue()
1830 ack = cake_ack_filter(q, flow); in cake_enqueue()
1903 if (!flow->set || flow->set == CAKE_SET_DECAYING) { in cake_enqueue()
1904 if (!flow->set) { in cake_enqueue()
1905 list_add_tail(&flow->flowchain, &b->new_flows); in cake_enqueue()
1908 list_move_tail(&flow->flowchain, &b->new_flows); in cake_enqueue()
1910 flow->set = CAKE_SET_SPARSE; in cake_enqueue()
1913 flow->deficit = cake_get_flow_quantum(b, flow, q->flow_mode); in cake_enqueue()
1914 } else if (flow->set == CAKE_SET_SPARSE_WAIT) { in cake_enqueue()
1918 flow->set = CAKE_SET_BULK; in cake_enqueue()
1922 cake_inc_srchost_bulk_flow_count(b, flow, q->flow_mode); in cake_enqueue()
1923 cake_inc_dsthost_bulk_flow_count(b, flow, q->flow_mode); in cake_enqueue()
1945 struct cake_flow *flow = &b->flows[q->cur_flow]; in cake_dequeue_one() local
1949 if (flow->head) { in cake_dequeue_one()
1950 skb = dequeue_head(flow); in cake_dequeue_one()
1982 struct cake_flow *flow; in cake_dequeue() local
2081 flow = list_first_entry(head, struct cake_flow, flowchain); in cake_dequeue()
2082 q->cur_flow = flow - b->flows; in cake_dequeue()
2086 if (flow->deficit <= 0) { in cake_dequeue()
2091 if (flow->set == CAKE_SET_SPARSE) { in cake_dequeue()
2092 if (flow->head) { in cake_dequeue()
2096 cake_inc_srchost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2097 cake_inc_dsthost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2099 flow->set = CAKE_SET_BULK; in cake_dequeue()
2105 flow->set = CAKE_SET_SPARSE_WAIT; in cake_dequeue()
2109 flow->deficit += cake_get_flow_quantum(b, flow, q->flow_mode); in cake_dequeue()
2110 list_move_tail(&flow->flowchain, &b->old_flows); in cake_dequeue()
2120 if (cobalt_queue_empty(&flow->cvars, &b->cparams, now)) in cake_dequeue()
2123 if (flow->cvars.p_drop || flow->cvars.count || in cake_dequeue()
2124 ktime_before(now, flow->cvars.drop_next)) { in cake_dequeue()
2128 list_move_tail(&flow->flowchain, in cake_dequeue()
2130 if (flow->set == CAKE_SET_BULK) { in cake_dequeue()
2133 cake_dec_srchost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2134 cake_dec_dsthost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2137 } else if (flow->set == CAKE_SET_SPARSE || in cake_dequeue()
2138 flow->set == CAKE_SET_SPARSE_WAIT) { in cake_dequeue()
2142 flow->set = CAKE_SET_DECAYING; in cake_dequeue()
2145 list_del_init(&flow->flowchain); in cake_dequeue()
2146 if (flow->set == CAKE_SET_SPARSE || in cake_dequeue()
2147 flow->set == CAKE_SET_SPARSE_WAIT) in cake_dequeue()
2149 else if (flow->set == CAKE_SET_BULK) { in cake_dequeue()
2152 cake_dec_srchost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2153 cake_dec_dsthost_bulk_flow_count(b, flow, q->flow_mode); in cake_dequeue()
2157 flow->set = CAKE_SET_NONE; in cake_dequeue()
2162 reason = cobalt_should_drop(&flow->cvars, &b->cparams, now, skb, in cake_dequeue()
2167 if (reason == SKB_NOT_DROPPED_YET || !flow->head) in cake_dequeue()
2174 flow->deficit -= len; in cake_dequeue()
2177 flow->dropped++; in cake_dequeue()
2186 b->tin_ecn_mark += !!flow->cvars.ecn_marked; in cake_dequeue()
2198 flow->deficit -= len; in cake_dequeue()
2768 struct cake_flow *flow = b->flows + j; in cake_init() local
2771 INIT_LIST_HEAD(&flow->flowchain); in cake_init()
2772 cobalt_vars_init(&flow->cvars); in cake_init()
3005 const struct cake_flow *flow = NULL; in cake_dump_class_stats() local
3015 flow = &b->flows[idx % CAKE_QUEUES]; in cake_dump_class_stats()
3017 if (flow->head) { in cake_dump_class_stats()
3019 skb = flow->head; in cake_dump_class_stats()
3027 qs.drops = flow->dropped; in cake_dump_class_stats()
3031 if (flow) { in cake_dump_class_stats()
3047 PUT_STAT_S32(DEFICIT, flow->deficit); in cake_dump_class_stats()
3048 PUT_STAT_U32(DROPPING, flow->cvars.dropping); in cake_dump_class_stats()
3049 PUT_STAT_U32(COBALT_COUNT, flow->cvars.count); in cake_dump_class_stats()
3050 PUT_STAT_U32(P_DROP, flow->cvars.p_drop); in cake_dump_class_stats()
3051 if (flow->cvars.p_drop) { in cake_dump_class_stats()
3055 flow->cvars.blue_timer))); in cake_dump_class_stats()
3057 if (flow->cvars.dropping) { in cake_dump_class_stats()
3061 flow->cvars.drop_next))); in cake_dump_class_stats()