summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/xform_ah.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-07-09 10:08:13 +0000
committerae <ae@FreeBSD.org>2013-07-09 10:08:13 +0000
commitd467a4169ad67053fa2f4089b8d85a8cbc46f800 (patch)
treea6d4cb3c25de0aa45541f9133adc58248c39db5f /sys/netipsec/xform_ah.c
parent430162610d43c9304f918e90063b5da86a8a5ad1 (diff)
downloadFreeBSD-src-d467a4169ad67053fa2f4089b8d85a8cbc46f800.zip
FreeBSD-src-d467a4169ad67053fa2f4089b8d85a8cbc46f800.tar.gz
Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat,
ipsec4stat, ipsec6stat to PCPU counters.
Diffstat (limited to 'sys/netipsec/xform_ah.c')
-rw-r--r--sys/netipsec/xform_ah.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 82c9a65a7..3666b54 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -89,7 +89,12 @@
VNET_DEFINE(int, ah_enable) = 1; /* control flow of packets with AH */
VNET_DEFINE(int, ah_cleartos) = 1; /* clear ip_tos when doing AH calc */
-VNET_DEFINE(struct ahstat, ahstat);
+VNET_PCPUSTAT_DEFINE(struct ahstat, ahstat);
+VNET_PCPUSTAT_SYSINIT(ahstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ahstat);
+#endif /* VIMAGE */
#ifdef INET
SYSCTL_DECL(_net_inet_ah);
@@ -97,8 +102,8 @@ SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
ah_enable, CTLFLAG_RW, &VNET_NAME(ah_enable), 0, "");
SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
ah_cleartos, CTLFLAG_RW, &VNET_NAME(ah_cleartos), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet_ah, IPSECCTL_STATS,
- stats, CTLFLAG_RD, &VNET_NAME(ahstat), ahstat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet_ah, IPSECCTL_STATS, stats, struct ahstat,
+ ahstat, "AH statistics (struct ahstat, netipsec/ah_var.h)");
#endif
static unsigned char ipseczeroes[256]; /* larger than an ip6 extension hdr */
OpenPOWER on IntegriCloud