Lines Matching defs:flow

29  *   flows from each other.  This prevents a burst on one flow from increasing
127 /* this stuff is all needed per-flow at dequeue time */
754 * this flow.
772 /* no queue is reserved for this flow, look for an
796 /* reserve queue for future packets in same flow */
853 static struct sk_buff *dequeue_head(struct cake_flow *flow)
855 struct sk_buff *skb = flow->head;
858 flow->head = skb->next;
865 /* add skb to flow queue (tail add) */
867 static void flow_queue_add(struct cake_flow *flow, struct sk_buff *skb)
869 if (!flow->head)
870 flow->head = skb;
872 flow->tail->next = skb;
873 flow->tail = skb;
1153 struct cake_flow *flow)
1170 if (flow->head == flow->tail)
1173 skb = flow->tail;
1189 * returned if it is the only packet in the flow. loop through the rest
1193 for (skb_check = flow->head;
1230 * packet in the same flow, we should no longer be dropping that
1301 flow->head = elig_ack->next;
1509 struct cake_flow *flow;
1526 flow = &b->flows[idx];
1527 skb = dequeue_head(flow);
1534 if (cobalt_queue_full(&flow->cvars, &b->cparams, now))
1544 flow->dropped++;
1661 u16 flow = 0, host = 0;
1684 flow = TC_H_MIN(res.classid);
1690 return cake_hash(*t, skb, flow_mode, flow, host) + 1;
1704 struct cake_flow *flow;
1707 /* choose flow to insert into */
1716 flow = &b->flows[idx];
1757 flow_queue_add(flow, segs);
1779 flow_queue_add(flow, skb);
1782 ack = cake_ack_filter(q, flow);
1855 if (!flow->set || flow->set == CAKE_SET_DECAYING) {
1856 struct cake_host *srchost = &b->hosts[flow->srchost];
1857 struct cake_host *dsthost = &b->hosts[flow->dsthost];
1860 if (!flow->set) {
1861 list_add_tail(&flow->flowchain, &b->new_flows);
1864 list_move_tail(&flow->flowchain, &b->new_flows);
1866 flow->set = CAKE_SET_SPARSE;
1875 flow->deficit = (b->flow_quantum *
1877 } else if (flow->set == CAKE_SET_SPARSE_WAIT) {
1878 struct cake_host *srchost = &b->hosts[flow->srchost];
1879 struct cake_host *dsthost = &b->hosts[flow->dsthost];
1881 /* this flow was empty, accounted as a sparse flow, but actually
1884 flow->set = CAKE_SET_BULK;
1915 struct cake_flow *flow = &b->flows[q->cur_flow];
1919 if (flow->head) {
1920 skb = dequeue_head(flow);
1952 struct cake_flow *flow;
2052 flow = list_first_entry(head, struct cake_flow, flowchain);
2053 q->cur_flow = flow - b->flows;
2057 srchost = &b->hosts[flow->srchost];
2058 dsthost = &b->hosts[flow->dsthost];
2061 /* flow isolation (DRR++) */
2062 if (flow->deficit <= 0) {
2064 * rotations. No non-empty flow can go into the decaying
2067 if (flow->set == CAKE_SET_SPARSE) {
2068 if (flow->head) {
2078 flow->set = CAKE_SET_BULK;
2082 * to count it as a sparse flow, not a bulk one.
2084 flow->set = CAKE_SET_SPARSE_WAIT;
2099 flow->deficit += (b->flow_quantum * quantum_div[host_load] +
2101 list_move_tail(&flow->flowchain, &b->old_flows);
2111 if (cobalt_queue_empty(&flow->cvars, &b->cparams, now))
2114 if (flow->cvars.p_drop || flow->cvars.count ||
2115 ktime_before(now, flow->cvars.drop_next)) {
2119 list_move_tail(&flow->flowchain,
2121 if (flow->set == CAKE_SET_BULK) {
2131 } else if (flow->set == CAKE_SET_SPARSE ||
2132 flow->set == CAKE_SET_SPARSE_WAIT) {
2136 flow->set = CAKE_SET_DECAYING;
2139 list_del_init(&flow->flowchain);
2140 if (flow->set == CAKE_SET_SPARSE ||
2141 flow->set == CAKE_SET_SPARSE_WAIT)
2143 else if (flow->set == CAKE_SET_BULK) {
2155 flow->set = CAKE_SET_NONE;
2161 if (!cobalt_should_drop(&flow->cvars, &b->cparams, now, skb,
2165 !flow->head)
2172 flow->deficit -= len;
2175 flow->dropped++;
2184 b->tin_ecn_mark += !!flow->cvars.ecn_marked;
2196 flow->deficit -= len;
2766 struct cake_flow *flow = b->flows + j;
2769 INIT_LIST_HEAD(&flow->flowchain);
2770 cobalt_vars_init(&flow->cvars);
3003 const struct cake_flow *flow = NULL;
3013 flow = &b->flows[idx % CAKE_QUEUES];
3015 if (flow->head) {
3017 skb = flow->head;
3025 qs.drops = flow->dropped;
3029 if (flow) {
3045 PUT_STAT_S32(DEFICIT, flow->deficit);
3046 PUT_STAT_U32(DROPPING, flow->cvars.dropping);
3047 PUT_STAT_U32(COBALT_COUNT, flow->cvars.count);
3048 PUT_STAT_U32(P_DROP, flow->cvars.p_drop);
3049 if (flow->cvars.p_drop) {
3053 flow->cvars.blue_timer)));
3055 if (flow->cvars.dropping) {
3059 flow->cvars.drop_next)));