netns xfrm: per-netns MIBs
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4fb236bac9
commit
59c9940ed0
@@ -20,6 +20,9 @@ struct netns_mib {
|
||||
DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
|
||||
DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics);
|
||||
#endif
|
||||
#ifdef CONFIG_XFRM_STATISTICS
|
||||
DEFINE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,14 +38,13 @@
|
||||
MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto))
|
||||
|
||||
#ifdef CONFIG_XFRM_STATISTICS
|
||||
DECLARE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics);
|
||||
#define XFRM_INC_STATS(field) SNMP_INC_STATS(xfrm_statistics, field)
|
||||
#define XFRM_INC_STATS_BH(field) SNMP_INC_STATS_BH(xfrm_statistics, field)
|
||||
#define XFRM_INC_STATS_USER(field) SNMP_INC_STATS_USER(xfrm_statistics, field)
|
||||
#define XFRM_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.xfrm_statistics, field)
|
||||
#define XFRM_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.xfrm_statistics, field)
|
||||
#define XFRM_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)-mib.xfrm_statistics, field)
|
||||
#else
|
||||
#define XFRM_INC_STATS(field)
|
||||
#define XFRM_INC_STATS_BH(field)
|
||||
#define XFRM_INC_STATS_USER(field)
|
||||
#define XFRM_INC_STATS(net, field) ((void)(net))
|
||||
#define XFRM_INC_STATS_BH(net, field) ((void)(net))
|
||||
#define XFRM_INC_STATS_USER(net, field) ((void)(net))
|
||||
#endif
|
||||
|
||||
extern u32 sysctl_xfrm_aevent_etime;
|
||||
|
||||
Reference in New Issue
Block a user