aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_dsmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r--net/sched/sch_dsmark.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index ba43aab3a851..d303daa45d49 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -68,7 +68,8 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
68 } 68 }
69 69
70 sch_tree_lock(sch); 70 sch_tree_lock(sch);
71 *old = xchg(&p->q, new); 71 *old = p->q;
72 p->q = new;
72 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen); 73 qdisc_tree_decrease_qlen(*old, (*old)->q.qlen);
73 qdisc_reset(*old); 74 qdisc_reset(*old);
74 sch_tree_unlock(sch); 75 sch_tree_unlock(sch);
@@ -313,24 +314,13 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
313 return skb; 314 return skb;
314} 315}
315 316
316static int dsmark_requeue(struct sk_buff *skb, struct Qdisc *sch) 317static struct sk_buff *dsmark_peek(struct Qdisc *sch)
317{ 318{
318 struct dsmark_qdisc_data *p = qdisc_priv(sch); 319 struct dsmark_qdisc_data *p = qdisc_priv(sch);
319 int err;
320
321 pr_debug("dsmark_requeue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
322
323 err = p->q->ops->requeue(skb, p->q);
324 if (err != NET_XMIT_SUCCESS) {
325 if (net_xmit_drop_count(err))
326 sch->qstats.drops++;
327 return err;
328 }
329 320
330 sch->q.qlen++; 321 pr_debug("dsmark_peek(sch %p,[qdisc %p])\n", sch, p);
331 sch->qstats.requeues++;
332 322
333 return NET_XMIT_SUCCESS; 323 return p->q->ops->peek(p->q);
334} 324}
335 325
336static unsigned int dsmark_drop(struct Qdisc *sch) 326static unsigned int dsmark_drop(struct Qdisc *sch)
@@ -496,7 +486,7 @@ static struct Qdisc_ops dsmark_qdisc_ops __read_mostly = {
496 .priv_size = sizeof(struct dsmark_qdisc_data), 486 .priv_size = sizeof(struct dsmark_qdisc_data),
497 .enqueue = dsmark_enqueue, 487 .enqueue = dsmark_enqueue,
498 .dequeue = dsmark_dequeue, 488 .dequeue = dsmark_dequeue,
499 .requeue = dsmark_requeue, 489 .peek = dsmark_peek,
500 .drop = dsmark_drop, 490 .drop = dsmark_drop,
501 .init = dsmark_init, 491 .init = dsmark_init,
502 .reset = dsmark_reset, 492 .reset = dsmark_reset,