diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-02-23 08:04:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-25 01:11:56 -0500 |
commit | 250a65f78265940ac33a2dd2002924e6126efe14 (patch) | |
tree | ff3503e44602e55634bbb60f009be940f2fcc852 /net/sched | |
parent | 661b79725fea030803a89a16cda506bac8eeca78 (diff) |
netem: update version and cleanup
Get rid of debug message that are not useful, and enable
the log messages in case of error.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_netem.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 5bbcccc353d0..28b3f7e83517 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <net/netlink.h> | 24 | #include <net/netlink.h> |
25 | #include <net/pkt_sched.h> | 25 | #include <net/pkt_sched.h> |
26 | 26 | ||
27 | #define VERSION "1.2" | 27 | #define VERSION "1.3" |
28 | 28 | ||
29 | /* Network Emulation Queuing algorithm. | 29 | /* Network Emulation Queuing algorithm. |
30 | ==================================== | 30 | ==================================== |
@@ -311,8 +311,6 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
311 | int ret; | 311 | int ret; |
312 | int count = 1; | 312 | int count = 1; |
313 | 313 | ||
314 | pr_debug("netem_enqueue skb=%p\n", skb); | ||
315 | |||
316 | /* Random duplication */ | 314 | /* Random duplication */ |
317 | if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) | 315 | if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor)) |
318 | ++count; | 316 | ++count; |
@@ -633,7 +631,7 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt) | |||
633 | 631 | ||
634 | ret = fifo_set_limit(q->qdisc, qopt->limit); | 632 | ret = fifo_set_limit(q->qdisc, qopt->limit); |
635 | if (ret) { | 633 | if (ret) { |
636 | pr_debug("netem: can't set fifo limit\n"); | 634 | pr_info("netem: can't set fifo limit\n"); |
637 | return ret; | 635 | return ret; |
638 | } | 636 | } |
639 | 637 | ||
@@ -769,13 +767,13 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt) | |||
769 | q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops, | 767 | q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops, |
770 | TC_H_MAKE(sch->handle, 1)); | 768 | TC_H_MAKE(sch->handle, 1)); |
771 | if (!q->qdisc) { | 769 | if (!q->qdisc) { |
772 | pr_debug("netem: qdisc create failed\n"); | 770 | pr_notice("netem: qdisc create tfifo qdisc failed\n"); |
773 | return -ENOMEM; | 771 | return -ENOMEM; |
774 | } | 772 | } |
775 | 773 | ||
776 | ret = netem_change(sch, opt); | 774 | ret = netem_change(sch, opt); |
777 | if (ret) { | 775 | if (ret) { |
778 | pr_debug("netem: change failed\n"); | 776 | pr_info("netem: change failed\n"); |
779 | qdisc_destroy(q->qdisc); | 777 | qdisc_destroy(q->qdisc); |
780 | } | 778 | } |
781 | return ret; | 779 | return ret; |