Date: Sun, 25 Jul 2021 07:03:03 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: 48e3bab3533a - stable/13 - pf: add a branch prediction to expire state check in pf_find_state Message-ID: <202107250703.16P733L5050410@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=48e3bab3533ae54b45be15a737500a593157054c commit 48e3bab3533ae54b45be15a737500a593157054c Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-07-19 12:50:08 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-07-25 07:00:22 +0000 pf: add a branch prediction to expire state check in pf_find_state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 144ec0713daa532342a298fd888a1656ae24a62d) --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index cd55547c3469..7b4c99c9a799 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1380,7 +1380,7 @@ pf_find_state(struct pfi_kkif *kif, struct pf_state_key_cmp *key, u_int dir) if (s->kif == V_pfi_all || s->kif == kif) { PF_STATE_LOCK(s); PF_HASHROW_UNLOCK(kh); - if (s->timeout >= PFTM_MAX) { + if (__predict_false(s->timeout >= PFTM_MAX)) { /* * State is either being processed by * pf_unlink_state() in an other thread, or
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107250703.16P733L5050410>