The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=144ec0713daa532342a298fd888a1656ae24a62d

commit 144ec0713daa532342a298fd888a1656ae24a62d
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2021-07-19 12:50:08 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2021-07-19 12:54:49 +0000

    pf: add a branch prediction to expire state check in pf_find_state
    
    Reviewed by:    kp
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 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 51b26350d0bb..fa8b6006571a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1376,7 +1376,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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to