Skip to content

Commit 1999414

Browse files
kaberdavem330
authored andcommitted
[NETFILTER]: Mark hooks __read_mostly
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 41c5b31 commit 1999414

17 files changed

Lines changed: 17 additions & 17 deletions

‎net/bridge/br_netfilter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ static unsigned int ip_sabotage_in(unsigned int hook, struct sk_buff *skb,
871871
* PF_BRIDGE/NF_BR_LOCAL_OUT functions don't get bridged traffic as input.
872872
* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
873873
* ip_refrag() can return NF_STOLEN. */
874-
static struct nf_hook_ops br_nf_ops[] = {
874+
static struct nf_hook_ops br_nf_ops[] __read_mostly = {
875875
{ .hook = br_nf_pre_routing,
876876
.owner = THIS_MODULE,
877877
.pf = PF_BRIDGE,

‎net/bridge/netfilter/ebtable_filter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ ebt_hook(unsigned int hook, struct sk_buff *skb, const struct net_device *in,
6767
return ebt_do_table(hook, skb, in, out, &frame_filter);
6868
}
6969

70-
static struct nf_hook_ops ebt_ops_filter[] = {
70+
static struct nf_hook_ops ebt_ops_filter[] __read_mostly = {
7171
{
7272
.hook = ebt_hook,
7373
.owner = THIS_MODULE,

‎net/bridge/netfilter/ebtable_nat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ebt_nat_src(unsigned int hook, struct sk_buff *skb, const struct net_device *in
7474
return ebt_do_table(hook, skb, in, out, &frame_nat);
7575
}
7676

77-
static struct nf_hook_ops ebt_ops_nat[] = {
77+
static struct nf_hook_ops ebt_ops_nat[] __read_mostly = {
7878
{
7979
.hook = ebt_nat_dst,
8080
.owner = THIS_MODULE,

‎net/decnet/netfilter/dn_rtmsg.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
115115
RCV_SKB_FAIL(-EINVAL);
116116
}
117117

118-
static struct nf_hook_ops dnrmg_ops = {
118+
static struct nf_hook_ops dnrmg_ops __read_mostly = {
119119
.hook = dnrmg_hook,
120120
.pf = PF_DECnet,
121121
.hooknum = NF_DN_ROUTE,

‎net/ipv4/ipvs/ip_vs_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ ip_vs_forward_icmp(unsigned int hooknum, struct sk_buff *skb,
10251025
}
10261026

10271027

1028-
static struct nf_hook_ops ip_vs_ops[] = {
1028+
static struct nf_hook_ops ip_vs_ops[] __read_mostly = {
10291029
/* After packet filtering, forward packet through VS/DR, VS/TUN,
10301030
* or VS/NAT(change destination), so that filtering rules can be
10311031
* applied to IPVS. */

‎net/ipv4/netfilter/arptable_filter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static unsigned int arpt_hook(unsigned int hook,
6464
return arpt_do_table(skb, hook, in, out, &packet_filter);
6565
}
6666

67-
static struct nf_hook_ops arpt_ops[] = {
67+
static struct nf_hook_ops arpt_ops[] __read_mostly = {
6868
{
6969
.hook = arpt_hook,
7070
.owner = THIS_MODULE,

‎net/ipv4/netfilter/ipt_CLUSTERIP.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ arp_mangle(unsigned int hook,
551551
return NF_ACCEPT;
552552
}
553553

554-
static struct nf_hook_ops cip_arp_ops = {
554+
static struct nf_hook_ops cip_arp_ops __read_mostly = {
555555
.hook = arp_mangle,
556556
.pf = NF_ARP,
557557
.hooknum = NF_ARP_OUT,

‎net/ipv4/netfilter/iptable_filter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ipt_local_out_hook(unsigned int hook,
9191
return ipt_do_table(skb, hook, in, out, &packet_filter);
9292
}
9393

94-
static struct nf_hook_ops ipt_ops[] = {
94+
static struct nf_hook_ops ipt_ops[] __read_mostly = {
9595
{
9696
.hook = ipt_hook,
9797
.owner = THIS_MODULE,

‎net/ipv4/netfilter/iptable_mangle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ ipt_local_hook(unsigned int hook,
128128
return ret;
129129
}
130130

131-
static struct nf_hook_ops ipt_ops[] = {
131+
static struct nf_hook_ops ipt_ops[] __read_mostly = {
132132
{
133133
.hook = ipt_route_hook,
134134
.owner = THIS_MODULE,

‎net/ipv4/netfilter/iptable_raw.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ipt_local_hook(unsigned int hook,
7474
}
7575

7676
/* 'raw' is the very first table. */
77-
static struct nf_hook_ops ipt_ops[] = {
77+
static struct nf_hook_ops ipt_ops[] __read_mostly = {
7878
{
7979
.hook = ipt_hook,
8080
.pf = PF_INET,

0 commit comments

Comments
 (0)