diff options
author | Ahmed S. Darwish <a.darwish@linutronix.de> | 2021-10-16 11:49:09 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-18 14:54:41 +0300 |
commit | 50dc9a8572aa4d7cdc56670228fcde40289ed289 (patch) | |
tree | bbf90120d66418ff98f42d9cd131f431afa02b1d /net/sched/sch_ets.c | |
parent | f56940daa5a74fb20b5f5487535549949f2d8d0c (diff) | |
download | linux-50dc9a8572aa4d7cdc56670228fcde40289ed289.tar.xz |
net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats data types
The only factor differentiating per-CPU bstats data type (struct
gnet_stats_basic_cpu) from the packed non-per-CPU one (struct
gnet_stats_basic_packed) was a u64_stats sync point inside the former.
The two data types are now equivalent: earlier commits added a u64_stats
sync point to the latter.
Combine both data types into "struct gnet_stats_basic_sync". This
eliminates redundancy and simplifies the bstats read/write APIs.
Use u64_stats_t for bstats "packets" and "bytes" data types. On 64-bit
architectures, u64_stats sync points do not use sequence counter
protection.
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_ets.c')
-rw-r--r-- | net/sched/sch_ets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c index 83693107371f..af56d155e7fc 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -41,7 +41,7 @@ struct ets_class { struct Qdisc *qdisc; u32 quantum; u32 deficit; - struct gnet_stats_basic_packed bstats; + struct gnet_stats_basic_sync bstats; struct gnet_stats_queue qstats; }; @@ -689,7 +689,7 @@ static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, q->classes[i].qdisc = NULL; q->classes[i].quantum = 0; q->classes[i].deficit = 0; - gnet_stats_basic_packed_init(&q->classes[i].bstats); + gnet_stats_basic_sync_init(&q->classes[i].bstats); memset(&q->classes[i].qstats, 0, sizeof(q->classes[i].qstats)); } return 0; |