diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 11:38:13 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 11:38:13 -0800 |
commit | cb18eccff48ef3986d1072964590bce6fec705fb (patch) | |
tree | 777fb1d15e0281341e1e02c9803d989538d346f2 /net/sched/sch_netem.c | |
parent | c827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff) | |
parent | 5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff) | |
download | op-kernel-dev-cb18eccff48ef3986d1072964590bce6fec705fb.zip op-kernel-dev-cb18eccff48ef3986d1072964590bce6fec705fb.tar.gz |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
[IPV4]: Restore multipath routing after rt_next changes.
[XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch.
[NET]: Reorder fields of struct dst_entry
[DECNET]: Convert decnet route to use the new dst_entry 'next' pointer
[IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer
[IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer
[NET]: Introduce union in struct dst_entry to hold 'next' pointer
[DECNET]: fix misannotation of linkinfo_dn
[DECNET]: FRA_{DST,SRC} are le16 for decnet
[UDP]: UDP can use sk_hash to speedup lookups
[NET]: Fix whitespace errors.
[NET] XFRM: Fix whitespace errors.
[NET] X25: Fix whitespace errors.
[NET] WANROUTER: Fix whitespace errors.
[NET] UNIX: Fix whitespace errors.
[NET] TIPC: Fix whitespace errors.
[NET] SUNRPC: Fix whitespace errors.
[NET] SCTP: Fix whitespace errors.
[NET] SCHED: Fix whitespace errors.
[NET] RXRPC: Fix whitespace errors.
...
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 79542af..1ccbfb5 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -7,7 +7,7 @@ * 2 of the License. * * Many of the algorithms and ideas for this came from - * NIST Net which is not copyrighted. + * NIST Net which is not copyrighted. * * Authors: Stephen Hemminger <shemminger@osdl.org> * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> @@ -114,7 +114,7 @@ static unsigned long get_crandom(struct crndstate *state) * std deviation sigma. Uses table lookup to approximate the desired * distribution, and a uniformly-distributed pseudo-random source. */ -static long tabledist(unsigned long mu, long sigma, +static long tabledist(unsigned long mu, long sigma, struct crndstate *state, const struct disttable *dist) { long t, x; @@ -126,7 +126,7 @@ static long tabledist(unsigned long mu, long sigma, rnd = get_crandom(state); /* default uniform distribution */ - if (dist == NULL) + if (dist == NULL) return (rnd % (2*sigma)) - sigma + mu; t = dist->table[rnd % dist->size]; @@ -218,7 +218,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) ++q->counter; ret = q->qdisc->enqueue(skb, q->qdisc); } else { - /* + /* * Do re-ordering by putting one out of N packets at the front * of the queue. */ @@ -323,7 +323,7 @@ static void netem_reset(struct Qdisc *sch) /* Pass size change message down to embedded FIFO */ static int set_fifo_limit(struct Qdisc *q, int limit) { - struct rtattr *rta; + struct rtattr *rta; int ret = -ENOMEM; /* Hack to avoid sending change message to non-FIFO */ @@ -333,9 +333,9 @@ static int set_fifo_limit(struct Qdisc *q, int limit) rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); if (rta) { rta->rta_type = RTM_NEWQDISC; - rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); + rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; - + ret = q->ops->change(q, rta); kfree(rta); } @@ -364,7 +364,7 @@ static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) d->size = n; for (i = 0; i < n; i++) d->table[i] = data[i]; - + spin_lock_bh(&sch->dev->queue_lock); d = xchg(&q->delay_dist, d); spin_unlock_bh(&sch->dev->queue_lock); @@ -419,7 +419,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) struct netem_sched_data *q = qdisc_priv(sch); struct tc_netem_qopt *qopt; int ret; - + if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) return -EINVAL; @@ -429,7 +429,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) pr_debug("netem: can't set fifo limit\n"); return ret; } - + q->latency = qopt->latency; q->jitter = qopt->jitter; q->limit = qopt->limit; @@ -445,10 +445,10 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) /* Handle nested options after initial queue options. * Should have put all options in nested format but too late now. - */ + */ if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { struct rtattr *tb[TCA_NETEM_MAX]; - if (rtattr_parse(tb, TCA_NETEM_MAX, + if (rtattr_parse(tb, TCA_NETEM_MAX, RTA_DATA(opt) + sizeof(*qopt), RTA_PAYLOAD(opt) - sizeof(*qopt))) return -EINVAL; @@ -681,7 +681,7 @@ static void netem_put(struct Qdisc *sch, unsigned long arg) { } -static int netem_change_class(struct Qdisc *sch, u32 classid, u32 parentid, +static int netem_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, unsigned long *arg) { return -ENOSYS; |