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()
162 static int etf_enqueue_timesortedlist(struct sk_buff *nskb, struct Qdisc *sch, in etf_enqueue_timesortedlist() argument
165 struct etf_sched_data *q = qdisc_priv(sch); in etf_enqueue_timesortedlist()
170 if (!is_packet_valid(sch, nskb)) { in etf_enqueue_timesortedlist()
173 return qdisc_drop(nskb, sch, to_free); in etf_enqueue_timesortedlist()
191 qdisc_qstats_backlog_inc(sch, nskb); in etf_enqueue_timesortedlist()
192 sch->q.qlen++; in etf_enqueue_timesortedlist()
195 reset_watchdog(sch); in etf_enqueue_timesortedlist()
200 static void timesortedlist_drop(struct Qdisc *sch, struct sk_buff *skb, in timesortedlist_drop() argument
203 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_drop()
218 skb->dev = qdisc_dev(sch); in timesortedlist_drop()
222 qdisc_qstats_backlog_dec(sch, skb); in timesortedlist_drop()
223 qdisc_drop(skb, sch, &to_free); in timesortedlist_drop()
224 qdisc_qstats_overlimit(sch); in timesortedlist_drop()
225 sch->q.qlen--; in timesortedlist_drop()
231 static void timesortedlist_remove(struct Qdisc *sch, struct sk_buff *skb) in timesortedlist_remove() argument
233 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_remove()
242 skb->dev = qdisc_dev(sch); in timesortedlist_remove()
244 qdisc_qstats_backlog_dec(sch, skb); in timesortedlist_remove()
246 qdisc_bstats_update(sch, skb); in timesortedlist_remove()
250 sch->q.qlen--; in timesortedlist_remove()
253 static struct sk_buff *etf_dequeue_timesortedlist(struct Qdisc *sch) in etf_dequeue_timesortedlist() argument
255 struct etf_sched_data *q = qdisc_priv(sch); in etf_dequeue_timesortedlist()
259 skb = etf_peek_timesortedlist(sch); in etf_dequeue_timesortedlist()
267 timesortedlist_drop(sch, skb, now); in etf_dequeue_timesortedlist()
276 timesortedlist_remove(sch, skb); in etf_dequeue_timesortedlist()
285 timesortedlist_remove(sch, skb); in etf_dequeue_timesortedlist()
291 reset_watchdog(sch); in etf_dequeue_timesortedlist()
346 static int etf_init(struct Qdisc *sch, struct nlattr *opt, in etf_init() argument
349 struct etf_sched_data *q = qdisc_priv(sch); in etf_init()
350 struct net_device *dev = qdisc_dev(sch); in etf_init()
382 q->queue = sch->dev_queue - netdev_get_tx_queue(dev, 0); in etf_init()
415 qdisc_watchdog_init_clockid(&q->watchdog, sch, q->clockid); in etf_init()
420 static void timesortedlist_clear(struct Qdisc *sch) in timesortedlist_clear() argument
422 struct etf_sched_data *q = qdisc_priv(sch); in timesortedlist_clear()
432 sch->q.qlen--; in timesortedlist_clear()
436 static void etf_reset(struct Qdisc *sch) in etf_reset() argument
438 struct etf_sched_data *q = qdisc_priv(sch); in etf_reset()
441 if (q->watchdog.qdisc == sch) in etf_reset()
445 timesortedlist_clear(sch); in etf_reset()
446 __qdisc_reset_queue(&sch->q); in etf_reset()
448 sch->qstats.backlog = 0; in etf_reset()
449 sch->q.qlen = 0; in etf_reset()
454 static void etf_destroy(struct Qdisc *sch) in etf_destroy() argument
456 struct etf_sched_data *q = qdisc_priv(sch); in etf_destroy()
457 struct net_device *dev = qdisc_dev(sch); in etf_destroy()
460 if (q->watchdog.qdisc == sch) in etf_destroy()
466 static int etf_dump(struct Qdisc *sch, struct sk_buff *skb) in etf_dump() argument
468 struct etf_sched_data *q = qdisc_priv(sch); in etf_dump()