Commit 3ff2cfa5 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

ipv6: struct xfrm6_tunnel in read_mostly section

tunnel6_handlers chain being scanned for each incoming packet,
make sure it doesnt share an often dirtied cache line.
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6dcd814b
...@@ -1372,13 +1372,13 @@ static void __net_init ip6_fb_tnl_dev_init(struct net_device *dev) ...@@ -1372,13 +1372,13 @@ static void __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
ip6n->tnls_wc[0] = t; ip6n->tnls_wc[0] = t;
} }
static struct xfrm6_tunnel ip4ip6_handler = { static struct xfrm6_tunnel ip4ip6_handler __read_mostly = {
.handler = ip4ip6_rcv, .handler = ip4ip6_rcv,
.err_handler = ip4ip6_err, .err_handler = ip4ip6_err,
.priority = 1, .priority = 1,
}; };
static struct xfrm6_tunnel ip6ip6_handler = { static struct xfrm6_tunnel ip6ip6_handler __read_mostly = {
.handler = ip6ip6_rcv, .handler = ip6ip6_rcv,
.err_handler = ip6ip6_err, .err_handler = ip6ip6_err,
.priority = 1, .priority = 1,
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include <net/protocol.h> #include <net/protocol.h>
#include <net/xfrm.h> #include <net/xfrm.h>
static struct xfrm6_tunnel *tunnel6_handlers; static struct xfrm6_tunnel *tunnel6_handlers __read_mostly;
static struct xfrm6_tunnel *tunnel46_handlers; static struct xfrm6_tunnel *tunnel46_handlers __read_mostly;
static DEFINE_MUTEX(tunnel6_mutex); static DEFINE_MUTEX(tunnel6_mutex);
int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family) int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family)
......
...@@ -317,13 +317,13 @@ static const struct xfrm_type xfrm6_tunnel_type = { ...@@ -317,13 +317,13 @@ static const struct xfrm_type xfrm6_tunnel_type = {
.output = xfrm6_tunnel_output, .output = xfrm6_tunnel_output,
}; };
static struct xfrm6_tunnel xfrm6_tunnel_handler = { static struct xfrm6_tunnel xfrm6_tunnel_handler __read_mostly = {
.handler = xfrm6_tunnel_rcv, .handler = xfrm6_tunnel_rcv,
.err_handler = xfrm6_tunnel_err, .err_handler = xfrm6_tunnel_err,
.priority = 2, .priority = 2,
}; };
static struct xfrm6_tunnel xfrm46_tunnel_handler = { static struct xfrm6_tunnel xfrm46_tunnel_handler __read_mostly = {
.handler = xfrm6_tunnel_rcv, .handler = xfrm6_tunnel_rcv,
.err_handler = xfrm6_tunnel_err, .err_handler = xfrm6_tunnel_err,
.priority = 2, .priority = 2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment