opnsense-src/sys
Gleb Smirnoff 2e27230ff9 tcp_hpts: rewrite inpcb synchronization
Just trust the pcb database, that if we did in_pcbref(), no way
an inpcb can go away.  And if we never put a dropped inpcb on
our queue, and tcp_discardcb() always removes an inpcb to be
dropped from the queue, then any inpcb on the queue is valid.

Now, to solve LOR between inpcb lock and HPTS queue lock do the
following trick.  When we are about to process a certain time
slot, take the full queue of the head list into on stack list,
drop the HPTS lock and work on our queue.  This of course opens
a race when an inpcb is being removed from the on stack queue,
which was already mentioned in comments.  To address this race
introduce generation count into queues.  If we want to remove
an inpcb with generation count mismatch, we can't do that, we
can only mark it with desired new time slot or -1 for remove.

Reviewed by:		rrs
Differential revision:	https://reviews.freebsd.org/D33026
2021-12-02 10:48:49 -08:00
..
amd64 x86 GENERIC/MINIMAL: group sc(4) devices together 2021-11-28 14:38:41 -05:00
arm Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
arm64 arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE 2021-11-30 11:15:44 -04:00
bsm
cam cam: Initialize wired to false 2021-11-30 14:40:30 -07:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat syscalls: regen 2021-11-29 22:04:58 +00:00
conf Remove "options PCBGROUP" 2021-12-02 10:48:48 -08:00
contrib iwlwifi: import Intel's iwlwifi/mvm driver. 2021-11-28 19:17:04 +00:00
crypto aesni: plug a set-but-not-unused var in aesni_newsession 2021-11-24 16:25:50 +00:00
ddb Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dev hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS. 2021-12-02 10:46:36 -08:00
dts add rk3328 overlay for enabling analog sound 2021-11-13 11:09:23 +02:00
fs nfsd: Sanity check the ACL attribute 2021-12-01 13:55:17 -08:00
gdb
geom Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
gnu
i386 i386: take pcb and fpu area into account in GET_STACK_USAGE 2021-11-30 11:03:46 -04:00
isa
kern SMR protection for inpcbs 2021-12-02 10:48:48 -08:00
kgssapi
libkern libkern: remove bcopy 2021-08-24 11:24:07 +00:00
mips Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
modules TMP461: Add thermal sensor driver 2021-12-02 09:18:48 +01:00
net Remove "options PCBGROUP" 2021-12-02 10:48:48 -08:00
net80211 net80211: fix -Wunused-but-set-variable warnings 2021-11-24 17:39:19 +00:00
netgraph Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
netinet tcp_hpts: rewrite inpcb synchronization 2021-12-02 10:48:49 -08:00
netinet6 SMR protection for inpcbs 2021-12-02 10:48:48 -08:00
netipsec netinet: Remove unneeded mb_unmapped_to_ext() calls 2021-11-24 13:31:16 -05:00
netpfil dummynet: Fix socket option length validation for IP_DUMMYNET3 2021-11-29 13:57:24 -05:00
netsmb
nfs kernel: partially revert e9efb1125a15, default inet mask 2021-11-14 14:12:25 -06:00
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto ktls: Split encrypt vs decrypt OCF counters. 2021-11-16 09:58:52 -08:00
powerpc arm64, powerpc: fix calculation of 'used' in GET_STACK_USAGE 2021-11-30 11:15:44 -04:00
riscv Implement GET_STACK_USAGE on remaining archs 2021-11-30 11:15:56 -04:00
rpc mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
security vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
sys sys/libkern.h: Add type conversion helpers 2021-12-02 09:18:48 +01:00
teken
tests routing: add IPv6 fib validation procedure. 2021-08-16 23:04:01 +00:00
tools fw_stub: fix -Wunused-but-set-variable for firmware files 2021-11-30 14:23:18 +00:00
ufs vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
vm swapoff_one(): only check free pages count manually turning swap off 2021-11-29 18:38:02 +02:00
x86 minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00
xdr
xen xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results 2021-11-18 09:46:44 +01:00
Makefile