{"id":2214938,"url":"http://patchwork.ozlabs.org/api/1.2/covers/2214938/?format=json","web_url":"http://patchwork.ozlabs.org/project/netfilter-devel/cover/20260323162523.44964-1-ja@ssi.bg/","project":{"id":26,"url":"http://patchwork.ozlabs.org/api/1.2/projects/26/?format=json","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-1-ja@ssi.bg>","list_archive_url":null,"date":"2026-03-23T16:25:20","name":"[nf-next,0/3] IPVS changes, part 4 of 4 - extras","submitter":{"id":2825,"url":"http://patchwork.ozlabs.org/api/1.2/people/2825/?format=json","name":"Julian Anastasov","email":"ja@ssi.bg"},"mbox":"http://patchwork.ozlabs.org/project/netfilter-devel/cover/20260323162523.44964-1-ja@ssi.bg/mbox/","series":[{"id":497148,"url":"http://patchwork.ozlabs.org/api/1.2/series/497148/?format=json","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/covers/2214938/comments/","headers":{"Return-Path":"\n <netfilter-devel+bounces-11375-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=2kK8fOPV;\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-11375-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=\"2kK8fOPV\"","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 4ffgzY2STqz1xy3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 24 Mar 2026 05:04:25 +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 B1318336F237\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 23 Mar 2026 16:37:18 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6D3A23BED37;\n\tMon, 23 Mar 2026 16:36:44 +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 10F513C0610;\n\tMon, 23 Mar 2026 16:36:40 +0000 (UTC)","from mx.ssi.bg (localhost [127.0.0.1])\n\tby mx.ssi.bg (Potsfix) with ESMTP id C965121830;\n\tMon, 23 Mar 2026 18:26:35 +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:26:34 +0200 (EET)","from ja.ssi.bg (unknown [213.16.62.126])\n\tby box.ssi.bg (Potsfix) with ESMTPSA id 7FDD460AD5;\n\tMon, 23 Mar 2026 18:26:34 +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 62NGQWQ6045001;\n\tMon, 23 Mar 2026 18:26:32 +0200","(from root@localhost)\n\tby ja.home.ssi.bg (8.18.1/8.18.1/Submit) id 62NGQRdh044999;\n\tMon, 23 Mar 2026 18:26:27 +0200"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774283803; cv=none;\n b=mTQe7ACSX5su/qAnHfsTv6p/OOCalC9Vhu+n1cLFFh177wg6lxs5ebRJFQgu7sW/SfvWljmyW4r7DLuQZuZhQsuAVEfYFdb9uYAGNxou8Li6iuottg6zXwNIMUdUjFyZfyN/+Np3zWvq9/O4OvUHBHC9xTOVeGRAh30XM5kRrC0=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774283803; c=relaxed/simple;\n\tbh=wmqJAd7pDyIbGcVBkUcGpINHuM3F5E9PQOs2AxbkeDU=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=RxOIlA0dozWZgBqbzBDtgUBgV2krQ/USvEU9PKn9HL1jJ7Wj+0sJR5jyksnfWg/ub3JVUeKl3ef+sdO64LfNOVHJDcgXJuzNdJKcmnCkvzwn10COHIJLoPM4yzTT5wHJCPPlGXMpaDsODMhWrNSoaXErg/uLvcoS3XFwjSM0kyg=","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=2kK8fOPV;\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:message-id\n\t:mime-version:reply-to:subject:subject:to:to; s=ssi; bh=p1MV6Hpb\n\t8RR03QgFcfBlMCPr6Bvpm4eWKCv+NQqe/X0=; b=2kK8fOPVCUPfHIfHb5PKraY9\n\tKXhY6VeQe1EbVqgSPYvqZ/+UuerjUGb/UkKw6//YitGpncLkBUBYiG/RPBLTiA0I\n\tWLmegS/bg3KU7Tb130DlRWuF9Li0zFP9RCkc9hCnI/MOESCACZY01J/O/Zdmui+w\n\t9JvlVGezq/hz2sycoBohU/tZw6TlcCYfn2tDaZdpjnMxzS/a6lN4dRFZoBmGaNqN\n\tXJpSAnyUUI5Dpf9uIUJF+O5jvE9YNbvGGV3mdXfhlm1D0R7bnQKdWdt/msdNFdbP\n\tNBAhd+IPQ8h5RJexTcHqBJ+F2jo+2T3u1PafiVfG5o8Jgvc1sgzxecJhfRnaaE3a\n\tQkJsLtG5bZYzg9JeLZtS/ukWCjcDvQDfSPbYF1L5wE6M+zmcesOMqUVgWmPKX8AY\n\t02ed6gW4/WuEHzXnRYk3zJGiBH0rDsr95JHUf9Js+Nd1eLWBK5bhgG7AYxsMOoJb\n\tycj5dw31LJAAkbWpD2cPgeZamzj5UNZusA+WSniuULNMYqrC/NohSgyq3wUy95zf\n\tklIIH6u1m5g645o8Rvey5PLU4LSB0bCt1Rimnd+4hON3a6rs3/qbrGd9lRjASaML\n\tn5yQs/lNKb5M6yMS6lEHSqpmduUYLWP++ZKGJyG6KjFKmhZq6rxqNon00kB0GnOs\n\t8vhil+KZgD/kngOhJEI=","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 0/3] IPVS changes, part 4 of 4 - extras","Date":"Mon, 23 Mar 2026 18:25:20 +0200","Message-ID":"<20260323162523.44964-1-ja@ssi.bg>","X-Mailer":"git-send-email 2.53.0","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":"Hello,\n\n        This patchset is part 4 of changes that accumulated in\nrecent time. It is for nf-next and should be applied when the\npatches from part 1-3 are already applied. It contains extras\nfor the per-net tables.\n\n        All patches here come from the work\n\"ipvs: per-net tables and optimizations\" last posted\non 19 Oct 2025 as v6, with the following changes:\n\nPatch 1 comes from v6/patch 10 with added get_conn_tab_size() helper\n\nPatch 2 comes from v6/patch 13 with added text for the commit\n\nPatch 3 comes from v6/patch 14 with updated docs\n\n\tAs result, the following patches will:\n\n* As the connection table is not with fixed size, show its current\n  size to user space\n\n* Add /proc/net/ip_vs_status to show current state of IPVS, per-net\n\ncat /proc/net/ip_vs_status\nConns:\t9401\nConn buckets:\t524288 (19 bits, lfactor -5)\nConn buckets empty:\t505633 (96%)\nConn buckets len-1:\t18322 (98%)\nConn buckets len-2:\t329 (1%)\nConn buckets len-3:\t3 (0%)\nConn buckets len-4:\t1 (0%)\nServices:\t12\nService buckets:\t128 (7 bits, lfactor -3)\nService buckets empty:\t116 (90%)\nService buckets len-1:\t12 (100%)\nStats thread slots:\t1 (max 16)\nStats chain max len:\t16\nStats thread ests:\t38400\n\nIt shows the table size, the load factor (2^n), how many are the empty\nbuckets, with percents from the all buckets, the number of buckets\nwith length 1..7 where len-7 catches all len>=7 (zero values are\nnot shown). The len-N percents ignore the empty buckets, so they\nare relative among all len-N buckets. It shows that smaller lfactor\nis needed to achieve len-1 buckets to be ~98%. Only real tests can\nshow if relying on len-1 buckets is a better option because the\nhash table becomes too large with multiple connections. And as\nevery table uses random key, the services may not avoid collision\nin all cases.\n\n* add conn_lfactor and svc_lfactor sysctl vars, so that one can tune\n  the connection/service hash table sizing\n\n\nJulian Anastasov (3):\n  ipvs: show the current conn_tab size to users\n  ipvs: add ip_vs_status info\n  ipvs: add conn_lfactor and svc_lfactor sysctl vars\n\n Documentation/networking/ipvs-sysctl.rst |  35 ++++\n net/netfilter/ipvs/ip_vs_ctl.c           | 247 ++++++++++++++++++++++-\n 2 files changed, 278 insertions(+), 4 deletions(-)"}