get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219828,
    "url": "http://patchwork.ozlabs.org/api/patches/2219828/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260404153439.30077-2-ja@ssi.bg/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/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": "<20260404153439.30077-2-ja@ssi.bg>",
    "list_archive_url": null,
    "date": "2026-04-04T15:34:37",
    "name": "[PATCHv2,nf-next,1/3] ipvs: show the current conn_tab size to users",
    "commit_ref": null,
    "pull_url": null,
    "state": "under-review",
    "archived": false,
    "hash": "c8cc5b4a696e2f9667672b2c4c2d4e70c8d67c89",
    "submitter": {
        "id": 2825,
        "url": "http://patchwork.ozlabs.org/api/people/2825/?format=api",
        "name": "Julian Anastasov",
        "email": "ja@ssi.bg"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260404153439.30077-2-ja@ssi.bg/mbox/",
    "series": [
        {
            "id": 498737,
            "url": "http://patchwork.ozlabs.org/api/series/498737/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=498737",
            "date": "2026-04-04T15:34:36",
            "name": "IPVS changes, part 4 of 4 - extras",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498737/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219828/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219828/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11634-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=HCWo/3yR;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11634-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=\"HCWo/3yR\"",
            "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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fp08W26Z4z1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 02:37:31 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 0B7EB300D31F\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 15:37:27 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 80561318BA8;\n\tSat,  4 Apr 2026 15:37:26 +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 BA6032765D7;\n\tSat,  4 Apr 2026 15:37:23 +0000 (UTC)",
            "from mx.ssi.bg (localhost [127.0.0.1])\n\tby mx.ssi.bg (Potsfix) with ESMTP id D2F8C21C63;\n\tSat, 04 Apr 2026 18:37:20 +0300 (EEST)",
            "from box.ssi.bg (box.ssi.bg [193.238.174.46])\n\tby mx.ssi.bg (Potsfix) with ESMTPS;\n\tSat, 04 Apr 2026 18:37:19 +0300 (EEST)",
            "from ja.ssi.bg (unknown [213.16.62.126])\n\tby box.ssi.bg (Potsfix) with ESMTPSA id 196926084A;\n\tSat,  4 Apr 2026 18:37:20 +0300 (EEST)",
            "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 634FZDLC030103;\n\tSat, 4 Apr 2026 18:35:13 +0300",
            "(from root@localhost)\n\tby ja.home.ssi.bg (8.18.1/8.18.1/Submit) id 634FZDSd030102;\n\tSat, 4 Apr 2026 18:35:13 +0300"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775317045; cv=none;\n b=kDa6DdjUEEJ3t0O3XZfVavQztdgQiD6R1jADqqbxyP6h2xRMJQnidEaLwaObFBKLjDieW4q2dTkVLkV2nTL9x7Iy++bKBj8qziQQUFTYtK5bjo6g/2KT5fwjIFGPHPoycBVFIaNfW3pibz/z1EXnwITZLpWlPZO735vv8V7cdck=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775317045; c=relaxed/simple;\n\tbh=ZcXaXORmxtirKTUGaslTKH5sbfBLaMwgkxvki80CR6E=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=NS+HpA+eFU1mNwhfSGKX2/YVbvFhPSO1Y0glWbZXvZBv5hiowgqMabTYfrwYm4Fw5VGMEuOnmwFk+O02u5AYmRmGjC2b1ChLrgUCND3t9ZKyt1UgodZYj1t7XpwNLpocFJFLMq+te08r73K+VB/wHkJ20I/yDzBjcycmlubPpAg=",
        "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=HCWo/3yR;\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=MzHtgV0/e4YGyhfcr3shqQby3NCBMZ1kKCFQAr0/Ecg=; b=HCWo/3yREmrI\n\tDN3GYrs1eEG5LbdvRNcGDqyjp7vgCIFV81zjl+Yn1zrTNiWgyJzbVMiYbei3H3uL\n\tLpNFoLR0CCJyNkez6NPXqhNBkIWKXXs6+8Ip6T6NxYPTSV/5FGk/OMRf8+RlyocC\n\tAtAI3zyUuVHWDls0SvaSAc2bEZ6QDhm4Bln6dL0h44FhhsQQxBEvrnmLjeSEO2LJ\n\tlsjGeBQpsdJyy0uG6J+6jEDDJfHcMrOy83b5Ogb/sW39+/V4ouXYaOsuvnxdwNUv\n\tkdeAZVdAC/xyOnbTQT6kPQnWqZkRhStFPxe2R8gaHXjIts0DVwxan40mOYMHNLoN\n\tOZ8Zdg3gi73oV7cwY/+Zz+mkz+Yiq/p4/hhR1v7L8Nzs2aFfQK1f+9IX5kwRDTXw\n\ttNfZ+PmDmbBS2xMHufuIuE9mvisAPbXmVFa+t2+/JWIyqePaTCMGWuXdWGl0+VVg\n\tXsRxXft9xUhPTdJCQON1NUkbQGUSme3eLY4oXA3Atxq7LmAFoFqywXeFJZFxi4wG\n\tMiuALsRUSLSH2G1XbvcEdpfbBY74Sq3LyxQ+nb2/O5SBVl6pn2K6wrJ5oPZui4nc\n\t68Z2xKZeqf7dT73SVuNAoYorkBbhDLPt8wCXkrjrttrQ5yumpNzumbiWeRO5M+kt\n\tU/PJOD1yT3uHdHKXMrC6iZbGJIOAnEI=",
        "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": "[PATCHv2 nf-next 1/3] ipvs: show the current conn_tab size to users",
        "Date": "Sat,  4 Apr 2026 18:34:37 +0300",
        "Message-ID": "<20260404153439.30077-2-ja@ssi.bg>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260404153439.30077-1-ja@ssi.bg>",
        "References": "<20260404153439.30077-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": "As conn_tab is per-net, better to show the current hash table size\nto users instead of the ip_vs_conn_tab_size (max).\n\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\n---\n net/netfilter/ipvs/ip_vs_ctl.c | 26 ++++++++++++++++++++++----\n 1 file changed, 22 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c\nindex b472e564b769..d06d710dac83 100644\n--- a/net/netfilter/ipvs/ip_vs_ctl.c\n+++ b/net/netfilter/ipvs/ip_vs_ctl.c\n@@ -281,6 +281,20 @@ static void est_reload_work_handler(struct work_struct *work)\n \tmutex_unlock(&ipvs->est_mutex);\n }\n \n+static int get_conn_tab_size(struct netns_ipvs *ipvs)\n+{\n+\tconst struct ip_vs_rht *t;\n+\tint size = 0;\n+\n+\trcu_read_lock();\n+\tt = rcu_dereference(ipvs->conn_tab);\n+\tif (t)\n+\t\tsize = t->size;\n+\trcu_read_unlock();\n+\n+\treturn size;\n+}\n+\n int\n ip_vs_use_count_inc(void)\n {\n@@ -2742,10 +2756,13 @@ static void ip_vs_info_seq_stop(struct seq_file *seq, void *v)\n \n static int ip_vs_info_seq_show(struct seq_file *seq, void *v)\n {\n+\tstruct net *net = seq_file_net(seq);\n+\tstruct netns_ipvs *ipvs = net_ipvs(net);\n+\n \tif (v == SEQ_START_TOKEN) {\n \t\tseq_printf(seq,\n \t\t\t\"IP Virtual Server version %d.%d.%d (size=%d)\\n\",\n-\t\t\tNVERSION(IP_VS_VERSION_CODE), ip_vs_conn_tab_size);\n+\t\t\tNVERSION(IP_VS_VERSION_CODE), get_conn_tab_size(ipvs));\n \t\tseq_puts(seq,\n \t\t\t \"Prot LocalAddress:Port Scheduler Flags\\n\");\n \t\tseq_puts(seq,\n@@ -3426,7 +3443,7 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)\n \t\tchar buf[64];\n \n \t\tsprintf(buf, \"IP Virtual Server version %d.%d.%d (size=%d)\",\n-\t\t\tNVERSION(IP_VS_VERSION_CODE), ip_vs_conn_tab_size);\n+\t\t\tNVERSION(IP_VS_VERSION_CODE), get_conn_tab_size(ipvs));\n \t\tif (copy_to_user(user, buf, strlen(buf)+1) != 0) {\n \t\t\tret = -EFAULT;\n \t\t\tgoto out;\n@@ -3438,8 +3455,9 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)\n \tcase IP_VS_SO_GET_INFO:\n \t{\n \t\tstruct ip_vs_getinfo info;\n+\n \t\tinfo.version = IP_VS_VERSION_CODE;\n-\t\tinfo.size = ip_vs_conn_tab_size;\n+\t\tinfo.size = get_conn_tab_size(ipvs);\n \t\tinfo.num_services =\n \t\t\tatomic_read(&ipvs->num_services[IP_VS_AF_INET]);\n \t\tif (copy_to_user(user, &info, sizeof(info)) != 0)\n@@ -4448,7 +4466,7 @@ static int ip_vs_genl_get_cmd(struct sk_buff *skb, struct genl_info *info)\n \t\tif (nla_put_u32(msg, IPVS_INFO_ATTR_VERSION,\n \t\t\t\tIP_VS_VERSION_CODE) ||\n \t\t    nla_put_u32(msg, IPVS_INFO_ATTR_CONN_TAB_SIZE,\n-\t\t\t\tip_vs_conn_tab_size))\n+\t\t\t\tget_conn_tab_size(ipvs)))\n \t\t\tgoto nla_put_failure;\n \t\tbreak;\n \t}\n",
    "prefixes": [
        "PATCHv2",
        "nf-next",
        "1/3"
    ]
}