aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-06-22 16:58:41 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-26 00:33:17 -0400
commit1823e4c80eeae2a774c75569ce3035070e5ee009 (patch)
treebdc1bdf4a67027193312ad584924ca8a986a064c /net/xfrm/xfrm_policy.c
parent5eaa0bd81f93225b6d1972b373ed00ca763052b2 (diff)
snmp: add align parameter to snmp_mib_init()
In preparation for 64bit snmp counters for some mibs, add an 'align' parameter to snmp_mib_init(), instead of assuming mibs only contain 'unsigned long' fields. Callers can use __alignof__(type) to provide correct alignment. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Herbert Xu <herbert@gondor.apana.org.au> CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> CC: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 4bf27d901333..593c06be6b62 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2480,7 +2480,8 @@ static int __net_init xfrm_statistics_init(struct net *net)
2480 int rv; 2480 int rv;
2481 2481
2482 if (snmp_mib_init((void __percpu **)net->mib.xfrm_statistics, 2482 if (snmp_mib_init((void __percpu **)net->mib.xfrm_statistics,
2483 sizeof(struct linux_xfrm_mib)) < 0) 2483 sizeof(struct linux_xfrm_mib),
2484 __alignof__(struct linux_xfrm_mib)) < 0)
2484 return -ENOMEM; 2485 return -ENOMEM;
2485 rv = xfrm_proc_init(net); 2486 rv = xfrm_proc_init(net);
2486 if (rv < 0) 2487 if (rv < 0)