pkt_sched: Remove qdisc->ops->requeue() etc.
After implementing qdisc->ops->peek() and changing sch_netem into classless qdisc there are no more qdisc->ops->requeue() users. This patch removes this method with its wrappers (qdisc_requeue()), and also unused qdisc->requeue structure. There are a few minor fixes of warnings (htb_enqueue()) and comments btw. The idea to kill ->requeue() and a similar patch were first developed by David S. Miller. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
38a7ddffa4
commit
f30ab418a1
@@ -405,40 +405,6 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
cbq_requeue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
{
|
||||
struct cbq_sched_data *q = qdisc_priv(sch);
|
||||
struct cbq_class *cl;
|
||||
int ret;
|
||||
|
||||
if ((cl = q->tx_class) == NULL) {
|
||||
kfree_skb(skb);
|
||||
sch->qstats.drops++;
|
||||
return NET_XMIT_CN;
|
||||
}
|
||||
q->tx_class = NULL;
|
||||
|
||||
cbq_mark_toplevel(q, cl);
|
||||
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
q->rx_class = cl;
|
||||
cl->q->__parent = sch;
|
||||
#endif
|
||||
if ((ret = cl->q->ops->requeue(skb, cl->q)) == 0) {
|
||||
sch->q.qlen++;
|
||||
sch->qstats.requeues++;
|
||||
if (!cl->next_alive)
|
||||
cbq_activate_class(cl);
|
||||
return 0;
|
||||
}
|
||||
if (net_xmit_drop_count(ret)) {
|
||||
sch->qstats.drops++;
|
||||
cl->qstats.drops++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Overlimit actions */
|
||||
|
||||
/* TC_CBQ_OVL_CLASSIC: (default) penalize leaf class by adding offtime */
|
||||
@@ -2067,7 +2033,6 @@ static struct Qdisc_ops cbq_qdisc_ops __read_mostly = {
|
||||
.enqueue = cbq_enqueue,
|
||||
.dequeue = cbq_dequeue,
|
||||
.peek = qdisc_peek_dequeued,
|
||||
.requeue = cbq_requeue,
|
||||
.drop = cbq_drop,
|
||||
.init = cbq_init,
|
||||
.reset = cbq_reset,
|
||||
|
Reference in New Issue
Block a user