Lines Matching defs:flow
29 * flows from each other. This prevents a burst on one flow from increasing
126 /* this stuff is all needed per-flow at dequeue time */
753 * this flow.
771 /* no queue is reserved for this flow, look for an
795 /* reserve queue for future packets in same flow */
852 static struct sk_buff *dequeue_head(struct cake_flow *flow)
854 struct sk_buff *skb = flow->head;
857 flow->head = skb->next;
864 /* add skb to flow queue (tail add) */
866 static void flow_queue_add(struct cake_flow *flow, struct sk_buff *skb)
868 if (!flow->head)
869 flow->head = skb;
871 flow->tail->next = skb;
872 flow->tail = skb;
1152 struct cake_flow *flow)
1169 if (flow->head == flow->tail)
1172 skb = flow->tail;
1188 * returned if it is the only packet in the flow. loop through the rest
1192 for (skb_check = flow->head;
1229 * packet in the same flow, we should no longer be dropping that
1300 flow->head = elig_ack->next;
1508 struct cake_flow *flow;
1525 flow = &b->flows[idx];
1526 skb = dequeue_head(flow);
1533 if (cobalt_queue_full(&flow->cvars, &b->cparams, now))
1543 flow->dropped++;
1660 u16 flow = 0, host = 0;
1683 flow = TC_H_MIN(res.classid);
1689 return cake_hash(*t, skb, flow_mode, flow, host) + 1;
1703 struct cake_flow *flow;
1706 /* choose flow to insert into */
1715 flow = &b->flows[idx];
1756 flow_queue_add(flow, segs);
1778 flow_queue_add(flow, skb);
1781 ack = cake_ack_filter(q, flow);
1854 if (!flow->set || flow->set == CAKE_SET_DECAYING) {
1855 struct cake_host *srchost = &b->hosts[flow->srchost];
1856 struct cake_host *dsthost = &b->hosts[flow->dsthost];
1859 if (!flow->set) {
1860 list_add_tail(&flow->flowchain, &b->new_flows);
1863 list_move_tail(&flow->flowchain, &b->new_flows);
1865 flow->set = CAKE_SET_SPARSE;
1874 flow->deficit = (b->flow_quantum *
1876 } else if (flow->set == CAKE_SET_SPARSE_WAIT) {
1877 struct cake_host *srchost = &b->hosts[flow->srchost];
1878 struct cake_host *dsthost = &b->hosts[flow->dsthost];
1880 /* this flow was empty, accounted as a sparse flow, but actually
1883 flow->set = CAKE_SET_BULK;
1914 struct cake_flow *flow = &b->flows[q->cur_flow];
1918 if (flow->head) {
1919 skb = dequeue_head(flow);
1951 struct cake_flow *flow;
2051 flow = list_first_entry(head, struct cake_flow, flowchain);
2052 q->cur_flow = flow - b->flows;
2056 srchost = &b->hosts[flow->srchost];
2057 dsthost = &b->hosts[flow->dsthost];
2060 /* flow isolation (DRR++) */
2061 if (flow->deficit <= 0) {
2063 * rotations. No non-empty flow can go into the decaying
2066 if (flow->set == CAKE_SET_SPARSE) {
2067 if (flow->head) {
2077 flow->set = CAKE_SET_BULK;
2081 * to count it as a sparse flow, not a bulk one.
2083 flow->set = CAKE_SET_SPARSE_WAIT;
2098 flow->deficit += (b->flow_quantum * quantum_div[host_load] +
2100 list_move_tail(&flow->flowchain, &b->old_flows);
2110 if (cobalt_queue_empty(&flow->cvars, &b->cparams, now))
2113 if (flow->cvars.p_drop || flow->cvars.count ||
2114 ktime_before(now, flow->cvars.drop_next)) {
2118 list_move_tail(&flow->flowchain,
2120 if (flow->set == CAKE_SET_BULK) {
2130 } else if (flow->set == CAKE_SET_SPARSE ||
2131 flow->set == CAKE_SET_SPARSE_WAIT) {
2135 flow->set = CAKE_SET_DECAYING;
2138 list_del_init(&flow->flowchain);
2139 if (flow->set == CAKE_SET_SPARSE ||
2140 flow->set == CAKE_SET_SPARSE_WAIT)
2142 else if (flow->set == CAKE_SET_BULK) {
2154 flow->set = CAKE_SET_NONE;
2160 if (!cobalt_should_drop(&flow->cvars, &b->cparams, now, skb,
2164 !flow->head)
2171 flow->deficit -= len;
2174 flow->dropped++;
2183 b->tin_ecn_mark += !!flow->cvars.ecn_marked;
2195 flow->deficit -= len;
2756 struct cake_flow *flow = b->flows + j;
2759 INIT_LIST_HEAD(&flow->flowchain);
2760 cobalt_vars_init(&flow->cvars);
2989 const struct cake_flow *flow = NULL;
2999 flow = &b->flows[idx % CAKE_QUEUES];
3001 if (flow->head) {
3003 skb = flow->head;
3011 qs.drops = flow->dropped;
3015 if (flow) {
3031 PUT_STAT_S32(DEFICIT, flow->deficit);
3032 PUT_STAT_U32(DROPPING, flow->cvars.dropping);
3033 PUT_STAT_U32(COBALT_COUNT, flow->cvars.count);
3034 PUT_STAT_U32(P_DROP, flow->cvars.p_drop);
3035 if (flow->cvars.p_drop) {
3039 flow->cvars.blue_timer)));
3041 if (flow->cvars.dropping) {
3045 flow->cvars.drop_next)));