freebsd-skq/sys
Gleb Smirnoff b8a6e03fac Widen NET_EPOCH coverage.
When epoch(9) was introduced to network stack, it was basically
dropped in place of existing locking, which was mutexes and
rwlocks. For the sake of performance mutex covered areas were
as small as possible, so became epoch covered areas.

However, epoch doesn't introduce any contention, it just delays
memory reclaim. So, there is no point to minimise epoch covered
areas in sense of performance. Meanwhile entering/exiting epoch
also has non-zero CPU usage, so doing this less often is a win.

Not the least is also code maintainability. In the new paradigm
we can assume that at any stage of processing a packet, we are
inside network epoch. This makes coding both input and output
path way easier.

On output path we already enter epoch quite early - in the
ip_output(), in the ip6_output().

This patch does the same for the input path. All ISR processing,
network related callouts, other ways of packet injection to the
network stack shall be performed in net_epoch. Any leaf function
that walks network configuration now asserts epoch.

Tricky part is configuration code paths - ioctls, sysctls. They
also call into leaf functions, so some need to be changed.

This patch would introduce more epoch recursions (see EPOCH_TRACE)
than we had before. They will be cleaned up separately, as several
of them aren't trivial. Note, that unlike a lock recursion the
epoch recursion is safe and just wastes a bit of resources.

Reviewed by:	gallatin, hselasky, cy, adrian, kristof
Differential Revision:	https://reviews.freebsd.org/D19111
2019-10-07 22:40:05 +00:00
..
amd64 Introduce stats(3), a flexible statistics gathering API. 2019-10-07 19:05:05 +00:00
arm align use of cp15_pmccntr_get with its availability 2019-10-07 07:37:42 +00:00
arm64 Eliminate an unused declaration. The variable in question is only defined 2019-10-07 04:22:03 +00:00
bsm
cam Add kern.cam.da.X.quirks tunable, similar existing for ada. 2019-09-26 14:48:39 +00:00
cddl fix up r353168, add atomic_swap_64 to i386 version of opensolaris_atomic.S 2019-10-07 12:53:27 +00:00
compat Regen after r347228 and r352693. 2019-09-30 21:00:19 +00:00
conf Introduce stats(3), a flexible statistics gathering API. 2019-10-07 19:05:05 +00:00
contrib Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
crypto Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
ddb ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
dev Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
dts dtso: allwinner: Add an overlay for H3 thermal node 2019-08-24 13:26:34 +00:00
fs nfsclient: add root vnode caching 2019-10-06 22:17:29 +00:00
gdb gdb(4): Root a sysctl tree at 'debug.gdb.' 2019-09-08 22:52:47 +00:00
geom Add a "count_until_fail" option to gnop, which says to start failing 2019-09-13 23:03:56 +00:00
gnu arm: dts: ti: Fix mmc3 instance by setting it to disabled 2019-10-07 08:11:49 +00:00
i386 Remove host binary object drivers from GENERIC 2019-10-03 12:51:57 +00:00
isa
kern Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern Remove zlib 1.0.4 from kernel. 2019-08-25 17:13:00 +00:00
mips add atomic_load_64 for mipsn32 2019-10-07 07:42:26 +00:00
modules nvdimm(4): Fix Clang build after r353110 2019-10-04 21:47:09 +00:00
net Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
net80211 Enhance the comment ieee80211_add_channel() to avoid a 2019-06-10 14:31:18 +00:00
netgraph Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netinet Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netinet6 Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netipsec Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netpfil Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
opencrypto kTLS support for TLS 1.3 2019-09-27 19:17:40 +00:00
powerpc powerpc64/pmap: Fix release order to match lock order in moea64_enter() 2019-10-07 02:36:42 +00:00
riscv Eliminate an unused declaration. The variable in question is only defined 2019-10-07 04:22:03 +00:00
rpc Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
security vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
sparc64 sparc64: use generic sub-word atomic *cmpset 2019-10-02 17:08:20 +00:00
sys Introduce stats(3), a flexible statistics gathering API. 2019-10-07 19:05:05 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
ufs ufs: add root vnode caching 2019-10-06 22:18:03 +00:00
vm Improve MD page fault handlers. 2019-09-27 18:43:36 +00:00
x86 Make the hw.intrs sysctl OID read-only 2019-10-04 21:46:11 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile