summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2014-09-28 22:53:57 +0400
committerDavid S. Miller <davem@davemloft.net>2014-09-30 09:02:26 +0400
commit6401585366326fc0ecbc372ec60d1a15cd8be2f5 (patch)
treec3e8f777a579ee8b912e98d06ceb2aa1ffbb6a8b /include/net
parent25331d6ce42bcf4b34b6705fce4da15c3fabe62f (diff)
downloadlinux-6401585366326fc0ecbc372ec60d1a15cd8be2f5.tar.xz
net: sched: restrict use of qstats qlen
This removes the use of qstats->qlen variable from the classifiers and makes it an explicit argument to gnet_stats_copy_queue(). The qlen represents the qdisc queue length and is packed into the qstats at the last moment before passnig to user space. By handling it explicitely we avoid, in the percpu stats case, having to figure out which per_cpu variable to put it in. It would probably be best to remove it from qstats completely but qstats is a user space ABI and can't be broken. A future patch could make an internal only qstats structure that would avoid having to allocate an additional u32 variable on the Qdisc struct. This would make the qstats struct 128bits instead of 128+32. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/gen_stats.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
index ce3c1281f2a0..de9b3dd5750e 100644
--- a/include/net/gen_stats.h
+++ b/include/net/gen_stats.h
@@ -40,7 +40,8 @@ void __gnet_stats_copy_basic(struct gnet_stats_basic_packed *bstats,
int gnet_stats_copy_rate_est(struct gnet_dump *d,
const struct gnet_stats_basic_packed *b,
struct gnet_stats_rate_est64 *r);
-int gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q);
+int gnet_stats_copy_queue(struct gnet_dump *d,
+ struct gnet_stats_queue *q, __u32 len);
int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len);
int gnet_stats_finish_copy(struct gnet_dump *d);