get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2214912,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2214912/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260323162523.44964-3-ja@ssi.bg/",
    "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": "<20260323162523.44964-3-ja@ssi.bg>",
    "list_archive_url": null,
    "date": "2026-03-23T16:25:22",
    "name": "[nf-next,2/3] ipvs: add ip_vs_status info",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "370a866eb5dd475265c60985b21e35d410bf16b4",
    "submitter": {
        "id": 2825,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/2825/?format=api",
        "name": "Julian Anastasov",
        "email": "ja@ssi.bg"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260323162523.44964-3-ja@ssi.bg/mbox/",
    "series": [
        {
            "id": 497148,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/497148/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=497148",
            "date": "2026-03-23T16:25:21",
            "name": "IPVS changes, part 4 of 4 - extras",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497148/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2214912/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2214912/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11374-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=ssi.bg header.i=@ssi.bg header.a=rsa-sha256\n header.s=ssi header.b=nkLTMGIQ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11374-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=\"nkLTMGIQ\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=193.238.174.39",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=ssi.bg"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fffbh6TXQz1xy3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 24 Mar 2026 04:02:08 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id B557E31F2FA1\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 23 Mar 2026 16:32:12 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 70DA73BE621;\n\tMon, 23 Mar 2026 16:31:46 +0000 (UTC)",
            "from mx.ssi.bg (mx.ssi.bg [193.238.174.39])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 548F13BE62B;\n\tMon, 23 Mar 2026 16:31:39 +0000 (UTC)",
            "from mx.ssi.bg (localhost [127.0.0.1])\n\tby mx.ssi.bg (Potsfix) with ESMTP id 70F34212BB;\n\tMon, 23 Mar 2026 18:31:21 +0200 (EET)",
            "from box.ssi.bg (box.ssi.bg [193.238.174.46])\n\tby mx.ssi.bg (Potsfix) with ESMTPS;\n\tMon, 23 Mar 2026 18:31:19 +0200 (EET)",
            "from ja.ssi.bg (unknown [213.16.62.126])\n\tby box.ssi.bg (Potsfix) with ESMTPSA id 4D8BF62AF1;\n\tMon, 23 Mar 2026 18:31:20 +0200 (EET)",
            "from ja.home.ssi.bg (localhost.localdomain [127.0.0.1])\n\tby ja.ssi.bg (8.18.1/8.18.1) with ESMTP id 62NGQXYC045009;\n\tMon, 23 Mar 2026 18:26:33 +0200",
            "(from root@localhost)\n\tby ja.home.ssi.bg (8.18.1/8.18.1/Submit) id 62NGQW33045008;\n\tMon, 23 Mar 2026 18:26:32 +0200"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774283505; cv=none;\n b=i2aID6Cb1QRiyWCVYoBS4vL3fkszupS1dkt2++7FhgK1ehddlnT//RGYnERJnL9IlsQulDSYmXsW+A9XhnsVNseD/I2n9XpFceblDCYqgTN2aPAWsBGX5mbdvOnK2fK4FtZ4irp6qIMmEHvhswp2/ORNwPT2wAjksLfOZysYVaw=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774283505; c=relaxed/simple;\n\tbh=atAkJLtU5nYn/JXog+hmXXuCBTAGDkx0Nki/hrEAa9I=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Tv7Fpp7I1Bwg2bcACUm/OhQUfPZT6H19uKkYIpwA7vZrQzLiUb0HcUSAhOhtvijTT19bxeh2wzyoKPfct+w19z+i0tWJmZNxhD0ybLcac6VNpOP4SsqQ8PH7uwGvMWcNSr4xF8CSw/GWXpxNrZLiqkwId1C9UvjygCw4ii4Ixa0=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg;\n spf=pass smtp.mailfrom=ssi.bg;\n dkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=nkLTMGIQ;\n arc=none smtp.client-ip=193.238.174.39",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ssi.bg; h=cc:cc\n\t:content-transfer-encoding:date:from:from:in-reply-to:message-id\n\t:mime-version:references:reply-to:subject:subject:to:to; s=ssi;\n\t bh=SOSpW0s31J9OvTM+VtVBOknK5idkJa8tww1qLABg+5Q=; b=nkLTMGIQcxqp\n\tUg60lwg3sAiOLe0TZawra5tYjjVsn19fZ7BmxnnQLuxDZsCU8EWUIRPDNdVGQeB5\n\tVUBXbX7ki7JTnqL/5oWdRYk/PJfnyNmBULfTgSvUf+Lxn/57TeEbRnJaT+/zCk/H\n\tbqnYiSaW/86eQWYj/qb48qj8846PYp/ZarytMWcbDEBfJlK1kzWH+5cJ76/c7F1+\n\tcacmXCd4HNgvDZfBD+ztTxJyJhE49DlVoW2k+sslvwRqiYet5IZE5689JEdjHCru\n\tWbGB9sxKb5yzmQUF90w5wHyv5b/jazSGnAqmc3X0o2C5Jbfsn0e0D/7a4ipAWD9J\n\tfhy3eXQaO2NURZ8u4FpSmQNLRuFV6jaXXRdq4ytxP+PEfwnvbDA1b601EJwZN7tJ\n\tTuK5xcXpMpz44CcFqIFm0mPuHNf6ZCPBdCRa4ra6ehSjC20ZEgHkVTKYnUMWHPmz\n\tnogHHdrtknIfrwDHyH8LZCBoVZh0KlQ6YDKzujiHLzSV56fkI4RSYbQJBeE6ZaOe\n\tGZT6ngiZa85/NEp8Tr6JoRNUZ4B+xn3dBOveknc25RRHAiDdNtANgiiU+U5EdnQu\n\tcZyPlYmTwDm4k5GjG5z5HO7fdM9gvyhYTKhJsoiFonhr8vFJnja+Sxr1D/zB51MI\n\t9Tqv1XTjVFvezDinQp+5ZHT7RvswDOg=",
        "From": "Julian Anastasov <ja@ssi.bg>",
        "To": "Simon Horman <horms@verge.net.au>",
        "Cc": "Pablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>,\n        lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org,\n        Dust Li <dust.li@linux.alibaba.com>,\n        Jiejian Wu <jiejian@linux.alibaba.com>",
        "Subject": "[PATCH nf-next 2/3] ipvs: add ip_vs_status info",
        "Date": "Mon, 23 Mar 2026 18:25:22 +0200",
        "Message-ID": "<20260323162523.44964-3-ja@ssi.bg>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260323162523.44964-1-ja@ssi.bg>",
        "References": "<20260323162523.44964-1-ja@ssi.bg>",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Add /proc/net/ip_vs_status to show current state of IPVS.\n\nThe motivation for this new /proc interface is to provide the output\nfor the users to help them decide when to tune the load factor for\nhash tables, which is possible with the new sysctl knobs coming in\nfollowup patch.\n\nThe output also includes information for the kthreads used for stats.\n\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\n---\n net/netfilter/ipvs/ip_vs_ctl.c | 145 +++++++++++++++++++++++++++++++++\n 1 file changed, 145 insertions(+)",
    "diff": "diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c\nindex 3129b15dadc2..88c3f145fa4a 100644\n--- a/net/netfilter/ipvs/ip_vs_ctl.c\n+++ b/net/netfilter/ipvs/ip_vs_ctl.c\n@@ -2919,6 +2919,144 @@ static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v)\n \n \treturn 0;\n }\n+\n+static int ip_vs_status_show(struct seq_file *seq, void *v)\n+{\n+\tstruct net *net = seq_file_single_net(seq);\n+\tstruct netns_ipvs *ipvs = net_ipvs(net);\n+\tunsigned int resched_score = 0;\n+\tstruct ip_vs_conn_hnode *hn;\n+\tstruct hlist_bl_head *head;\n+\tstruct ip_vs_service *svc;\n+\tstruct ip_vs_rht *t, *pt;\n+\tstruct hlist_bl_node *e;\n+\tint old_gen, new_gen;\n+\tu32 counts[8];\n+\tu32 bucket;\n+\tint count;\n+\tu32 sum1;\n+\tu32 sum;\n+\tint i;\n+\n+\trcu_read_lock();\n+\n+\tt = rcu_dereference(ipvs->conn_tab);\n+\n+\tseq_printf(seq, \"Conns:\\t%d\\n\", atomic_read(&ipvs->conn_count));\n+\tseq_printf(seq, \"Conn buckets:\\t%d (%d bits, lfactor %d)\\n\",\n+\t\t   t ? t->size : 0, t ? t->bits : 0, t ? t->lfactor : 0);\n+\n+\tif (!atomic_read(&ipvs->conn_count))\n+\t\tgoto after_conns;\n+\told_gen = atomic_read(&ipvs->conn_tab_changes);\n+\n+repeat_conn:\n+\tsmp_rmb(); /* ipvs->conn_tab and conn_tab_changes */\n+\tmemset(counts, 0, sizeof(counts));\n+\tip_vs_rht_for_each_table_rcu(ipvs->conn_tab, t, pt) {\n+\t\tfor (bucket = 0; bucket < t->size; bucket++) {\n+\t\t\tDECLARE_IP_VS_RHT_WALK_BUCKET_RCU();\n+\n+\t\t\tcount = 0;\n+\t\t\tresched_score++;\n+\t\t\tip_vs_rht_walk_bucket_rcu(t, bucket, head) {\n+\t\t\t\tcount = 0;\n+\t\t\t\thlist_bl_for_each_entry_rcu(hn, e, head, node)\n+\t\t\t\t\tcount++;\n+\t\t\t}\n+\t\t\tresched_score += count;\n+\t\t\tif (resched_score >= 100) {\n+\t\t\t\tresched_score = 0;\n+\t\t\t\tcond_resched_rcu();\n+\t\t\t\tnew_gen = atomic_read(&ipvs->conn_tab_changes);\n+\t\t\t\t/* New table installed ? */\n+\t\t\t\tif (old_gen != new_gen) {\n+\t\t\t\t\told_gen = new_gen;\n+\t\t\t\t\tgoto repeat_conn;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tcounts[min(count, (int)ARRAY_SIZE(counts) - 1)]++;\n+\t\t}\n+\t}\n+\tfor (sum = 0, i = 0; i < ARRAY_SIZE(counts); i++)\n+\t\tsum += counts[i];\n+\tsum1 = sum - counts[0];\n+\tseq_printf(seq, \"Conn buckets empty:\\t%u (%lu%%)\\n\",\n+\t\t   counts[0], (unsigned long)counts[0] * 100 / max(sum, 1U));\n+\tfor (i = 1; i < ARRAY_SIZE(counts); i++) {\n+\t\tif (!counts[i])\n+\t\t\tcontinue;\n+\t\tseq_printf(seq, \"Conn buckets len-%d:\\t%u (%lu%%)\\n\",\n+\t\t\t   i, counts[i],\n+\t\t\t   (unsigned long)counts[i] * 100 / max(sum1, 1U));\n+\t}\n+\n+after_conns:\n+\tt = rcu_dereference(ipvs->svc_table);\n+\n+\tcount = ip_vs_get_num_services(ipvs);\n+\tseq_printf(seq, \"Services:\\t%d\\n\", count);\n+\tseq_printf(seq, \"Service buckets:\\t%d (%d bits, lfactor %d)\\n\",\n+\t\t   t ? t->size : 0, t ? t->bits : 0, t ? t->lfactor : 0);\n+\n+\tif (!count)\n+\t\tgoto after_svc;\n+\told_gen = atomic_read(&ipvs->svc_table_changes);\n+\n+repeat_svc:\n+\tsmp_rmb(); /* ipvs->svc_table and svc_table_changes */\n+\tmemset(counts, 0, sizeof(counts));\n+\tip_vs_rht_for_each_table_rcu(ipvs->svc_table, t, pt) {\n+\t\tfor (bucket = 0; bucket < t->size; bucket++) {\n+\t\t\tDECLARE_IP_VS_RHT_WALK_BUCKET_RCU();\n+\n+\t\t\tcount = 0;\n+\t\t\tresched_score++;\n+\t\t\tip_vs_rht_walk_bucket_rcu(t, bucket, head) {\n+\t\t\t\tcount = 0;\n+\t\t\t\thlist_bl_for_each_entry_rcu(svc, e, head,\n+\t\t\t\t\t\t\t    s_list)\n+\t\t\t\t\tcount++;\n+\t\t\t}\n+\t\t\tresched_score += count;\n+\t\t\tif (resched_score >= 100) {\n+\t\t\t\tresched_score = 0;\n+\t\t\t\tcond_resched_rcu();\n+\t\t\t\tnew_gen = atomic_read(&ipvs->svc_table_changes);\n+\t\t\t\t/* New table installed ? */\n+\t\t\t\tif (old_gen != new_gen) {\n+\t\t\t\t\told_gen = new_gen;\n+\t\t\t\t\tgoto repeat_svc;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t\tcounts[min(count, (int)ARRAY_SIZE(counts) - 1)]++;\n+\t\t}\n+\t}\n+\tfor (sum = 0, i = 0; i < ARRAY_SIZE(counts); i++)\n+\t\tsum += counts[i];\n+\tsum1 = sum - counts[0];\n+\tseq_printf(seq, \"Service buckets empty:\\t%u (%lu%%)\\n\",\n+\t\t   counts[0], (unsigned long)counts[0] * 100 / max(sum, 1U));\n+\tfor (i = 1; i < ARRAY_SIZE(counts); i++) {\n+\t\tif (!counts[i])\n+\t\t\tcontinue;\n+\t\tseq_printf(seq, \"Service buckets len-%d:\\t%u (%lu%%)\\n\",\n+\t\t\t   i, counts[i],\n+\t\t\t   (unsigned long)counts[i] * 100 / max(sum1, 1U));\n+\t}\n+\n+after_svc:\n+\tseq_printf(seq, \"Stats thread slots:\\t%d (max %lu)\\n\",\n+\t\t   ipvs->est_kt_count, ipvs->est_max_threads);\n+\tseq_printf(seq, \"Stats chain max len:\\t%d\\n\", ipvs->est_chain_max);\n+\tseq_printf(seq, \"Stats thread ests:\\t%d\\n\",\n+\t\t   ipvs->est_chain_max * IPVS_EST_CHAIN_FACTOR *\n+\t\t   IPVS_EST_NTICKS);\n+\n+\trcu_read_unlock();\n+\treturn 0;\n+}\n+\n #endif\n \n /*\n@@ -4826,6 +4964,9 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)\n \t\t\t\t    ipvs->net->proc_net,\n \t\t\t\t    ip_vs_stats_percpu_show, NULL))\n \t\tgoto err_percpu;\n+\tif (!proc_create_net_single(\"ip_vs_status\", 0, ipvs->net->proc_net,\n+\t\t\t\t    ip_vs_status_show, NULL))\n+\t\tgoto err_status;\n #endif\n \n \tret = ip_vs_control_net_init_sysctl(ipvs);\n@@ -4836,6 +4977,9 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)\n \n err:\n #ifdef CONFIG_PROC_FS\n+\tremove_proc_entry(\"ip_vs_status\", ipvs->net->proc_net);\n+\n+err_status:\n \tremove_proc_entry(\"ip_vs_stats_percpu\", ipvs->net->proc_net);\n \n err_percpu:\n@@ -4861,6 +5005,7 @@ void __net_exit ip_vs_control_net_cleanup(struct netns_ipvs *ipvs)\n \tip_vs_control_net_cleanup_sysctl(ipvs);\n \tcancel_delayed_work_sync(&ipvs->est_reload_work);\n #ifdef CONFIG_PROC_FS\n+\tremove_proc_entry(\"ip_vs_status\", ipvs->net->proc_net);\n \tremove_proc_entry(\"ip_vs_stats_percpu\", ipvs->net->proc_net);\n \tremove_proc_entry(\"ip_vs_stats\", ipvs->net->proc_net);\n \tremove_proc_entry(\"ip_vs\", ipvs->net->proc_net);\n",
    "prefixes": [
        "nf-next",
        "2/3"
    ]
}