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
@@ -92,40 +92,6 @@ multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
multiq_requeue(struct sk_buff *skb, struct Qdisc *sch)
|
||||
{
|
||||
struct Qdisc *qdisc;
|
||||
struct multiq_sched_data *q = qdisc_priv(sch);
|
||||
int ret;
|
||||
|
||||
qdisc = multiq_classify(skb, sch, &ret);
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
if (qdisc == NULL) {
|
||||
if (ret & __NET_XMIT_BYPASS)
|
||||
sch->qstats.drops++;
|
||||
kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = qdisc->ops->requeue(skb, qdisc);
|
||||
if (ret == NET_XMIT_SUCCESS) {
|
||||
sch->q.qlen++;
|
||||
sch->qstats.requeues++;
|
||||
if (q->curband)
|
||||
q->curband--;
|
||||
else
|
||||
q->curband = q->bands - 1;
|
||||
return NET_XMIT_SUCCESS;
|
||||
}
|
||||
if (net_xmit_drop_count(ret))
|
||||
sch->qstats.drops++;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static struct sk_buff *multiq_dequeue(struct Qdisc *sch)
|
||||
{
|
||||
struct multiq_sched_data *q = qdisc_priv(sch);
|
||||
@@ -140,7 +106,7 @@ static struct sk_buff *multiq_dequeue(struct Qdisc *sch)
|
||||
q->curband = 0;
|
||||
|
||||
/* Check that target subqueue is available before
|
||||
* pulling an skb to avoid excessive requeues
|
||||
* pulling an skb to avoid head-of-line blocking.
|
||||
*/
|
||||
if (!__netif_subqueue_stopped(qdisc_dev(sch), q->curband)) {
|
||||
qdisc = q->queues[q->curband];
|
||||
@@ -170,7 +136,7 @@ static struct sk_buff *multiq_peek(struct Qdisc *sch)
|
||||
curband = 0;
|
||||
|
||||
/* Check that target subqueue is available before
|
||||
* pulling an skb to avoid excessive requeues
|
||||
* pulling an skb to avoid head-of-line blocking.
|
||||
*/
|
||||
if (!__netif_subqueue_stopped(qdisc_dev(sch), curband)) {
|
||||
qdisc = q->queues[curband];
|
||||
@@ -480,7 +446,6 @@ static struct Qdisc_ops multiq_qdisc_ops __read_mostly = {
|
||||
.enqueue = multiq_enqueue,
|
||||
.dequeue = multiq_dequeue,
|
||||
.peek = multiq_peek,
|
||||
.requeue = multiq_requeue,
|
||||
.drop = multiq_drop,
|
||||
.init = multiq_init,
|
||||
.reset = multiq_reset,
|
||||
|
Reference in New Issue
Block a user