get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/809816/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 809816,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/809816/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504555874-4168-8-git-send-email-pablo@netfilter.org/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504555874-4168-8-git-send-email-pablo@netfilter.org>",
    "list_archive_url": null,
    "date": "2017-09-04T20:11:09",
    "name": "[07/12] net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT() macros.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "57cb5762c2512d3f252a173696c0ad5b53d1bea9",
    "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": 34,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1504555874-4168-8-git-send-email-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 1451,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/1451/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1451",
            "date": "2017-09-04T20:11:02",
            "name": "[01/12] netfilter: xt_hashlimit: add rate match mode",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1451/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809816/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809816/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@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=netdev-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 3xmLcX5ZqVz9t2R\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  5 Sep 2017 06:12:44 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754240AbdIDUMm (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 4 Sep 2017 16:12:42 -0400",
            "from mail.us.es ([193.147.175.20]:42172 \"EHLO mail.us.es\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1754685AbdIDULa (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 4 Sep 2017 16:11:30 -0400",
            "from antivirus1-rhel7.int (unknown [192.168.2.11])\n\tby mail.us.es (Postfix) with ESMTP id 057E5532F92\n\tfor <netdev@vger.kernel.org>; Mon,  4 Sep 2017 22:11:03 +0200 (CEST)",
            "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id EBE90B502A\n\tfor <netdev@vger.kernel.org>; Mon,  4 Sep 2017 22:11:02 +0200 (CEST)",
            "by antivirus1-rhel7.int (Postfix, from userid 99)\n\tid E115CB5041; Mon,  4 Sep 2017 22:11:02 +0200 (CEST)",
            "from antivirus1-rhel7.int (localhost [127.0.0.1])\n\tby antivirus1-rhel7.int (Postfix) with ESMTP id 9FF78B502A;\n\tMon,  4 Sep 2017 22:11:00 +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 22:11:00 +0200 (CEST)",
            "from salvia.here (129.166.216.87.static.jazztel.es\n\t[87.216.166.129]) (Authenticated sender: pneira@us.es)\n\tby entrada.int (Postfix) with ESMTPA id 463A54265A20;\n\tMon,  4 Sep 2017 22:11:00 +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 07/12] net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT()\n\tmacros.",
        "Date": "Mon,  4 Sep 2017 22:11:09 +0200",
        "Message-Id": "<1504555874-4168-8-git-send-email-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1504555874-4168-1-git-send-email-pablo@netfilter.org>",
        "References": "<1504555874-4168-1-git-send-email-pablo@netfilter.org>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Varsha Rao <rvarsha016@gmail.com>\n\nThis patch removes CONFIG_NETFILTER_DEBUG and _ASSERT() macros as they\nare no longer required. Replace _ASSERT() macros with WARN_ON().\n\nSigned-off-by: Varsha Rao <rvarsha016@gmail.com>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n arch/parisc/configs/c3000_defconfig  |  1 -\n arch/sh/configs/se7751_defconfig     |  1 -\n include/net/netfilter/nf_conntrack.h |  6 ------\n net/Kconfig                          |  7 -------\n net/bridge/netfilter/ebtables.c      | 20 ++++++++------------\n net/ipv4/netfilter/ip_tables.c       | 12 +++---------\n net/ipv6/netfilter/ip6_tables.c      | 12 +++---------\n 7 files changed, 14 insertions(+), 45 deletions(-)",
    "diff": "diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig\nindex 0764d3971cf6..8d41a73bd71b 100644\n--- a/arch/parisc/configs/c3000_defconfig\n+++ b/arch/parisc/configs/c3000_defconfig\n@@ -31,7 +31,6 @@ CONFIG_IP_PNP_BOOTP=y\n CONFIG_INET6_IPCOMP=m\n CONFIG_IPV6_TUNNEL=m\n CONFIG_NETFILTER=y\n-CONFIG_NETFILTER_DEBUG=y\n CONFIG_NET_PKTGEN=m\n CONFIG_UEVENT_HELPER_PATH=\"/sbin/hotplug\"\n CONFIG_DEVTMPFS=y\ndiff --git a/arch/sh/configs/se7751_defconfig b/arch/sh/configs/se7751_defconfig\nindex 75c92fc1876b..56b5e4ce8d4a 100644\n--- a/arch/sh/configs/se7751_defconfig\n+++ b/arch/sh/configs/se7751_defconfig\n@@ -28,7 +28,6 @@ CONFIG_IP_PNP_RARP=y\n # CONFIG_INET_LRO is not set\n # CONFIG_IPV6 is not set\n CONFIG_NETFILTER=y\n-CONFIG_NETFILTER_DEBUG=y\n CONFIG_IP_NF_QUEUE=y\n CONFIG_MTD=y\n CONFIG_MTD_PARTITIONS=y\ndiff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h\nindex 0385cb08c478..fdc9c64a1c94 100644\n--- a/include/net/netfilter/nf_conntrack.h\n+++ b/include/net/netfilter/nf_conntrack.h\n@@ -44,12 +44,6 @@ union nf_conntrack_expect_proto {\n #include <linux/types.h>\n #include <linux/skbuff.h>\n \n-#ifdef CONFIG_NETFILTER_DEBUG\n-#define NF_CT_ASSERT(x)\t\tWARN_ON(!(x))\n-#else\n-#define NF_CT_ASSERT(x)\n-#endif\n-\n #include <net/netfilter/ipv4/nf_conntrack_ipv4.h>\n #include <net/netfilter/ipv6/nf_conntrack_ipv6.h>\n \ndiff --git a/net/Kconfig b/net/Kconfig\nindex e0e7c62c88f0..9dba2715919d 100644\n--- a/net/Kconfig\n+++ b/net/Kconfig\n@@ -166,13 +166,6 @@ menuconfig NETFILTER\n \n if NETFILTER\n \n-config NETFILTER_DEBUG\n-\tbool \"Network packet filtering debugging\"\n-\tdepends on NETFILTER\n-\thelp\n-\t  You can say Y here if you want to get additional messages useful in\n-\t  debugging the netfilter code.\n-\n config NETFILTER_ADVANCED\n \tbool \"Advanced netfilter configuration\"\n \tdepends on NETFILTER\ndiff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c\nindex 54c7ef4e970e..83951f978445 100644\n--- a/net/bridge/netfilter/ebtables.c\n+++ b/net/bridge/netfilter/ebtables.c\n@@ -252,13 +252,11 @@ unsigned int ebt_do_table(struct sk_buff *skb,\n \t\t}\n \t\tif (verdict == EBT_RETURN) {\n letsreturn:\n-#ifdef CONFIG_NETFILTER_DEBUG\n-\t\t\tif (sp == 0) {\n-\t\t\t\tBUGPRINT(\"RETURN on base chain\");\n+\t\t\tif (WARN(sp == 0, \"RETURN on base chain\")) {\n \t\t\t\t/* act like this is EBT_CONTINUE */\n \t\t\t\tgoto letscontinue;\n \t\t\t}\n-#endif\n+\n \t\t\tsp--;\n \t\t\t/* put all the local variables right */\n \t\t\ti = cs[sp].n;\n@@ -271,26 +269,24 @@ unsigned int ebt_do_table(struct sk_buff *skb,\n \t\t}\n \t\tif (verdict == EBT_CONTINUE)\n \t\t\tgoto letscontinue;\n-#ifdef CONFIG_NETFILTER_DEBUG\n-\t\tif (verdict < 0) {\n-\t\t\tBUGPRINT(\"bogus standard verdict\\n\");\n+\n+\t\tif (WARN(verdict < 0, \"bogus standard verdict\\n\")) {\n \t\t\tread_unlock_bh(&table->lock);\n \t\t\treturn NF_DROP;\n \t\t}\n-#endif\n+\n \t\t/* jump to a udc */\n \t\tcs[sp].n = i + 1;\n \t\tcs[sp].chaininfo = chaininfo;\n \t\tcs[sp].e = ebt_next_entry(point);\n \t\ti = 0;\n \t\tchaininfo = (struct ebt_entries *) (base + verdict);\n-#ifdef CONFIG_NETFILTER_DEBUG\n-\t\tif (chaininfo->distinguisher) {\n-\t\t\tBUGPRINT(\"jump to non-chain\\n\");\n+\n+\t\tif (WARN(chaininfo->distinguisher, \"jump to non-chain\\n\")) {\n \t\t\tread_unlock_bh(&table->lock);\n \t\t\treturn NF_DROP;\n \t\t}\n-#endif\n+\n \t\tnentries = chaininfo->nentries;\n \t\tpoint = (struct ebt_entry *)chaininfo->data;\n \t\tcounter_base = cb_base + chaininfo->counter_offset;\ndiff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c\nindex ce1d97579ce8..576cba2b57e9 100644\n--- a/net/ipv4/netfilter/ip_tables.c\n+++ b/net/ipv4/netfilter/ip_tables.c\n@@ -35,12 +35,6 @@ MODULE_LICENSE(\"GPL\");\n MODULE_AUTHOR(\"Netfilter Core Team <coreteam@netfilter.org>\");\n MODULE_DESCRIPTION(\"IPv4 packet filter\");\n \n-#ifdef CONFIG_NETFILTER_DEBUG\n-#define IP_NF_ASSERT(x)\t\tWARN_ON(!(x))\n-#else\n-#define IP_NF_ASSERT(x)\n-#endif\n-\n void *ipt_alloc_initial_table(const struct xt_table *info)\n {\n \treturn xt_alloc_initial_table(ipt, IPT);\n@@ -263,7 +257,7 @@ ipt_do_table(struct sk_buff *skb,\n \tacpar.hotdrop = false;\n \tacpar.state   = state;\n \n-\tIP_NF_ASSERT(table->valid_hooks & (1 << hook));\n+\tWARN_ON(!(table->valid_hooks & (1 << hook)));\n \tlocal_bh_disable();\n \taddend = xt_write_recseq_begin();\n \tprivate = table->private;\n@@ -293,7 +287,7 @@ ipt_do_table(struct sk_buff *skb,\n \t\tconst struct xt_entry_match *ematch;\n \t\tstruct xt_counters *counter;\n \n-\t\tIP_NF_ASSERT(e);\n+\t\tWARN_ON(!e);\n \t\tif (!ip_packet_match(ip, indev, outdev,\n \t\t    &e->ip, acpar.fragoff)) {\n  no_match:\n@@ -312,7 +306,7 @@ ipt_do_table(struct sk_buff *skb,\n \t\tADD_COUNTER(*counter, skb->len, 1);\n \n \t\tt = ipt_get_target(e);\n-\t\tIP_NF_ASSERT(t->u.kernel.target);\n+\t\tWARN_ON(!t->u.kernel.target);\n \n #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)\n \t\t/* The packet is traced: log it */\ndiff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c\nindex 9f6644958e5e..54b1e75eded1 100644\n--- a/net/ipv6/netfilter/ip6_tables.c\n+++ b/net/ipv6/netfilter/ip6_tables.c\n@@ -39,12 +39,6 @@ MODULE_LICENSE(\"GPL\");\n MODULE_AUTHOR(\"Netfilter Core Team <coreteam@netfilter.org>\");\n MODULE_DESCRIPTION(\"IPv6 packet filter\");\n \n-#ifdef CONFIG_NETFILTER_DEBUG\n-#define IP_NF_ASSERT(x)\tWARN_ON(!(x))\n-#else\n-#define IP_NF_ASSERT(x)\n-#endif\n-\n void *ip6t_alloc_initial_table(const struct xt_table *info)\n {\n \treturn xt_alloc_initial_table(ip6t, IP6T);\n@@ -284,7 +278,7 @@ ip6t_do_table(struct sk_buff *skb,\n \tacpar.hotdrop = false;\n \tacpar.state   = state;\n \n-\tIP_NF_ASSERT(table->valid_hooks & (1 << hook));\n+\tWARN_ON(!(table->valid_hooks & (1 << hook)));\n \n \tlocal_bh_disable();\n \taddend = xt_write_recseq_begin();\n@@ -315,7 +309,7 @@ ip6t_do_table(struct sk_buff *skb,\n \t\tconst struct xt_entry_match *ematch;\n \t\tstruct xt_counters *counter;\n \n-\t\tIP_NF_ASSERT(e);\n+\t\tWARN_ON(!e);\n \t\tacpar.thoff = 0;\n \t\tif (!ip6_packet_match(skb, indev, outdev, &e->ipv6,\n \t\t    &acpar.thoff, &acpar.fragoff, &acpar.hotdrop)) {\n@@ -335,7 +329,7 @@ ip6t_do_table(struct sk_buff *skb,\n \t\tADD_COUNTER(*counter, skb->len, 1);\n \n \t\tt = ip6t_get_target_c(e);\n-\t\tIP_NF_ASSERT(t->u.kernel.target);\n+\t\tWARN_ON(!t->u.kernel.target);\n \n #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE)\n \t\t/* The packet is traced: log it */\n",
    "prefixes": [
        "07/12"
    ]
}