From nobody Mon Apr 04 14:04:51 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F03781A9CCBA; Mon, 4 Apr 2022 14:04:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXCFv6P4zz4fM1; Mon, 4 Apr 2022 14:04:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649081091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQ/YK4QEo4siaswGeDFOmuO5p4WfOj/jydNXHs449PE=; b=s00G1TDSVgfBnYDXbBRrwMY485cEv157Yu+QE/YvnYVbAAMZLX2cjkSVvJ7QE7dQnjUHlj hLxX1s7XdnS19GBLr3Gt35nbPGOoW69VvdRwS4qqAQvGLHGgh4rR5jQAj5+6amYeUtRiSN 0wAD8jd16NBJERa96KUx8YGKNlcF6uA/dbQjAqu6+gX6/rqnOHQIHSpaAzk/Xg4sCvt1lU C+wzhXpqIM96fOyuZBMNzHqQQqB8ZlIRUHqJ84cOpAMo5EBsAGSj68zj7l5hkaoooexebT sZYY80RZdET6jLCJzinWCHpqSOntPpdw9NSyAG30lndHNJfnyFsSmZtSl4yNQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB28E13534; Mon, 4 Apr 2022 14:04:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 234E4pj6032337; Mon, 4 Apr 2022 14:04:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234E4pwv032336; Mon, 4 Apr 2022 14:04:51 GMT (envelope-from git) Date: Mon, 4 Apr 2022 14:04:51 GMT Message-Id: <202204041404.234E4pwv032336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 367d0c7d6617 - releng/13.1 - pf: Initialize the table entry zone limit at initialization time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 367d0c7d6617c8ef316b71e420b8a7a7a7e66a8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649081091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQ/YK4QEo4siaswGeDFOmuO5p4WfOj/jydNXHs449PE=; b=cQGQbZIQWD7Y8slM9D1H8MfBIr4ZRjBSPm5bVWjbuYJRusn52djovHFQZaMrhto0dgVc0d ABnNrZtZlLNnH0iKcJl6ykpkgLSbOqmDkk0CLD2tS7wAVblQjmoqhHOyUxWCDvvySUDfgk k3/fvgn54B0J3BsmP0j34Xd5WszdzEJVPKcqqVHmElsj03OFOZVESKTBx6fU26PI/ILrie RaHPmYyIfN8kxFOc8BEtHwCnCNChNZqfZYNjjLQbkIrTt5FBacBggLC3zNNHxn1qMLIwmS qc5/7EjQD76iW10AiUPF34IQaWmkeI0tPGgn0SfUJG+27vIGHCYyPwkXWiFBlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649081091; a=rsa-sha256; cv=none; b=iS4H7ko1SxW7UNimhk9SWByFGWcJ9KOW19bYC48s1jau0eQ58dA97hY6Ue6nZ3Wo477YMv 7ElU4Gf/xhsJSJ4Eh/NkT+0JUp31TQmam6yiyKsgoFGmJMEjFLiFbuYZH4+YMZftrJJujZ sZ0Fu9WP2LGypa8PGvMPlhRUH6PuRLqta9cvQohiVdmpNtZrf93Fp9KZk2uXMFH5KzlGcF t5YqsEWknZ5SwOOicY2o8DQXw/vrQCK8+/1/tJARaLA4df7uMo+pp4r1Ehz99CTI4HbpAR 5PQxR3Xu9gyDqiWkPlmoo8YHdOvw6ngJ2Ct0f3Sd8go95f3H+/OGRaJV91yjuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=367d0c7d6617c8ef316b71e420b8a7a7a7e66a8a commit 367d0c7d6617c8ef316b71e420b8a7a7a7e66a8a Author: Mark Johnston AuthorDate: 2022-03-30 19:41:44 +0000 Commit: Mark Johnston CommitDate: 2022-04-04 14:04:14 +0000 pf: Initialize the table entry zone limit at initialization time The limit may later be updated by the "set limit" directive in pf.conf. UMA does not permit a limit to be set on a zone after any items have been allocated from a zone. Other UMA zones used by pf do not appear to be susceptible to this problem: they either set a limit at zone creation time or never set one at all. Approved by: re (gjb) PR: 260406 Reviewed by: kp Sponsored by: The FreeBSD Foundation (cherry picked from commit 7d1ab866911a2b29e041d64bc83a93638533f957) (cherry picked from commit 1487f84223ce1341ebdfc87e50fbcddedc6d1de8) --- sys/netpfil/pf/pf_table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index 2352e43cb342..a2afd5c24cff 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -210,6 +210,7 @@ pfr_initialize(void) V_pfr_kentry_z = uma_zcreate("pf table entries", sizeof(struct pfr_kentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + uma_zone_set_max(V_pfr_kentry_z, PFR_KENTRY_HIWAT); V_pf_limits[PF_LIMIT_TABLE_ENTRIES].zone = V_pfr_kentry_z; V_pf_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT; }