Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2221778/?format=api
{ "id": 2221778, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221778/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260410112352.23599-2-fw@strlen.de/", "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": "<20260410112352.23599-2-fw@strlen.de>", "list_archive_url": null, "date": "2026-04-10T11:23:42", "name": "[net-next,01/11] ipvs: show the current conn_tab size to users", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": true, "hash": "c8cc5b4a696e2f9667672b2c4c2d4e70c8d67c89", "submitter": { "id": 1025, "url": "http://patchwork.ozlabs.org/api/1.2/people/1025/?format=api", "name": "Florian Westphal", "email": "fw@strlen.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260410112352.23599-2-fw@strlen.de/mbox/", "series": [ { "id": 499444, "url": "http://patchwork.ozlabs.org/api/1.2/series/499444/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499444", "date": "2026-04-10T11:23:46", "name": "[net-next,01/11] ipvs: show the current conn_tab size to users", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499444/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221778/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221778/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <netfilter-devel+bounces-11797-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 spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11797-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.216.245.30", "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4fsZMq1mR3z1yGb\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 21:29:43 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 2D9093047E40\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 11:24:06 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 46B2739DBEA;\n\tFri, 10 Apr 2026 11:24:04 +0000 (UTC)", "from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc\n [91.216.245.30])\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 3C97A284B37;\n\tFri, 10 Apr 2026 11:24:02 +0000 (UTC)", "by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)\n\tid 966566065F; Fri, 10 Apr 2026 13:24:00 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775820244; cv=none;\n b=kphW/GrCl/YM+Bl/LRY60uXpwExDJQ5yOEEtEmXdso7cRnBDnMQxcG9m6l1nXWYC9LG1wNRIsknamYCkInkeW2jgT9AUMjoYZrpen9F4i6HsUORMNgUD8UrmKZpOQghZRexqDKDDUZxbcEd9C1JoZue6vhRH5hfmBSjQnYBbm4w=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775820244; c=relaxed/simple;\n\tbh=1fWEgmOFVGjp9hv2Jv4wS+znp2ySD6MMvhLvl8kgT7U=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=BWqWM3vG+d+WtSV0ysBWUSRon4nq7G3ZtOosEKy+wlfwYxBh7bmehg7DbxAVT085Py07VNubNwGfjm+9vmd0uLcYmwfxwUBMjbB4Giq56H7tIV+dcJkjRDViO31sZQqkYXrVzWxYmLTYnPOWhx7B/A9HaYaJGoNox7gwIz+MLPM=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc;\n arc=none smtp.client-ip=91.216.245.30", "From": "Florian Westphal <fw@strlen.de>", "To": "<netdev@vger.kernel.org>", "Cc": "Paolo Abeni <pabeni@redhat.com>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tEric Dumazet <edumazet@google.com>,\n\tJakub Kicinski <kuba@kernel.org>,\n\t<netfilter-devel@vger.kernel.org>,\n\tpablo@netfilter.org", "Subject": "[PATCH net-next 01/11] ipvs: show the current conn_tab size to users", "Date": "Fri, 10 Apr 2026 13:23:42 +0200", "Message-ID": "<20260410112352.23599-2-fw@strlen.de>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260410112352.23599-1-fw@strlen.de>", "References": "<20260410112352.23599-1-fw@strlen.de>", "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": "From: Julian Anastasov <ja@ssi.bg>\n\nAs 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>\nSigned-off-by: Florian Westphal <fw@strlen.de>\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 a1f070cb76c3..1322dd54ed7c 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@@ -2741,10 +2755,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@@ -3425,7 +3442,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@@ -3437,8 +3454,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@@ -4447,7 +4465,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": [ "net-next", "01/11" ] }