Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121854
b: refs/heads/master
c: f30ab41
h: refs/heads/master
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Nov 14, 2008
1 parent 980bf46 commit 0280300
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 395 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 38a7ddffa4b79d7b1fbc9bf2fa82b21b72622858
refs/heads/master: f30ab418a1d3c5a8b83493e7d70d6876a74aa0ce
17 changes: 0 additions & 17 deletions trunk/include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ struct Qdisc
atomic_t refcnt;
unsigned long state;
struct sk_buff *gso_skb;
struct sk_buff_head requeue;
struct sk_buff_head q;
struct netdev_queue *dev_queue;
struct Qdisc *next_sched;
Expand Down Expand Up @@ -112,7 +111,6 @@ struct Qdisc_ops
int (*enqueue)(struct sk_buff *, struct Qdisc *);
struct sk_buff * (*dequeue)(struct Qdisc *);
struct sk_buff * (*peek)(struct Qdisc *);
int (*requeue)(struct sk_buff *, struct Qdisc *);
unsigned int (*drop)(struct Qdisc *);

int (*init)(struct Qdisc *, struct nlattr *arg);
Expand Down Expand Up @@ -467,21 +465,6 @@ static inline struct sk_buff *qdisc_dequeue_peeked(struct Qdisc *sch)
return skb;
}

static inline int __qdisc_requeue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff_head *list)
{
__skb_queue_head(list, skb);
sch->qstats.backlog += qdisc_pkt_len(skb);
sch->qstats.requeues++;

return NET_XMIT_SUCCESS;
}

static inline int qdisc_requeue(struct sk_buff *skb, struct Qdisc *sch)
{
return __qdisc_requeue(skb, sch, &sch->q);
}

static inline void __qdisc_reset_queue(struct Qdisc *sch,
struct sk_buff_head *list)
{
Expand Down
7 changes: 0 additions & 7 deletions trunk/net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n,
Auxiliary routines:
---requeue
requeues once dequeued packet. It is used for non-standard or
just buggy devices, which can defer output even if netif_queue_stopped()=0.
---peek
like dequeue but without removing a packet from the queue
Expand Down Expand Up @@ -151,8 +146,6 @@ int register_qdisc(struct Qdisc_ops *qops)

if (qops->enqueue == NULL)
qops->enqueue = noop_qdisc_ops.enqueue;
if (qops->requeue == NULL)
qops->requeue = noop_qdisc_ops.requeue;
if (qops->peek == NULL) {
if (qops->dequeue == NULL) {
qops->peek = noop_qdisc_ops.peek;
Expand Down
20 changes: 1 addition & 19 deletions trunk/net/sched/sch_atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct atm_qdisc_data {
struct atm_flow_data link; /* unclassified skbs go here */
struct atm_flow_data *flows; /* NB: "link" is also on this
list */
struct tasklet_struct task; /* requeue tasklet */
struct tasklet_struct task; /* dequeue tasklet */
};

/* ------------------------- Class/flow operations ------------------------- */
Expand Down Expand Up @@ -534,23 +534,6 @@ static struct sk_buff *atm_tc_peek(struct Qdisc *sch)
return p->link.q->ops->peek(p->link.q);
}

static int atm_tc_requeue(struct sk_buff *skb, struct Qdisc *sch)
{
struct atm_qdisc_data *p = qdisc_priv(sch);
int ret;

pr_debug("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
ret = p->link.q->ops->requeue(skb, p->link.q);
if (!ret) {
sch->q.qlen++;
sch->qstats.requeues++;
} else if (net_xmit_drop_count(ret)) {
sch->qstats.drops++;
p->link.qstats.drops++;
}
return ret;
}

static unsigned int atm_tc_drop(struct Qdisc *sch)
{
struct atm_qdisc_data *p = qdisc_priv(sch);
Expand Down Expand Up @@ -707,7 +690,6 @@ static struct Qdisc_ops atm_qdisc_ops __read_mostly = {
.enqueue = atm_tc_enqueue,
.dequeue = atm_tc_dequeue,
.peek = atm_tc_peek,
.requeue = atm_tc_requeue,
.drop = atm_tc_drop,
.init = atm_tc_init,
.reset = atm_tc_reset,
Expand Down
35 changes: 0 additions & 35 deletions trunk/net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand Down
21 changes: 0 additions & 21 deletions trunk/net/sched/sch_dsmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,26 +322,6 @@ static struct sk_buff *dsmark_peek(struct Qdisc *sch)
return p->q->ops->peek(p->q);
}

static int dsmark_requeue(struct sk_buff *skb, struct Qdisc *sch)
{
struct dsmark_qdisc_data *p = qdisc_priv(sch);
int err;

pr_debug("dsmark_requeue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);

err = p->q->ops->requeue(skb, p->q);
if (err != NET_XMIT_SUCCESS) {
if (net_xmit_drop_count(err))
sch->qstats.drops++;
return err;
}

sch->q.qlen++;
sch->qstats.requeues++;

return NET_XMIT_SUCCESS;
}

static unsigned int dsmark_drop(struct Qdisc *sch)
{
struct dsmark_qdisc_data *p = qdisc_priv(sch);
Expand Down Expand Up @@ -506,7 +486,6 @@ static struct Qdisc_ops dsmark_qdisc_ops __read_mostly = {
.enqueue = dsmark_enqueue,
.dequeue = dsmark_dequeue,
.peek = dsmark_peek,
.requeue = dsmark_requeue,
.drop = dsmark_drop,
.init = dsmark_init,
.reset = dsmark_reset,
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/sched/sch_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ struct Qdisc_ops pfifo_qdisc_ops __read_mostly = {
.enqueue = pfifo_enqueue,
.dequeue = qdisc_dequeue_head,
.peek = qdisc_peek_head,
.requeue = qdisc_requeue,
.drop = qdisc_queue_drop,
.init = fifo_init,
.reset = qdisc_reset_queue,
Expand All @@ -100,7 +99,6 @@ struct Qdisc_ops bfifo_qdisc_ops __read_mostly = {
.enqueue = bfifo_enqueue,
.dequeue = qdisc_dequeue_head,
.peek = qdisc_peek_head,
.requeue = qdisc_requeue,
.drop = qdisc_queue_drop,
.init = fifo_init,
.reset = qdisc_reset_queue,
Expand Down
23 changes: 0 additions & 23 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,22 +306,12 @@ static struct sk_buff *noop_dequeue(struct Qdisc * qdisc)
return NULL;
}

static int noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
{
if (net_ratelimit())
printk(KERN_DEBUG "%s deferred output. It is buggy.\n",
skb->dev->name);
kfree_skb(skb);
return NET_XMIT_CN;
}

struct Qdisc_ops noop_qdisc_ops __read_mostly = {
.id = "noop",
.priv_size = 0,
.enqueue = noop_enqueue,
.dequeue = noop_dequeue,
.peek = noop_dequeue,
.requeue = noop_requeue,
.owner = THIS_MODULE,
};

Expand All @@ -336,7 +326,6 @@ struct Qdisc noop_qdisc = {
.flags = TCQ_F_BUILTIN,
.ops = &noop_qdisc_ops,
.list = LIST_HEAD_INIT(noop_qdisc.list),
.requeue.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock),
.q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock),
.dev_queue = &noop_netdev_queue,
};
Expand All @@ -348,7 +337,6 @@ static struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {
.enqueue = noop_enqueue,
.dequeue = noop_dequeue,
.peek = noop_dequeue,
.requeue = noop_requeue,
.owner = THIS_MODULE,
};

Expand All @@ -364,7 +352,6 @@ static struct Qdisc noqueue_qdisc = {
.flags = TCQ_F_BUILTIN,
.ops = &noqueue_qdisc_ops,
.list = LIST_HEAD_INIT(noqueue_qdisc.list),
.requeue.lock = __SPIN_LOCK_UNLOCKED(noqueue_qdisc.q.lock),
.q.lock = __SPIN_LOCK_UNLOCKED(noqueue_qdisc.q.lock),
.dev_queue = &noqueue_netdev_queue,
};
Expand Down Expand Up @@ -426,12 +413,6 @@ static struct sk_buff *pfifo_fast_peek(struct Qdisc* qdisc)
return NULL;
}

static int pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
{
qdisc->q.qlen++;
return __qdisc_requeue(skb, qdisc, prio2list(skb, qdisc));
}

static void pfifo_fast_reset(struct Qdisc* qdisc)
{
int prio;
Expand Down Expand Up @@ -473,7 +454,6 @@ static struct Qdisc_ops pfifo_fast_ops __read_mostly = {
.enqueue = pfifo_fast_enqueue,
.dequeue = pfifo_fast_dequeue,
.peek = pfifo_fast_peek,
.requeue = pfifo_fast_requeue,
.init = pfifo_fast_init,
.reset = pfifo_fast_reset,
.dump = pfifo_fast_dump,
Expand All @@ -499,7 +479,6 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
sch->padded = (char *) sch - (char *) p;

INIT_LIST_HEAD(&sch->list);
skb_queue_head_init(&sch->requeue);
skb_queue_head_init(&sch->q);
sch->ops = ops;
sch->enqueue = ops->enqueue;
Expand Down Expand Up @@ -571,8 +550,6 @@ void qdisc_destroy(struct Qdisc *qdisc)
dev_put(qdisc_dev(qdisc));

kfree_skb(qdisc->gso_skb);
__skb_queue_purge(&qdisc->requeue);

kfree((char *) qdisc - qdisc->padded);
}
EXPORT_SYMBOL(qdisc_destroy);
Expand Down
21 changes: 0 additions & 21 deletions trunk/net/sched/sch_gred.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,26 +240,6 @@ static int gred_enqueue(struct sk_buff *skb, struct Qdisc* sch)
return NET_XMIT_CN;
}

static int gred_requeue(struct sk_buff *skb, struct Qdisc* sch)
{
struct gred_sched *t = qdisc_priv(sch);
struct gred_sched_data *q;
u16 dp = tc_index_to_dp(skb);

if (dp >= t->DPs || (q = t->tab[dp]) == NULL) {
if (net_ratelimit())
printk(KERN_WARNING "GRED: Unable to relocate VQ 0x%x "
"for requeue, screwing up backlog.\n",
tc_index_to_dp(skb));
} else {
if (red_is_idling(&q->parms))
red_end_of_idle_period(&q->parms);
q->backlog += qdisc_pkt_len(skb);
}

return qdisc_requeue(skb, sch);
}

static struct sk_buff *gred_dequeue(struct Qdisc* sch)
{
struct sk_buff *skb;
Expand Down Expand Up @@ -603,7 +583,6 @@ static struct Qdisc_ops gred_qdisc_ops __read_mostly = {
.enqueue = gred_enqueue,
.dequeue = gred_dequeue,
.peek = qdisc_peek_head,
.requeue = gred_requeue,
.drop = gred_drop,
.init = gred_init,
.reset = gred_reset,
Expand Down
19 changes: 0 additions & 19 deletions trunk/net/sched/sch_hfsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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),
Expand Down
Loading

0 comments on commit 0280300

Please sign in to comment.