Commit d0083d98 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net_sched: extend packet counter to 64bit

After this change, qdisc packet counter is no longer
a 32bit quantity. We still export 32bit values to user.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4d390c28
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
/* Note: this used to be in include/uapi/linux/gen_stats.h */ /* Note: this used to be in include/uapi/linux/gen_stats.h */
struct gnet_stats_basic_packed { struct gnet_stats_basic_packed {
__u64 bytes; __u64 bytes;
__u32 packets; __u64 packets;
} __attribute__ ((packed)); };
struct gnet_stats_basic_cpu { struct gnet_stats_basic_cpu {
struct gnet_stats_basic_packed bstats; struct gnet_stats_basic_packed bstats;
......
...@@ -123,8 +123,7 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats, ...@@ -123,8 +123,7 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats,
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
struct gnet_stats_basic_cpu *bcpu = per_cpu_ptr(cpu, i); struct gnet_stats_basic_cpu *bcpu = per_cpu_ptr(cpu, i);
unsigned int start; unsigned int start;
u64 bytes; u64 bytes, packets;
u32 packets;
do { do {
start = u64_stats_fetch_begin_irq(&bcpu->syncp); start = u64_stats_fetch_begin_irq(&bcpu->syncp);
......
...@@ -35,7 +35,7 @@ static int tcf_simp_act(struct sk_buff *skb, const struct tc_action *a, ...@@ -35,7 +35,7 @@ static int tcf_simp_act(struct sk_buff *skb, const struct tc_action *a,
* Example if this was the 3rd packet and the string was "hello" * Example if this was the 3rd packet and the string was "hello"
* then it would look like "hello_3" (without quotes) * then it would look like "hello_3" (without quotes)
*/ */
pr_info("simple: %s_%d\n", pr_info("simple: %s_%llu\n",
(char *)d->tcfd_defdata, d->tcf_bstats.packets); (char *)d->tcfd_defdata, d->tcf_bstats.packets);
spin_unlock(&d->tcf_lock); spin_unlock(&d->tcf_lock);
return d->tcf_action; return d->tcf_action;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment