net: move definition of pcpu_lstats to header file

pcpu_lstats is defined in several files, so unify them as one
and move to header file

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Li RongQing
2018-09-14 16:00:51 +08:00
committed by David S. Miller
parent ee4fccbee7
commit 52bb6677d5
4 changed files with 10 additions and 22 deletions

View File

@@ -2382,6 +2382,12 @@ struct pcpu_sw_netstats {
struct u64_stats_sync syncp;
};
struct pcpu_lstats {
u64 packets;
u64 bytes;
struct u64_stats_sync syncp;
};
#define __netdev_alloc_pcpu_stats(type, gfp) \
({ \
typeof(type) __percpu *pcpu_stats = alloc_percpu_gfp(type, gfp);\