Date: Mon, 28 Mar 2022 11:38:36 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0d357e2bb6e0 - stable/13 - pf: remove spurious zeroing from pf_ioctl_addrule Message-ID: <202203281138.22SBcaqF077013@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0d357e2bb6e0d06aa5e0b93bd2a236101d5ac4b7 commit 0d357e2bb6e0d06aa5e0b93bd2a236101d5ac4b7 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-02-25 16:18:13 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> 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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203281138.22SBcaqF077013>