aboutsummaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-02-23 13:04:19 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-24 22:11:54 -0800
commitdf173bda2639ac744ccf596ec1f8f7e66fe4c343 (patch)
treebd74a3a10b0503c578eb1ba5dcd6a4bad59c47d1 /net/sched
parent6373a9a286bdd955a76924cee88a2f8f784988b1 (diff)
netem: define NETEM_DIST_MAX
Rather than magic constant in code, expose the maximum size of packet distribution table in API. In iproute2, q_netem defines MAX_DIST as 16K already. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 86dad1eee54..289febd3cca 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -332,7 +332,7 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
int i;
size_t s;
- if (n > 65536)
+ if (n > NETEM_DIST_MAX)
return -EINVAL;
s = sizeof(struct disttable) + n * sizeof(s16);