aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2018-09-14 16:00:51 +0800
committerDavid S. Miller <davem@davemloft.net>2018-09-14 08:32:23 -0700
commit52bb6677d530d37055092d86b4eab69dce6c166a (patch)
tree9701036db4955aa531c835ca07e186aaf3662601 /include/linux
parentnet/ibm/emac: Remove VLA usage (diff)
downloadlinux-dev-52bb6677d530d37055092d86b4eab69dce6c166a.tar.xz
linux-dev-52bb6677d530d37055092d86b4eab69dce6c166a.zip
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e2b3bd750c98..baed5d5088c5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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);\