Commit 207895fd authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller

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: default avatarDaniel Borkmann <dborkman@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 055470d2
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "ipvlan.h" #include "ipvlan.h"
static u32 ipvlan_jhash_secret; static u32 ipvlan_jhash_secret __read_mostly;
void ipvlan_init_secret(void) void ipvlan_init_secret(void)
{ {
......
...@@ -701,7 +701,7 @@ static size_t br_get_link_af_size(const struct net_device *dev) ...@@ -701,7 +701,7 @@ static size_t br_get_link_af_size(const struct net_device *dev)
return pv->num_vlans * nla_total_size(sizeof(struct bridge_vlan_info)); return pv->num_vlans * nla_total_size(sizeof(struct bridge_vlan_info));
} }
static struct rtnl_af_ops br_af_ops = { static struct rtnl_af_ops br_af_ops __read_mostly = {
.family = AF_BRIDGE, .family = AF_BRIDGE,
.get_link_af_size = br_get_link_af_size, .get_link_af_size = br_get_link_af_size,
}; };
......
...@@ -2322,7 +2322,7 @@ static __net_initdata struct pernet_operations devinet_ops = { ...@@ -2322,7 +2322,7 @@ static __net_initdata struct pernet_operations devinet_ops = {
.exit = devinet_exit_net, .exit = devinet_exit_net,
}; };
static struct rtnl_af_ops inet_af_ops = { static struct rtnl_af_ops inet_af_ops __read_mostly = {
.family = AF_INET, .family = AF_INET,
.fill_link_af = inet_fill_link_af, .fill_link_af = inet_fill_link_af,
.get_link_af_size = inet_get_link_af_size, .get_link_af_size = inet_get_link_af_size,
......
...@@ -5405,7 +5405,7 @@ static struct pernet_operations addrconf_ops = { ...@@ -5405,7 +5405,7 @@ static struct pernet_operations addrconf_ops = {
.exit = addrconf_exit_net, .exit = addrconf_exit_net,
}; };
static struct rtnl_af_ops inet6_ops = { static struct rtnl_af_ops inet6_ops __read_mostly = {
.family = AF_INET6, .family = AF_INET6,
.fill_link_af = inet6_fill_link_af, .fill_link_af = inet6_fill_link_af,
.get_link_af_size = inet6_get_link_af_size, .get_link_af_size = inet6_get_link_af_size,
......
...@@ -60,14 +60,14 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb, ...@@ -60,14 +60,14 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
return segs; return segs;
} }
static struct packet_offload mpls_mc_offload = { static struct packet_offload mpls_mc_offload __read_mostly = {
.type = cpu_to_be16(ETH_P_MPLS_MC), .type = cpu_to_be16(ETH_P_MPLS_MC),
.callbacks = { .callbacks = {
.gso_segment = mpls_gso_segment, .gso_segment = mpls_gso_segment,
}, },
}; };
static struct packet_offload mpls_uc_offload = { static struct packet_offload mpls_uc_offload __read_mostly = {
.type = cpu_to_be16(ETH_P_MPLS_UC), .type = cpu_to_be16(ETH_P_MPLS_UC),
.callbacks = { .callbacks = {
.gso_segment = mpls_gso_segment, .gso_segment = mpls_gso_segment,
......
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