Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/807459/?format=api
{ "id": 807459, "url": "http://patchwork.ozlabs.org/api/1.2/patches/807459/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20170830080712.26076-2-rvarsha016@gmail.com/", "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": "<20170830080712.26076-2-rvarsha016@gmail.com>", "list_archive_url": null, "date": "2017-08-30T08:07:12", "name": "[nf-next] net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT() macros.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "15e028cacf64db2010ef3ff3195d7197aa2589b3", "submitter": { "id": 71308, "url": "http://patchwork.ozlabs.org/api/1.2/people/71308/?format=api", "name": "Varsha Rao", "email": "rvarsha016@gmail.com" }, "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/20170830080712.26076-2-rvarsha016@gmail.com/mbox/", "series": [ { "id": 545, "url": "http://patchwork.ozlabs.org/api/1.2/series/545/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=545", "date": "2017-08-30T08:07:12", "name": "[nf-next] net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT() macros.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/545/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807459/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807459/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>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"TruGN1la\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhym42GW9z9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 18:07:32 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751317AbdH3IHb (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 30 Aug 2017 04:07:31 -0400", "from mail-pf0-f193.google.com ([209.85.192.193]:35832 \"EHLO\n\tmail-pf0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750983AbdH3IHa (ORCPT\n\t<rfc822;netfilter-devel@vger.kernel.org>);\n\tWed, 30 Aug 2017 04:07:30 -0400", "by mail-pf0-f193.google.com with SMTP id g13so3892085pfm.2\n\tfor <netfilter-devel@vger.kernel.org>;\n\tWed, 30 Aug 2017 01:07:30 -0700 (PDT)", "from localhost.localdomain ([117.211.102.154])\n\tby smtp.googlemail.com with ESMTPSA id\n\tj16sm4583165pga.81.2017.08.30.01.07.27\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 30 Aug 2017 01:07:29 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=TZpdtJsZtV2IGR8dNzt5x46VQmIOwZ6cMpOJP7N6FaI=;\n\tb=TruGN1la4b+uBRTnxPcQVtPKscvrwVKrqpiT4i+VvrwGQpeASVwTXLrLLwiYzLI9u5\n\tkr3oEXTENIUwURJelwjPRkKTlLLR9za9SQR3q9LfAZMK3lgr6wNASa/eTgiAbsERXX+8\n\tPUS1Md7GcUk/+LIG2zQmnXbkkZKj9SYEwXgt3xpM7DeuClXw0vpuuzM//Zm0G2dMNov6\n\tRK2TiAoJi67ZBjmsflclPsb9+ERG4Us7jn7rNqVzORFSIr042ajKQ3he/fvhd1dxvCFN\n\tm2AAd/IDstN+2U74rZpp9NMdGj+OUXA6GtHDNvPlFOXu2xKsJ+b65auq+HFeOUmRfgqj\n\t0cBA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=TZpdtJsZtV2IGR8dNzt5x46VQmIOwZ6cMpOJP7N6FaI=;\n\tb=aYwBMiaEsJQ6qHyDmqlZsUveQsdqgSRJCdODPUWuYcZGGGcdGVzgtqMgtuAVdCyTZ/\n\tJbeaWl+WrRrx/A6k50upi188i4hq9SfIqEczH52CPlVqwJKvHFXoJo2Zn0z/0vOkdyXq\n\ttOHIuY6+Y9Q+wJtF2+oY/WXw4EW+MQKwa/0+w9suoSKDZcaaX7Fi8NWeu5z08TRlYUyz\n\tnY0xTe/m/P/cXpQ1ke1Ma318bSyEZKArSkaaGhb76Wl2GAz1NDt2ek7JeHfvbpDJzucB\n\t2cj4AsLFPR5VAVukMZgkRN3RGG2QGsYAlVmlg4PgKFhNi96pagYzT7YrYL/yq/BFzVi8\n\toprQ==", "X-Gm-Message-State": "AHYfb5i/u67QAacAT2T4mmr5n9SAmWzmo+AkqJEDV9ZHBpGD2YdjZma9\n\tkgippgVTxZdTAw==", "X-Google-Smtp-Source": "ADKCNb5TISo5bsNDnoGOb1VSmFWSKALE6jpCbI7F3ihhYLkJ4MUnB/3fzm4TL5g4Xc+ydCxOWSiwaA==", "X-Received": "by 10.98.64.208 with SMTP id f77mr769380pfd.25.1504080449542;\n\tWed, 30 Aug 2017 01:07:29 -0700 (PDT)", "From": "Varsha Rao <rvarsha016@gmail.com>", "To": "Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org", "Cc": "Varsha Rao <rvarsha016@gmail.com>", "Subject": "[PATCH nf-next] net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT()\n\tmacros.", "Date": "Wed, 30 Aug 2017 13:37:12 +0530", "Message-Id": "<20170830080712.26076-2-rvarsha016@gmail.com>", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170830080712.26076-1-rvarsha016@gmail.com>", "References": "<20170830080712.26076-1-rvarsha016@gmail.com>", "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": "This 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>\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 8e8f0e34f817..0f19c59021ce 100644\n--- a/arch/parisc/configs/c3000_defconfig\n+++ b/arch/parisc/configs/c3000_defconfig\n@@ -36,7 +36,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_IP_NF_QUEUE=m\n CONFIG_NET_PKTGEN=m\n CONFIG_UEVENT_HELPER_PATH=\"/sbin/hotplug\"\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 7d57ef34b79c..ceb0b3dda182 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 2aea896f5708..bd1a5c915f92 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": [ "nf-next" ] }