aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2015-01-29 06:15:03 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-30 20:58:39 -0500
commit207895fd388c7c4c48bc33055cd726d9e750298c (patch)
tree560b36ca51ce4d654822e75e8c883d6e534e5992
parent055470d2a7ad47dfb479308d713993173f1c6876 (diff)
net: mark some potential candidates __read_mostly
They are all either written once or extremly rarely (e.g. from init code), so we can move them to the .data..read_mostly section. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ipvlan/ipvlan_core.c2
-rw-r--r--net/bridge/br_netlink.c2
-rw-r--r--net/ipv4/devinet.c2
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/mpls/mpls_gso.c4
5 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index 2e195289ddf4..2a175006028b 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -9,7 +9,7 @@
9 9
10#include "ipvlan.h" 10#include "ipvlan.h"
11 11
12static u32 ipvlan_jhash_secret; 12static u32 ipvlan_jhash_secret __read_mostly;
13 13
14void ipvlan_init_secret(void) 14void ipvlan_init_secret(void)
15{ 15{
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 3875ea51f6fe..e08b260f33fe 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -701,7 +701,7 @@ static size_t br_get_link_af_size(const struct net_device *dev)
701 return pv->num_vlans * nla_total_size(sizeof(struct bridge_vlan_info)); 701 return pv->num_vlans * nla_total_size(sizeof(struct bridge_vlan_info));
702} 702}
703 703
704static struct rtnl_af_ops br_af_ops = { 704static struct rtnl_af_ops br_af_ops __read_mostly = {
705 .family = AF_BRIDGE, 705 .family = AF_BRIDGE,
706 .get_link_af_size = br_get_link_af_size, 706 .get_link_af_size = br_get_link_af_size,
707}; 707};
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 59ebe16d06fc..f0b4a31d7bd6 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -2322,7 +2322,7 @@ static __net_initdata struct pernet_operations devinet_ops = {
2322 .exit = devinet_exit_net, 2322 .exit = devinet_exit_net,
2323}; 2323};
2324 2324
2325static struct rtnl_af_ops inet_af_ops = { 2325static struct rtnl_af_ops inet_af_ops __read_mostly = {
2326 .family = AF_INET, 2326 .family = AF_INET,
2327 .fill_link_af = inet_fill_link_af, 2327 .fill_link_af = inet_fill_link_af,
2328 .get_link_af_size = inet_get_link_af_size, 2328 .get_link_af_size = inet_get_link_af_size,
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7dcc065e2160..8623118cb2bb 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -5405,7 +5405,7 @@ static struct pernet_operations addrconf_ops = {
5405 .exit = addrconf_exit_net, 5405 .exit = addrconf_exit_net,
5406}; 5406};
5407 5407
5408static struct rtnl_af_ops inet6_ops = { 5408static struct rtnl_af_ops inet6_ops __read_mostly = {
5409 .family = AF_INET6, 5409 .family = AF_INET6,
5410 .fill_link_af = inet6_fill_link_af, 5410 .fill_link_af = inet6_fill_link_af,
5411 .get_link_af_size = inet6_get_link_af_size, 5411 .get_link_af_size = inet6_get_link_af_size,
diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
index 349295d21946..809df534a720 100644
--- a/net/mpls/mpls_gso.c
+++ b/net/mpls/mpls_gso.c
@@ -60,14 +60,14 @@ out:
60 return segs; 60 return segs;
61} 61}
62 62
63static struct packet_offload mpls_mc_offload = { 63static struct packet_offload mpls_mc_offload __read_mostly = {
64 .type = cpu_to_be16(ETH_P_MPLS_MC), 64 .type = cpu_to_be16(ETH_P_MPLS_MC),
65 .callbacks = { 65 .callbacks = {
66 .gso_segment = mpls_gso_segment, 66 .gso_segment = mpls_gso_segment,
67 }, 67 },
68}; 68};
69 69
70static struct packet_offload mpls_uc_offload = { 70static struct packet_offload mpls_uc_offload __read_mostly = {
71 .type = cpu_to_be16(ETH_P_MPLS_UC), 71 .type = cpu_to_be16(ETH_P_MPLS_UC),
72 .callbacks = { 72 .callbacks = {
73 .gso_segment = mpls_gso_segment, 73 .gso_segment = mpls_gso_segment,