Many network drivers use hand-coded implementation of the same thing, let's factorize things so that u64_stats_t adoption is done once.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -2401,6 +2401,8 @@ struct pcpu_lstats { · 2400 unmodified lines | ||
| 2401 | 2401 | struct u64_stats_sync syncp; |
| 2402 | 2402 | } __aligned(2 * sizeof(u64)); |
| 2403 | 2403 | |
| 2404 | +void dev_lstats_read(struct net_device *dev, u64 *packets, u64 *bytes); | |
| 2405 | + | |
| 2404 | 2406 | #define __netdev_alloc_pcpu_stats(type, gfp) \ |
| 2405 | 2407 | ({ \ |
| 2406 | 2408 | typeof(type) __percpu *pcpu_stats = alloc_percpu_gfp(type, gfp);\ |