]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: sched: restrict use of qstats qlen
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 28 Sep 2014 18:53:57 +0000 (11:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 05:02:26 +0000 (01:02 -0400)
commit6401585366326fc0ecbc372ec60d1a15cd8be2f5
treec3e8f777a579ee8b912e98d06ceb2aa1ffbb6a8b
parent25331d6ce42bcf4b34b6705fce4da15c3fabe62f
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>
16 files changed:
include/net/gen_stats.h
net/core/gen_stats.c
net/sched/act_api.c
net/sched/sch_api.c
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_fq_codel.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_mq.c
net/sched/sch_mqprio.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
net/sched/sch_qfq.c
net/sched/sch_sfq.c