summaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-11-04 19:13:15 -0800
committerDavid S. Miller <davem@davemloft.net>2019-11-05 18:20:55 -0800
commitb33e699fe43aa63f29113311f69357e119ef5276 (patch)
tree763247d6b42ff2e72ee2100d5ec5235daa9967ed /net/sched/act_api.c
parentd0083d98f685b9f4fe810570f93cef0b0bb6b354 (diff)
downloadlinux-stable-b33e699fe43aa63f29113311f69357e119ef5276.tar.gz
linux-stable-b33e699fe43aa63f29113311f69357e119ef5276.tar.bz2
linux-stable-b33e699fe43aa63f29113311f69357e119ef5276.zip
net_sched: add TCA_STATS_PKT64 attribute
Now the kernel uses 64bit packet counters in scheduler layer, we want to export these counters to user space. Instead risking breaking user space by adding fields to struct gnet_stats_basic, add a new TCA_STATS_PKT64. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 6284c552e943..bda1ba25c59e 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -188,6 +188,8 @@ static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
+ nla_total_size(0) /* TCA_ACT_STATS nested */
/* TCA_STATS_BASIC */
+ nla_total_size_64bit(sizeof(struct gnet_stats_basic))
+ /* TCA_STATS_PKT64 */
+ + nla_total_size_64bit(sizeof(u64))
/* TCA_STATS_QUEUE */
+ nla_total_size_64bit(sizeof(struct gnet_stats_queue))
+ nla_total_size(0) /* TCA_OPTIONS nested */