Lines Matching refs:sch

75 static bool is_packet_valid(struct Qdisc *sch, struct sk_buff *nskb)  in is_packet_valid()  argument
77 struct etf_sched_data *q = qdisc_priv(sch); in is_packet_valid()
108 static struct sk_buff *etf_peek_timesortedlist(struct Qdisc *sch) in etf_peek_timesortedlist() argument
110 struct etf_sched_data *q = qdisc_priv(sch); in etf_peek_timesortedlist()
120 static void reset_watchdog(struct Qdisc *sch) in reset_watchdog() argument
122 struct etf_sched_data *q = qdisc_priv(sch); in reset_watchdog()
123 struct sk_buff *skb = etf_peek_timesortedlist(sch); in reset_watchdog()
161 static int etf_enqueue_timesortedlist(struct sk_buff *nskb, struct Qdisc *sch, in etf_enqueue_timesortedlist() argument
164 struct etf_sched_data *q = qdisc_priv(sch); in etf_enqueue_timesortedlist()
169 if (!is_packet_valid(sch, nskb)) { in etf_enqueue_timesortedlist()
172 return qdisc_drop(nskb, sch, to_free); in etf_enqueue_timesortedlist()
190 qdisc_qstats_backlog_inc(sch, nskb); in etf_enqueue_timesortedlist()
191 sch->q.qlen++; in etf_enqueue_timesortedlist()
194 reset_watchdog(sch); in etf_enqueue_timesortedlist()
199 static void timesortedlist_drop(struct Qdisc *sch, struct sk_buff *skb, in timesortedlist_drop() argument
202 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_drop()
217 skb->dev = qdisc_dev(sch); in timesortedlist_drop()
221 qdisc_qstats_backlog_dec(sch, skb); in timesortedlist_drop()
222 qdisc_drop(skb, sch, &to_free); in timesortedlist_drop()
223 qdisc_qstats_overlimit(sch); in timesortedlist_drop()
224 sch->q.qlen--; in timesortedlist_drop()
230 static void timesortedlist_remove(struct Qdisc *sch, struct sk_buff *skb) in timesortedlist_remove() argument
232 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_remove()
241 skb->dev = qdisc_dev(sch); in timesortedlist_remove()
243 qdisc_qstats_backlog_dec(sch, skb); in timesortedlist_remove()
245 qdisc_bstats_update(sch, skb); in timesortedlist_remove()
249 sch->q.qlen--; in timesortedlist_remove()
252 static struct sk_buff *etf_dequeue_timesortedlist(struct Qdisc *sch) in etf_dequeue_timesortedlist() argument
254 struct etf_sched_data *q = qdisc_priv(sch); in etf_dequeue_timesortedlist()
258 skb = etf_peek_timesortedlist(sch); in etf_dequeue_timesortedlist()
266 timesortedlist_drop(sch, skb, now); in etf_dequeue_timesortedlist()
275 timesortedlist_remove(sch, skb); in etf_dequeue_timesortedlist()
284 timesortedlist_remove(sch, skb); in etf_dequeue_timesortedlist()
290 reset_watchdog(sch); in etf_dequeue_timesortedlist()
345 static int etf_init(struct Qdisc *sch, struct nlattr *opt, in etf_init() argument
348 struct etf_sched_data *q = qdisc_priv(sch); in etf_init()
349 struct net_device *dev = qdisc_dev(sch); in etf_init()
381 q->queue = sch->dev_queue - netdev_get_tx_queue(dev, 0); in etf_init()
414 qdisc_watchdog_init_clockid(&q->watchdog, sch, q->clockid); in etf_init()
419 static void timesortedlist_clear(struct Qdisc *sch) in timesortedlist_clear() argument
421 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_clear()
431 sch->q.qlen--; in timesortedlist_clear()
435 static void etf_reset(struct Qdisc *sch) in etf_reset() argument
437 struct etf_sched_data *q = qdisc_priv(sch); in etf_reset()
440 if (q->watchdog.qdisc == sch) in etf_reset()
444 timesortedlist_clear(sch); in etf_reset()
445 __qdisc_reset_queue(&sch->q); in etf_reset()
447 sch->qstats.backlog = 0; in etf_reset()
448 sch->q.qlen = 0; in etf_reset()
453 static void etf_destroy(struct Qdisc *sch) in etf_destroy() argument
455 struct etf_sched_data *q = qdisc_priv(sch); in etf_destroy()
456 struct net_device *dev = qdisc_dev(sch); in etf_destroy()
459 if (q->watchdog.qdisc == sch) in etf_destroy()
465 static int etf_dump(struct Qdisc *sch, struct sk_buff *skb) in etf_dump() argument
467 struct etf_sched_data *q = qdisc_priv(sch); in etf_dump()