opnsense-src/sys
Mark Johnston 010ca539cb pf: Stop using net_epoch to synchronize access to eth rules
Commit 20c4899a8e modified pf_test_eth_rule() to not acquire the
rules read lock, so pf_commit_eth() was changed to wait until the
now-inactive rules are no longer in use before freeing them.  In
particular, it uses the net_epoch to schedule callbacks once the
inactive rules are no longer visible to packet processing threads.

However, since commit 812839e5aa, pf_test_eth_rule() acquires the
rules read lock, so this deferred action is unneeded.  This patch
reverts a portion of 20c4899a8e such that we avoid using deferred
callbacks to free inactive rules.

The main motivation is performance: epoch_drain_callbacks() is quite
slow, especially on busy systems, and its use in the DIOCXBEGIN handler
in particular causes long stalls in relayd when reloading configuration.

Reviewed by:	kp
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D48822

(cherry picked from commit 7a66b3008693ce61957e8b2a3d99829063e1e4af)
2025-02-24 11:17:38 +01:00
..
amd64 vmm(4): Fix a typo in a kernel message 2024-04-28 07:20:46 +02:00
arm kern: Make fileops and filterops tables const where possible 2024-12-11 10:20:24 +01:00
arm64 arm64: Check DMAP address is valid in PHYS_IN_DMAP 2024-05-02 07:59:31 +00:00
bsm timerfd: Move implementation from linux compat to sys/kern 2023-08-24 14:28:56 -06:00
cam kern: Make fileops and filterops tables const where possible 2024-12-11 10:20:24 +01:00
cddl Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag" 2024-04-21 15:27:11 +03:00
compat kern: Make fileops and filterops tables const where possible 2024-12-11 10:20:24 +01:00
conf Add UPDATING entries and bump version. 2025-02-21 15:08:03 +01:00
contrib ice_ddp: Update to 1.3.41.0 2024-12-13 13:10:48 +01:00
crypto Revert "ossl: Rebuild the openssl asm" 2024-07-20 14:39:39 +02:00
ddb ddb: Add sysctl flag CTLFLAG_TUN to loader tunable 2023-10-12 12:08:18 +08:00
dev virtio_p9fs: Simplify vt9p_req_wait() a bit 2025-02-03 09:20:37 +01:00
dts add allwinner overlays for enabling additional USB ports 2024-02-17 16:15:10 +02:00
fs tarfs: Fix the size of struct tarfs_fid and add a static assert 2025-02-03 09:26:41 +01:00
gdb sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
geom kern: Make fileops and filterops tables const where possible 2024-12-11 10:20:24 +01:00
gnu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
i386 i386: Fix a typo in a source code comment 2024-04-27 07:49:27 +02:00
isa isa: Postpone removal of the non-PNP driver until 15 2023-10-30 08:55:08 +08:00
kern audit: Fix short-circuiting in syscallenter() 2025-02-03 09:26:37 +01:00
kgssapi nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers 2023-12-23 17:03:58 -08:00
libkern arm64: Mark the armv8 crc32c as supporting BTI 2024-02-19 13:17:47 +00:00
modules Add an implementation of the 9P filesystem 2025-02-03 09:20:02 +01:00
net pf: Stop using net_epoch to synchronize access to eth rules 2025-02-24 11:17:38 +01:00
net80211 net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
netgraph net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
netinet netinet: enter epoch in garp_rexmit() 2025-02-03 09:23:48 +01:00
netinet6 ip: Defer checks for an unspecified dstaddr until after pfil hooks 2024-12-17 16:27:06 +01:00
netipsec pfkey: Fix some checks in kdebug_sadb() 2024-12-23 14:57:09 +01:00
netlink netlink: allow force remove on pinned delete from route binary 2024-12-03 14:48:17 +01:00
netpfil pf: Stop using net_epoch to synchronize access to eth rules 2025-02-24 11:17:38 +01:00
netsmb sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nfsclient sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
nfsserver sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
nlm sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ofed net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
opencrypto ktls: Remove the socket parameter to ktls_ocf_try() 2024-07-29 08:15:30 +02:00
powerpc busdma: fix page miscount for small segment sizes 2024-04-18 15:09:02 -03:00
riscv busdma: fix page miscount for small segment sizes 2024-04-18 15:09:02 -03:00
rpc svc.c: Check for a non-NULL xp_socket 2025-02-03 09:26:32 +01:00
security audit: Fix short-circuiting in syscallenter() 2025-02-03 09:26:37 +01:00
sys file: The f_ops table pointer can be a pointer to const 2024-12-12 09:30:21 +01:00
teken teken: fix style in teken_wcwidth.h 2023-10-21 17:28:35 +03:00
tests netlink: move NETLINK define to opt_global.h 2023-10-16 09:42:33 +02:00
tools arm_kernel_bothdr.awk: Update to latest ota 2024-04-24 17:57:55 -06:00
ufs Eliminate unnecessary UFS1 integrity checks. 2024-03-04 16:09:10 -08:00
vm vm_reserv_reclaim_contig: Return NULL not false 2024-04-17 10:33:26 -04:00
x86 kern: Make fileops and filterops tables const where possible 2024-12-11 10:20:24 +01:00
xdr sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xen sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
Makefile sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
README.md sys/README.md: Add a section for documentation 2023-08-03 11:07:41 -03:00

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Documentation:

Source code documentation is maintained in a set of man pages, under section 9. These pages are located in share/man/man9, from the top-level of the src tree. Consult intro(9) for an overview of existing pages.

Some additional high-level documentation of the kernel is maintained in the Architecture Handbook.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers and other arch independent code
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures