From nobody Mon Mar 28 11:38:36 2022 X-Original-To: dev-commits-src-branches@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 7958A1A403F3; Mon, 28 Mar 2022 11:38:37 +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 4KRrLP03FTz3wH7; Mon, 28 Mar 2022 11:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648467517; 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=Ty/zBMjI93I5OGUKIp36T35WoSjOAjlYL7wcKrFeXyg=; b=p8L8Ipij0xAHSo8fFTbtU+6xkvW9+OJ31ht7ZWyctgDJJaPCujGjVquuICckoHotMAd9Oq ATU2v/B7QjDPKnDHwpxrGPywTzKY9SQRzMhaPwdbSwPirXMm+ey1udHakyu0YKQ3eDFpAH Ew51uC8ib42wwI6SuZPqFdPJP8qTpH9IpkeNFhBGwy9gJKqHk+fs8+sWlB0mzsuNRDutzS uOgjm5Zc37V/acDMjLdBKBUXdWtYQHyKR4wxHxjvQAK4bxDFVbMl+shKjuUwPoysQFOHUj l+sYMErkpyBOUlVX7G9qiB9GS6hga+C+L6KU9Qvnv48lUR4wWCoqivn/yX6X7w== 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 A8D90E3C; Mon, 28 Mar 2022 11:38:36 +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 22SBcaa2077014; Mon, 28 Mar 2022 11:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22SBcaqF077013; Mon, 28 Mar 2022 11:38:36 GMT (envelope-from git) Date: Mon, 28 Mar 2022 11:38:36 GMT Message-Id: <202203281138.22SBcaqF077013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Guzik Subject: git: 0d357e2bb6e0 - stable/13 - pf: remove spurious zeroing from pf_ioctl_addrule List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0d357e2bb6e0d06aa5e0b93bd2a236101d5ac4b7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648467517; 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=Ty/zBMjI93I5OGUKIp36T35WoSjOAjlYL7wcKrFeXyg=; b=xpCXAmUUqSYHOQBtRKe6+sNgz61YZEBjezeOfRcwjMYkOqYvBaPvgQwlrSjJyJ7P7VbzbW hLaVpMIzPr1r//wcCED64ifMtN3J6uQjwWTj1k2Sxj7wgpc5i15P6kxi+5pPJdTQ6ISfcW 7SEmFT3k29kK8Q6jbnHh4MFCeKoT09oKY2aju2Fd4YhDX+oZeSQFMkOaUmrrrmeSREJvnM 6FNxAUtiYAqAQo9m5PhljgFXqBJBeRqDB5WiriKxClzIuZtbE9NF1u9iMmQHYZNjl47TgG UKg9+uLx3938SfNn5EjGjsQCjdOyZSVuq0YWds0TOd/KdZJ8gCypiCtzYxzu6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648467517; a=rsa-sha256; cv=none; b=qSZsfnrqWrWejXpCxbl4RYJyrWryULlznZCS2B2CVJgJNzWij+7druprICBLah0YaYSH7I nji7WePmwoB9R9Bk8yxUyPyre4BKHNjwDGWhWwqZnBdvIdUFUDlJ8pBOgbCX2lTXvt2jrK QVDmfcNp8oaiiQnMzcha0JNIRG5m7+bmAMDKZrgd+RWZ1g4MW1SBI8TnNUPQHtWM8ZVrjC MXnG93+ZMWMrEUJIWZXSvrWh6t6uxpKT74MGROEUvwaw1gRYnwN2b4QOZhGdQdjlahixm3 Uttf0609Bomp564ToJfV0cK9Yi9NTKenDxf24peuqB/xq6LXh37BQFprE1Pa5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0d357e2bb6e0d06aa5e0b93bd2a236101d5ac4b7 commit 0d357e2bb6e0d06aa5e0b93bd2a236101d5ac4b7 Author: Mateusz Guzik AuthorDate: 2022-02-25 16:18:13 +0000 Commit: Mateusz Guzik CommitDate: 2022-03-28 11:38:17 +0000 pf: remove spurious zeroing from pf_ioctl_addrule Newly allocated counters are guaranteed to be 0. This removes 5 IPIs for each loaded rule. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 15ada7514954150e6c07fd6a31ceb686ece76943) --- sys/netpfil/pf/pf_ioctl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 030b12dfdd87..4a21b5c52e75 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2142,11 +2142,6 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket, } rule->rpool.cur = TAILQ_FIRST(&rule->rpool.list); - pf_counter_u64_zero(&rule->evaluations); - for (int i = 0; i < 2; i++) { - pf_counter_u64_zero(&rule->packets[i]); - pf_counter_u64_zero(&rule->bytes[i]); - } TAILQ_INSERT_TAIL(ruleset->rules[rs_num].inactive.ptr, rule, entries); ruleset->rules[rs_num].inactive.rcount++;