Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/809405/?format=api
{ "id": 809405, "url": "http://patchwork.ozlabs.org/api/1.2/patches/809405/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/1504477667-12130-3-git-send-email-pablo@netfilter.org/", "project": { "id": 26, "url": "http://patchwork.ozlabs.org/api/1.2/projects/26/?format=api", "name": "Netfilter Development", "link_name": "netfilter-devel", "list_id": "netfilter-devel.vger.kernel.org", "list_email": "netfilter-devel@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504477667-12130-3-git-send-email-pablo@netfilter.org>", "list_archive_url": null, "date": "2017-09-03T22:27:12", "name": "[12/47] netfilter: nf_hook_ops structs can be const", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "56da7a44d224395d46a4dfd58150a57195339c32", "submitter": { "id": 1315, "url": "http://patchwork.ozlabs.org/api/1.2/people/1315/?format=api", "name": "Pablo Neira Ayuso", "email": "pablo@netfilter.org" }, "delegate": { "id": 6139, "url": "http://patchwork.ozlabs.org/api/1.2/users/6139/?format=api", "username": "pablo", "first_name": "Pablo", "last_name": "Neira", "email": "pablo@netfilter.org" }, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/1504477667-12130-3-git-send-email-pablo@netfilter.org/mbox/", "series": [ { "id": 1280, "url": "http://patchwork.ozlabs.org/api/1.2/series/1280/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=1280", "date": "2017-09-03T22:25:42", "name": "[01/47] netfilter: expect: add to hash table after expect init", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1280/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809405/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809405/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netfilter-devel-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netfilter-devel-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xlngz5wxqz9s06\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 4 Sep 2017 08:28:47 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753052AbdICW2L (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSun, 3 Sep 2017 18:28:11 -0400", "from mail.us.es ([193.147.175.20]:51140 \"EHLO mail.us.es\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753244AbdICW2G (ORCPT <rfc822; netfilter-devel@vger.kernel.org>);\n\tSun, 3 Sep 2017 18:28:06 -0400", "from antivirus1-rhel7.int (unknown [192.168.2.11])\n\tby mail.us.es (Postfix) with ESMTP id 6FE92190F62\n\tfor <netfilter-devel@vger.kernel.org>;\n\tMon, 4 Sep 2017 00:27:39 +0200 (CEST)", "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 5F890DA2AF\n\tfor <netfilter-devel@vger.kernel.org>;\n\tMon, 4 Sep 2017 00:27:39 +0200 (CEST)", "by antivirus1-rhel7.int (Postfix, from userid 99)\n\tid 5528BB5030; Mon, 4 Sep 2017 00:27:39 +0200 (CEST)", "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 12CF9B502A;\n\tMon, 4 Sep 2017 00:27:37 +0200 (CEST)", "from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int\n\t(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); \n\tMon, 04 Sep 2017 00:27:37 +0200 (CEST)", "from salvia.here (unknown [31.4.193.113])\n\t(Authenticated sender: pneira@us.es)\n\tby entrada.int (Postfix) with ESMTPA id AFBEA4265A20;\n\tMon, 4 Sep 2017 00:27:36 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.1 (2015-04-28) on\n\tantivirus1-rhel7.int", "X-Spam-Level": "", "X-Spam-Status": "No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50,\n\tSMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1", "X-Virus-Status": "clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int)", "X-SMTPAUTHUS": "auth mail.us.es", "From": "Pablo Neira Ayuso <pablo@netfilter.org>", "To": "netfilter-devel@vger.kernel.org", "Cc": "davem@davemloft.net, netdev@vger.kernel.org", "Subject": "[PATCH 12/47] netfilter: nf_hook_ops structs can be const", "Date": "Mon, 4 Sep 2017 00:27:12 +0200", "Message-Id": "<1504477667-12130-3-git-send-email-pablo@netfilter.org>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1504477667-12130-1-git-send-email-pablo@netfilter.org>", "References": "<1504477667-12130-1-git-send-email-pablo@netfilter.org>", "X-Virus-Scanned": "ClamAV using ClamSMTP", "Sender": "netfilter-devel-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netfilter-devel.vger.kernel.org>", "X-Mailing-List": "netfilter-devel@vger.kernel.org" }, "content": "From: Florian Westphal <fw@strlen.de>\n\nWe no longer place these on a list so they can be const.\n\nSigned-off-by: Florian Westphal <fw@strlen.de>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n drivers/net/ipvlan/ipvlan_main.c | 2 +-\n net/bridge/br_netfilter_hooks.c | 2 +-\n net/bridge/netfilter/ebtable_filter.c | 2 +-\n net/bridge/netfilter/ebtable_nat.c | 2 +-\n net/decnet/netfilter/dn_rtmsg.c | 2 +-\n net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-\n net/ipv4/netfilter/ipt_SYNPROXY.c | 2 +-\n net/ipv4/netfilter/iptable_nat.c | 2 +-\n net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 +-\n net/ipv4/netfilter/nf_defrag_ipv4.c | 2 +-\n net/ipv6/ila/ila_xlat.c | 2 +-\n net/ipv6/netfilter/ip6t_SYNPROXY.c | 2 +-\n net/ipv6/netfilter/ip6table_nat.c | 2 +-\n net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 2 +-\n net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 2 +-\n net/netfilter/ipvs/ip_vs_core.c | 2 +-\n security/selinux/hooks.c | 2 +-\n security/smack/smack_netfilter.c | 2 +-\n 18 files changed, 18 insertions(+), 18 deletions(-)", "diff": "diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c\nindex fdde20735416..943e6907dc19 100644\n--- a/drivers/net/ipvlan/ipvlan_main.c\n+++ b/drivers/net/ipvlan/ipvlan_main.c\n@@ -15,7 +15,7 @@ struct ipvlan_netns {\n \tunsigned int ipvl_nf_hook_refcnt;\n };\n \n-static struct nf_hook_ops ipvl_nfops[] __read_mostly = {\n+static const struct nf_hook_ops ipvl_nfops[] = {\n \t{\n \t\t.hook = ipvlan_nf_input,\n \t\t.pf = NFPROTO_IPV4,\ndiff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c\nindex 2261e5194c82..626f4b2cef16 100644\n--- a/net/bridge/br_netfilter_hooks.c\n+++ b/net/bridge/br_netfilter_hooks.c\n@@ -887,7 +887,7 @@ EXPORT_SYMBOL_GPL(br_netfilter_enable);\n \n /* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because\n * br_dev_queue_push_xmit is called afterwards */\n-static struct nf_hook_ops br_nf_ops[] __read_mostly = {\n+static const struct nf_hook_ops br_nf_ops[] = {\n \t{\n \t\t.hook = br_nf_pre_routing,\n \t\t.pf = NFPROTO_BRIDGE,\ndiff --git a/net/bridge/netfilter/ebtable_filter.c b/net/bridge/netfilter/ebtable_filter.c\nindex f22ef7c21913..45a00dbdbcad 100644\n--- a/net/bridge/netfilter/ebtable_filter.c\n+++ b/net/bridge/netfilter/ebtable_filter.c\n@@ -70,7 +70,7 @@ ebt_out_hook(void *priv, struct sk_buff *skb,\n \treturn ebt_do_table(skb, state, state->net->xt.frame_filter);\n }\n \n-static struct nf_hook_ops ebt_ops_filter[] __read_mostly = {\n+static const struct nf_hook_ops ebt_ops_filter[] = {\n \t{\n \t\t.hook\t\t= ebt_in_hook,\n \t\t.pf\t\t= NFPROTO_BRIDGE,\ndiff --git a/net/bridge/netfilter/ebtable_nat.c b/net/bridge/netfilter/ebtable_nat.c\nindex 2f7a4f314406..4ecf50662b7d 100644\n--- a/net/bridge/netfilter/ebtable_nat.c\n+++ b/net/bridge/netfilter/ebtable_nat.c\n@@ -70,7 +70,7 @@ ebt_nat_out(void *priv, struct sk_buff *skb,\n \treturn ebt_do_table(skb, state, state->net->xt.frame_nat);\n }\n \n-static struct nf_hook_ops ebt_ops_nat[] __read_mostly = {\n+static const struct nf_hook_ops ebt_ops_nat[] = {\n \t{\n \t\t.hook\t\t= ebt_nat_out,\n \t\t.pf\t\t= NFPROTO_BRIDGE,\ndiff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c\nindex aa8ffecc46a4..ab395e55cd78 100644\n--- a/net/decnet/netfilter/dn_rtmsg.c\n+++ b/net/decnet/netfilter/dn_rtmsg.c\n@@ -115,7 +115,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)\n \tRCV_SKB_FAIL(-EINVAL);\n }\n \n-static struct nf_hook_ops dnrmg_ops __read_mostly = {\n+static const struct nf_hook_ops dnrmg_ops = {\n \t.hook\t\t= dnrmg_hook,\n \t.pf\t\t= NFPROTO_DECNET,\n \t.hooknum\t= NF_DN_ROUTE,\ndiff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c\nindex 7d72decb80f9..6637e8b37ee2 100644\n--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c\n+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c\n@@ -624,7 +624,7 @@ arp_mangle(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops cip_arp_ops __read_mostly = {\n+static const struct nf_hook_ops cip_arp_ops = {\n \t.hook = arp_mangle,\n \t.pf = NFPROTO_ARP,\n \t.hooknum = NF_ARP_OUT,\ndiff --git a/net/ipv4/netfilter/ipt_SYNPROXY.c b/net/ipv4/netfilter/ipt_SYNPROXY.c\nindex f1528f7175a8..811689e523c3 100644\n--- a/net/ipv4/netfilter/ipt_SYNPROXY.c\n+++ b/net/ipv4/netfilter/ipt_SYNPROXY.c\n@@ -416,7 +416,7 @@ static unsigned int ipv4_synproxy_hook(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops ipv4_synproxy_ops[] __read_mostly = {\n+static const struct nf_hook_ops ipv4_synproxy_ops[] = {\n \t{\n \t\t.hook\t\t= ipv4_synproxy_hook,\n \t\t.pf\t\t= NFPROTO_IPV4,\ndiff --git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c\nindex 138a24bc76ad..a1a07b338ccf 100644\n--- a/net/ipv4/netfilter/iptable_nat.c\n+++ b/net/ipv4/netfilter/iptable_nat.c\n@@ -67,7 +67,7 @@ static unsigned int iptable_nat_ipv4_local_fn(void *priv,\n \treturn nf_nat_ipv4_local_fn(priv, skb, state, iptable_nat_do_chain);\n }\n \n-static struct nf_hook_ops nf_nat_ipv4_ops[] __read_mostly = {\n+static const struct nf_hook_ops nf_nat_ipv4_ops[] = {\n \t/* Before packet filtering, change destination */\n \t{\n \t\t.hook\t\t= iptable_nat_ipv4_in,\ndiff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c\nindex 2e14ed11a35c..63e4ea0e01f8 100644\n--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c\n+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c\n@@ -174,7 +174,7 @@ static unsigned int ipv4_conntrack_local(void *priv,\n \n /* Connection tracking may drop packets, but never alters them, so\n make it the first hook. */\n-static struct nf_hook_ops ipv4_conntrack_ops[] __read_mostly = {\n+static const struct nf_hook_ops ipv4_conntrack_ops[] = {\n \t{\n \t\t.hook\t\t= ipv4_conntrack_in,\n \t\t.pf\t\t= NFPROTO_IPV4,\ndiff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c\nindex 346bf7ccac08..37fe1616ca0b 100644\n--- a/net/ipv4/netfilter/nf_defrag_ipv4.c\n+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c\n@@ -90,7 +90,7 @@ static unsigned int ipv4_conntrack_defrag(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops ipv4_defrag_ops[] = {\n+static const struct nf_hook_ops ipv4_defrag_ops[] = {\n \t{\n \t\t.hook\t\t= ipv4_conntrack_defrag,\n \t\t.pf\t\t= NFPROTO_IPV4,\ndiff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c\nindex 77f7f8c7d93d..5bd419c1abc8 100644\n--- a/net/ipv6/ila/ila_xlat.c\n+++ b/net/ipv6/ila/ila_xlat.c\n@@ -208,7 +208,7 @@ ila_nf_input(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops ila_nf_hook_ops[] __read_mostly = {\n+static const struct nf_hook_ops ila_nf_hook_ops[] = {\n \t{\n \t\t.hook = ila_nf_input,\n \t\t.pf = NFPROTO_IPV6,\ndiff --git a/net/ipv6/netfilter/ip6t_SYNPROXY.c b/net/ipv6/netfilter/ip6t_SYNPROXY.c\nindex ce203dd729e0..a5cd43d75393 100644\n--- a/net/ipv6/netfilter/ip6t_SYNPROXY.c\n+++ b/net/ipv6/netfilter/ip6t_SYNPROXY.c\n@@ -438,7 +438,7 @@ static unsigned int ipv6_synproxy_hook(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops ipv6_synproxy_ops[] __read_mostly = {\n+static const struct nf_hook_ops ipv6_synproxy_ops[] = {\n \t{\n \t\t.hook\t\t= ipv6_synproxy_hook,\n \t\t.pf\t\t= NFPROTO_IPV6,\ndiff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c\nindex 7d2bd940291f..991512576c8c 100644\n--- a/net/ipv6/netfilter/ip6table_nat.c\n+++ b/net/ipv6/netfilter/ip6table_nat.c\n@@ -69,7 +69,7 @@ static unsigned int ip6table_nat_local_fn(void *priv,\n \treturn nf_nat_ipv6_local_fn(priv, skb, state, ip6table_nat_do_chain);\n }\n \n-static struct nf_hook_ops nf_nat_ipv6_ops[] __read_mostly = {\n+static const struct nf_hook_ops nf_nat_ipv6_ops[] = {\n \t/* Before packet filtering, change destination */\n \t{\n \t\t.hook\t\t= ip6table_nat_in,\ndiff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c\nindex 4e3402486833..f2d2f4a9294b 100644\n--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c\n+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c\n@@ -191,7 +191,7 @@ static unsigned int ipv6_conntrack_local(void *priv,\n \treturn nf_conntrack_in(state->net, PF_INET6, state->hook, skb);\n }\n \n-static struct nf_hook_ops ipv6_conntrack_ops[] __read_mostly = {\n+static const struct nf_hook_ops ipv6_conntrack_ops[] = {\n \t{\n \t\t.hook\t\t= ipv6_conntrack_in,\n \t\t.pf\t\t= NFPROTO_IPV6,\ndiff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c\nindex ada60d1a991b..b326da59257f 100644\n--- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c\n+++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c\n@@ -74,7 +74,7 @@ static unsigned int ipv6_defrag(void *priv,\n \treturn err == 0 ? NF_ACCEPT : NF_DROP;\n }\n \n-static struct nf_hook_ops ipv6_defrag_ops[] = {\n+static const struct nf_hook_ops ipv6_defrag_ops[] = {\n \t{\n \t\t.hook\t\t= ipv6_defrag,\n \t\t.pf\t\t= NFPROTO_IPV6,\ndiff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c\nindex 2ff9d9070c95..5cb7cac9177d 100644\n--- a/net/netfilter/ipvs/ip_vs_core.c\n+++ b/net/netfilter/ipvs/ip_vs_core.c\n@@ -2101,7 +2101,7 @@ ip_vs_forward_icmp_v6(void *priv, struct sk_buff *skb,\n #endif\n \n \n-static struct nf_hook_ops ip_vs_ops[] __read_mostly = {\n+static const struct nf_hook_ops ip_vs_ops[] = {\n \t/* After packet filtering, change source only for VS/NAT */\n \t{\n \t\t.hook\t\t= ip_vs_reply4,\ndiff --git a/security/selinux/hooks.c b/security/selinux/hooks.c\nindex 33fd061305c4..2f2e1338cd3d 100644\n--- a/security/selinux/hooks.c\n+++ b/security/selinux/hooks.c\n@@ -6530,7 +6530,7 @@ security_initcall(selinux_init);\n \n #if defined(CONFIG_NETFILTER)\n \n-static struct nf_hook_ops selinux_nf_ops[] = {\n+static const struct nf_hook_ops selinux_nf_ops[] = {\n \t{\n \t\t.hook =\t\tselinux_ipv4_postroute,\n \t\t.pf =\t\tNFPROTO_IPV4,\ndiff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c\nindex cdeb0f3243dd..e36d17835d4f 100644\n--- a/security/smack/smack_netfilter.c\n+++ b/security/smack/smack_netfilter.c\n@@ -58,7 +58,7 @@ static unsigned int smack_ipv4_output(void *priv,\n \treturn NF_ACCEPT;\n }\n \n-static struct nf_hook_ops smack_nf_ops[] = {\n+static const struct nf_hook_ops smack_nf_ops[] = {\n \t{\n \t\t.hook =\t\tsmack_ipv4_output,\n \t\t.pf =\t\tNFPROTO_IPV4,\n", "prefixes": [ "12/47" ] }