提交 1192e403 编写于 作者: B Brian Haley 提交者: David S. Miller

[NETFILTER]: make some netfilter globals __read_mostly

Signed-off-by: NBrian Haley <brian.haley@hp.com>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c1fe3ca5
...@@ -63,17 +63,17 @@ atomic_t ip_conntrack_count = ATOMIC_INIT(0); ...@@ -63,17 +63,17 @@ atomic_t ip_conntrack_count = ATOMIC_INIT(0);
void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL; void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL;
LIST_HEAD(ip_conntrack_expect_list); LIST_HEAD(ip_conntrack_expect_list);
struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO]; struct ip_conntrack_protocol *ip_ct_protos[MAX_IP_CT_PROTO] __read_mostly;
static LIST_HEAD(helpers); static LIST_HEAD(helpers);
unsigned int ip_conntrack_htable_size __read_mostly = 0; unsigned int ip_conntrack_htable_size __read_mostly = 0;
int ip_conntrack_max __read_mostly; int ip_conntrack_max __read_mostly;
struct list_head *ip_conntrack_hash; struct list_head *ip_conntrack_hash __read_mostly;
static kmem_cache_t *ip_conntrack_cachep __read_mostly; static kmem_cache_t *ip_conntrack_cachep __read_mostly;
static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly; static kmem_cache_t *ip_conntrack_expect_cachep __read_mostly;
struct ip_conntrack ip_conntrack_untracked; struct ip_conntrack ip_conntrack_untracked;
unsigned int ip_ct_log_invalid __read_mostly; unsigned int ip_ct_log_invalid __read_mostly;
static LIST_HEAD(unconfirmed); static LIST_HEAD(unconfirmed);
static int ip_conntrack_vmalloc; static int ip_conntrack_vmalloc __read_mostly;
static unsigned int ip_conntrack_next_id; static unsigned int ip_conntrack_next_id;
static unsigned int ip_conntrack_expect_next_id; static unsigned int ip_conntrack_expect_next_id;
......
...@@ -52,15 +52,15 @@ struct ipq_queue_entry { ...@@ -52,15 +52,15 @@ struct ipq_queue_entry {
typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long);
static unsigned char copy_mode = IPQ_COPY_NONE; static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE;
static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT;
static DEFINE_RWLOCK(queue_lock); static DEFINE_RWLOCK(queue_lock);
static int peer_pid; static int peer_pid __read_mostly;
static unsigned int copy_range; static unsigned int copy_range __read_mostly;
static unsigned int queue_total; static unsigned int queue_total;
static unsigned int queue_dropped = 0; static unsigned int queue_dropped = 0;
static unsigned int queue_user_dropped = 0; static unsigned int queue_user_dropped = 0;
static struct sock *ipqnl; static struct sock *ipqnl __read_mostly;
static LIST_HEAD(queue_list); static LIST_HEAD(queue_list);
static DEFINE_MUTEX(ipqnl_mutex); static DEFINE_MUTEX(ipqnl_mutex);
......
...@@ -56,15 +56,15 @@ struct ipq_queue_entry { ...@@ -56,15 +56,15 @@ struct ipq_queue_entry {
typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long); typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long);
static unsigned char copy_mode = IPQ_COPY_NONE; static unsigned char copy_mode __read_mostly = IPQ_COPY_NONE;
static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT; static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT;
static DEFINE_RWLOCK(queue_lock); static DEFINE_RWLOCK(queue_lock);
static int peer_pid; static int peer_pid __read_mostly;
static unsigned int copy_range; static unsigned int copy_range __read_mostly;
static unsigned int queue_total; static unsigned int queue_total;
static unsigned int queue_dropped = 0; static unsigned int queue_dropped = 0;
static unsigned int queue_user_dropped = 0; static unsigned int queue_user_dropped = 0;
static struct sock *ipqnl; static struct sock *ipqnl __read_mostly;
static LIST_HEAD(queue_list); static LIST_HEAD(queue_list);
static DEFINE_MUTEX(ipqnl_mutex); static DEFINE_MUTEX(ipqnl_mutex);
......
...@@ -73,17 +73,17 @@ atomic_t nf_conntrack_count = ATOMIC_INIT(0); ...@@ -73,17 +73,17 @@ atomic_t nf_conntrack_count = ATOMIC_INIT(0);
void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL; void (*nf_conntrack_destroyed)(struct nf_conn *conntrack) = NULL;
LIST_HEAD(nf_conntrack_expect_list); LIST_HEAD(nf_conntrack_expect_list);
struct nf_conntrack_protocol **nf_ct_protos[PF_MAX]; struct nf_conntrack_protocol **nf_ct_protos[PF_MAX] __read_mostly;
struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX]; struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX] __read_mostly;
static LIST_HEAD(helpers); static LIST_HEAD(helpers);
unsigned int nf_conntrack_htable_size __read_mostly = 0; unsigned int nf_conntrack_htable_size __read_mostly = 0;
int nf_conntrack_max __read_mostly; int nf_conntrack_max __read_mostly;
struct list_head *nf_conntrack_hash; struct list_head *nf_conntrack_hash __read_mostly;
static kmem_cache_t *nf_conntrack_expect_cachep; static kmem_cache_t *nf_conntrack_expect_cachep __read_mostly;
struct nf_conn nf_conntrack_untracked; struct nf_conn nf_conntrack_untracked;
unsigned int nf_ct_log_invalid __read_mostly; unsigned int nf_ct_log_invalid __read_mostly;
static LIST_HEAD(unconfirmed); static LIST_HEAD(unconfirmed);
static int nf_conntrack_vmalloc; static int nf_conntrack_vmalloc __read_mostly;
static unsigned int nf_conntrack_next_id; static unsigned int nf_conntrack_next_id;
static unsigned int nf_conntrack_expect_next_id; static unsigned int nf_conntrack_expect_next_id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册