Skip to content

Commit

Permalink
netns: net_identifiers should be read_mostly
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Nov 18, 2009
1 parent 615534b commit f99189b
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MODULE_PARM_DESC(fail_over_mac, "For active-backup, do not set all slaves to the
static const char * const version =
DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n";

int bond_net_id;
int bond_net_id __read_mostly;

static __be32 arp_target[BOND_MAX_ARP_TARGETS];
static int arp_ip_count;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static atomic_t ppp_unit_count = ATOMIC_INIT(0);
static atomic_t channel_count = ATOMIC_INIT(0);

/* per-net private data for this module */
static int ppp_net_id;
static int ppp_net_id __read_mostly;
struct ppp_net {
/* units to ppp mapping */
struct idr units_idr;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static const struct proto_ops pppoe_ops;
static struct ppp_channel_ops pppoe_chan_ops;

/* per-net private data for this module */
static int pppoe_net_id;
static int pppoe_net_id __read_mostly;
struct pppoe_net {
/*
* we could use _single_ hash table for all
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static struct ppp_channel_ops pppol2tp_chan_ops = { pppol2tp_xmit , NULL };
static const struct proto_ops pppol2tp_ops;

/* per-net private data for this module */
static int pppol2tp_net_id;
static int pppol2tp_net_id __read_mostly;
struct pppol2tp_net {
struct list_head pppol2tp_tunnel_list;
rwlock_t pppol2tp_tunnel_list_lock;
Expand Down
2 changes: 1 addition & 1 deletion net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/* Global VLAN variables */

int vlan_net_id;
int vlan_net_id __read_mostly;

/* Our listing of VLAN group(s) */
static struct hlist_head vlan_group_hash[VLAN_GRP_HASH_SIZE];
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev);

#define HASH_SIZE 16

static int ipgre_net_id;
static int ipgre_net_id __read_mostly;
struct ipgre_net {
struct ip_tunnel *tunnels[4][HASH_SIZE];

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
#define HASH_SIZE 16
#define HASH(addr) (((__force u32)addr^((__force u32)addr>>4))&0xF)

static int ipip_net_id;
static int ipip_net_id __read_mostly;
struct ipip_net {
struct ip_tunnel *tunnels_r_l[HASH_SIZE];
struct ip_tunnel *tunnels_r[HASH_SIZE];
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void ip6_fb_tnl_dev_init(struct net_device *dev);
static void ip6_tnl_dev_init(struct net_device *dev);
static void ip6_tnl_dev_setup(struct net_device *dev);

static int ip6_tnl_net_id;
static int ip6_tnl_net_id __read_mostly;
struct ip6_tnl_net {
/* the IPv6 tunnel fallback device */
struct net_device *fb_tnl_dev;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void ipip6_fb_tunnel_init(struct net_device *dev);
static void ipip6_tunnel_init(struct net_device *dev);
static void ipip6_tunnel_setup(struct net_device *dev);

static int sit_net_id;
static int sit_net_id __read_mostly;
struct sit_net {
struct ip_tunnel *tunnels_r_l[HASH_SIZE];
struct ip_tunnel *tunnels_r[HASH_SIZE];
Expand Down
2 changes: 1 addition & 1 deletion net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define _X2KEY(x) ((x) == XFRM_INF ? 0 : (x))
#define _KEY2X(x) ((x) == 0 ? XFRM_INF : (x))

static int pfkey_net_id;
static int pfkey_net_id __read_mostly;
struct netns_pfkey {
/* List of all pfkey sockets. */
struct hlist_head table;
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto_dccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] =
};

/* this module per-net specifics */
static int dccp_net_id;
static int dccp_net_id __read_mostly;
struct dccp_net {
int dccp_loose;
unsigned int dccp_timeout[CT_DCCP_MAX + 1];
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define GRE_TIMEOUT (30 * HZ)
#define GRE_STREAM_TIMEOUT (180 * HZ)

static int proto_gre_net_id;
static int proto_gre_net_id __read_mostly;
struct netns_proto_gre {
rwlock_t keymap_lock;
struct list_head keymap_list;
Expand Down
2 changes: 1 addition & 1 deletion net/phonet/pn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct phonet_net {
struct phonet_routes routes;
};

int phonet_net_id;
int phonet_net_id __read_mostly;

struct phonet_device_list *phonet_device_list(struct net *net)
{
Expand Down

0 comments on commit f99189b

Please sign in to comment.