diff options
author | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> | 2015-08-30 01:59:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-31 00:48:58 -0400 |
commit | c4c6bc314618f60ba69b0cbf93e506e4c38a11d2 (patch) | |
tree | eb6a5b4a18a08c8a6c3565a312c9f301eaa43768 /include/net/ip.h | |
parent | 06fb4e701b17e93366542e4cc57047e411136af7 (diff) |
net: Introduce helper functions to get the per cpu data
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 7b9e1c782aa3..9b9ca2839399 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -202,10 +202,20 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, | |||
202 | #define NET_ADD_STATS_BH(net, field, adnd) SNMP_ADD_STATS_BH((net)->mib.net_statistics, field, adnd) | 202 | #define NET_ADD_STATS_BH(net, field, adnd) SNMP_ADD_STATS_BH((net)->mib.net_statistics, field, adnd) |
203 | #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) | 203 | #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) |
204 | 204 | ||
205 | u64 snmp_get_cpu_field(void __percpu *mib, int cpu, int offct); | ||
205 | unsigned long snmp_fold_field(void __percpu *mib, int offt); | 206 | unsigned long snmp_fold_field(void __percpu *mib, int offt); |
206 | #if BITS_PER_LONG==32 | 207 | #if BITS_PER_LONG==32 |
208 | u64 snmp_get_cpu_field64(void __percpu *mib, int cpu, int offct, | ||
209 | size_t syncp_offset); | ||
207 | u64 snmp_fold_field64(void __percpu *mib, int offt, size_t sync_off); | 210 | u64 snmp_fold_field64(void __percpu *mib, int offt, size_t sync_off); |
208 | #else | 211 | #else |
212 | static inline u64 snmp_get_cpu_field64(void __percpu *mib, int cpu, int offct, | ||
213 | size_t syncp_offset) | ||
214 | { | ||
215 | return snmp_get_cpu_field(mib, cpu, offct); | ||
216 | |||
217 | } | ||
218 | |||
209 | static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_off) | 219 | static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_off) |
210 | { | 220 | { |
211 | return snmp_fold_field(mib, offt); | 221 | return snmp_fold_field(mib, offt); |