Date: Wed, 9 Apr 2025 19:30:46 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 02a12814c14f - main - pf.conf.5: remove incorrect performance comparison Message-ID: <202504091930.539JUkIE080140@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=02a12814c14fb699195703a647cf4a0393586ebe commit 02a12814c14fb699195703a647cf4a0393586ebe Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-04-09 15:28:24 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-04-09 19:30:17 +0000 pf.conf.5: remove incorrect performance comparison In FreeBSD's pf the state lookup is done through a hash table, not an RB tree as on OpenBSD. Remove a misleading line from the man page. Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index bc9157d6a5f8..64da49845a32 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1659,10 +1659,6 @@ allows echo requests (such as those created by out statefully, and matches incoming echo replies correctly to states. .Pp Also, looking up states is usually faster than evaluating rules. -If there are 50 rules, all of them are evaluated sequentially in O(n). -Even with 50000 states, only 16 comparisons are needed to match a -state, since states are stored in a binary search tree that allows -searches in O(log2 n). .Pp Furthermore, correct handling of ICMP error messages is critical to many protocols, particularly TCP.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504091930.539JUkIE080140>