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
@@ -184,7 +184,6 @@ struct hfsc_sched
|
||||
struct rb_root eligible; /* eligible tree */
|
||||
struct list_head droplist; /* active leaf class list (for
|
||||
dropping) */
|
||||
struct sk_buff_head requeue; /* requeued packet */
|
||||
struct qdisc_watchdog watchdog; /* watchdog timer */
|
||||
};
|
||||
|
||||
@@ -1432,7 +1431,6 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
|
||||
return err;
|
||||
q->eligible = RB_ROOT;
|
||||
INIT_LIST_HEAD(&q->droplist);
|
||||
skb_queue_head_init(&q->requeue);
|
||||
|
||||
q->root.cl_common.classid = sch->handle;
|
||||
q->root.refcnt = 1;
|
||||
@@ -1517,7 +1515,6 @@ hfsc_reset_qdisc(struct Qdisc *sch)
|
||||
hlist_for_each_entry(cl, n, &q->clhash.hash[i], cl_common.hnode)
|
||||
hfsc_reset_class(cl);
|
||||
}
|
||||
__skb_queue_purge(&q->requeue);
|
||||
q->eligible = RB_ROOT;
|
||||
INIT_LIST_HEAD(&q->droplist);
|
||||
qdisc_watchdog_cancel(&q->watchdog);
|
||||
@@ -1542,7 +1539,6 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
|
||||
hfsc_destroy_class(sch, cl);
|
||||
}
|
||||
qdisc_class_hash_destroy(&q->clhash);
|
||||
__skb_queue_purge(&q->requeue);
|
||||
qdisc_watchdog_cancel(&q->watchdog);
|
||||
}
|
||||
|
||||
@@ -1609,8 +1605,6 @@ hfsc_dequeue(struct Qdisc *sch)
|
||||
|
||||
if (sch->q.qlen == 0)
|
||||
return NULL;
|
||||
if ((skb = __skb_dequeue(&q->requeue)))
|
||||
goto out;
|
||||
|
||||
cur_time = psched_get_time();
|
||||
|
||||
@@ -1659,24 +1653,12 @@ hfsc_dequeue(struct Qdisc *sch)
|
||||
set_passive(cl);
|
||||
}
|
||||
|
||||
out:
|
||||
sch->flags &= ~TCQ_F_THROTTLED;
|
||||
sch->q.qlen--;
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
||||
static int
|
||||
hfsc_requeue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
{
|
||||
struct hfsc_sched *q = qdisc_priv(sch);
|
||||
|
||||
__skb_queue_head(&q->requeue, skb);
|
||||
sch->q.qlen++;
|
||||
sch->qstats.requeues++;
|
||||
return NET_XMIT_SUCCESS;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
hfsc_drop(struct Qdisc *sch)
|
||||
{
|
||||
@@ -1728,7 +1710,6 @@ static struct Qdisc_ops hfsc_qdisc_ops __read_mostly = {
|
||||
.enqueue = hfsc_enqueue,
|
||||
.dequeue = hfsc_dequeue,
|
||||
.peek = qdisc_peek_dequeued,
|
||||
.requeue = hfsc_requeue,
|
||||
.drop = hfsc_drop,
|
||||
.cl_ops = &hfsc_class_ops,
|
||||
.priv_size = sizeof(struct hfsc_sched),
|
||||
|
Reference in New Issue
Block a user