diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/sched/sch_atm.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'net/sched/sch_atm.c')
-rw-r--r-- | net/sched/sch_atm.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 6318e1136b83..3f08158b8688 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -275,8 +275,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
275 | goto err_out; | 275 | goto err_out; |
276 | } | 276 | } |
277 | flow->filter_list = NULL; | 277 | flow->filter_list = NULL; |
278 | flow->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, | 278 | flow->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid); |
279 | &pfifo_qdisc_ops, classid); | ||
280 | if (!flow->q) | 279 | if (!flow->q) |
281 | flow->q = &noop_qdisc; | 280 | flow->q = &noop_qdisc; |
282 | pr_debug("atm_tc_change: qdisc %p\n", flow->q); | 281 | pr_debug("atm_tc_change: qdisc %p\n", flow->q); |
@@ -320,7 +319,7 @@ static int atm_tc_delete(struct Qdisc *sch, unsigned long arg) | |||
320 | * creation), and one for the reference held when calling delete. | 319 | * creation), and one for the reference held when calling delete. |
321 | */ | 320 | */ |
322 | if (flow->ref < 2) { | 321 | if (flow->ref < 2) { |
323 | printk(KERN_ERR "atm_tc_delete: flow->ref == %d\n", flow->ref); | 322 | pr_err("atm_tc_delete: flow->ref == %d\n", flow->ref); |
324 | return -EINVAL; | 323 | return -EINVAL; |
325 | } | 324 | } |
326 | if (flow->ref > 2) | 325 | if (flow->ref > 2) |
@@ -385,12 +384,12 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
385 | } | 384 | } |
386 | } | 385 | } |
387 | flow = NULL; | 386 | flow = NULL; |
388 | done: | 387 | done: |
389 | ; | 388 | ; |
390 | } | 389 | } |
391 | if (!flow) | 390 | if (!flow) { |
392 | flow = &p->link; | 391 | flow = &p->link; |
393 | else { | 392 | } else { |
394 | if (flow->vcc) | 393 | if (flow->vcc) |
395 | ATM_SKB(skb)->atm_options = flow->vcc->atm_options; | 394 | ATM_SKB(skb)->atm_options = flow->vcc->atm_options; |
396 | /*@@@ looks good ... but it's not supposed to work :-) */ | 395 | /*@@@ looks good ... but it's not supposed to work :-) */ |
@@ -423,10 +422,8 @@ drop: __maybe_unused | |||
423 | } | 422 | } |
424 | return ret; | 423 | return ret; |
425 | } | 424 | } |
426 | sch->bstats.bytes += qdisc_pkt_len(skb); | 425 | qdisc_bstats_update(sch, skb); |
427 | sch->bstats.packets++; | 426 | bstats_update(&flow->bstats, skb); |
428 | flow->bstats.bytes += qdisc_pkt_len(skb); | ||
429 | flow->bstats.packets++; | ||
430 | /* | 427 | /* |
431 | * Okay, this may seem weird. We pretend we've dropped the packet if | 428 | * Okay, this may seem weird. We pretend we've dropped the packet if |
432 | * it goes via ATM. The reason for this is that the outer qdisc | 429 | * it goes via ATM. The reason for this is that the outer qdisc |
@@ -543,7 +540,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt) | |||
543 | INIT_LIST_HEAD(&p->flows); | 540 | INIT_LIST_HEAD(&p->flows); |
544 | INIT_LIST_HEAD(&p->link.list); | 541 | INIT_LIST_HEAD(&p->link.list); |
545 | list_add(&p->link.list, &p->flows); | 542 | list_add(&p->link.list, &p->flows); |
546 | p->link.q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, | 543 | p->link.q = qdisc_create_dflt(sch->dev_queue, |
547 | &pfifo_qdisc_ops, sch->handle); | 544 | &pfifo_qdisc_ops, sch->handle); |
548 | if (!p->link.q) | 545 | if (!p->link.q) |
549 | p->link.q = &noop_qdisc; | 546 | p->link.q = &noop_qdisc; |
@@ -579,8 +576,7 @@ static void atm_tc_destroy(struct Qdisc *sch) | |||
579 | 576 | ||
580 | list_for_each_entry_safe(flow, tmp, &p->flows, list) { | 577 | list_for_each_entry_safe(flow, tmp, &p->flows, list) { |
581 | if (flow->ref > 1) | 578 | if (flow->ref > 1) |
582 | printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, | 579 | pr_err("atm_destroy: %p->ref = %d\n", flow, flow->ref); |
583 | flow->ref); | ||
584 | atm_tc_put(sch, (unsigned long)flow); | 580 | atm_tc_put(sch, (unsigned long)flow); |
585 | } | 581 | } |
586 | tasklet_kill(&p->task); | 582 | tasklet_kill(&p->task); |
@@ -619,9 +615,8 @@ static int atm_tc_dump_class(struct Qdisc *sch, unsigned long cl, | |||
619 | } | 615 | } |
620 | if (flow->excess) | 616 | if (flow->excess) |
621 | NLA_PUT_U32(skb, TCA_ATM_EXCESS, flow->classid); | 617 | NLA_PUT_U32(skb, TCA_ATM_EXCESS, flow->classid); |
622 | else { | 618 | else |
623 | NLA_PUT_U32(skb, TCA_ATM_EXCESS, 0); | 619 | NLA_PUT_U32(skb, TCA_ATM_EXCESS, 0); |
624 | } | ||
625 | 620 | ||
626 | nla_nest_end(skb, nest); | 621 | nla_nest_end(skb, nest); |
627 | return skb->len; | 622 | return skb->len; |