freebsd-dev/sys/netpfil/ipfw
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
..
nat64 Initialize V_nat64out methods explicitly. 2019-06-05 09:25:40 +00:00
nptv6 Reimplement how net.inet.ip.fw.dyn_keep_states works. 2018-12-04 16:01:25 +00:00
pmod Use host byte order when comparing mss values. 2018-08-08 17:32:02 +00:00
test sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_aqm_codel.c dummynet: Use strlcpy to appease static checkers 2017-04-13 17:47:44 +00:00
dn_aqm_codel.h
dn_aqm_pie.c Fix the queue delay estimation in PIE/FQ-PIE when the timestamp 2017-05-19 08:38:03 +00:00
dn_aqm_pie.h Change several constants used by the PIE algorithm from unsigned to signed. 2017-03-18 23:00:13 +00:00
dn_aqm.h
dn_heap.c netpfil/ipfw: Make some use of mallocarray(9). 2018-01-11 15:29:29 +00:00
dn_heap.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched_fifo.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched_fq_codel_helper.h
dn_sched_fq_codel.c Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
dn_sched_fq_codel.h
dn_sched_fq_pie.c netpfil/ipfw: Make some use of mallocarray(9). 2018-01-11 15:29:29 +00:00
dn_sched_prio.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched_qfq.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched_rr.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched_wf2q.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dn_sched.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
dummynet.txt
ip_dn_glue.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ip_dn_io.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_dn_private.h Remove 'dir' argument from dummynet_io(). This makes it possible to make 2019-03-14 22:32:50 +00:00
ip_dummynet.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ip_fw2.c Drivers may pass runt packets to filter. This is okay. 2019-09-13 22:36:04 +00:00
ip_fw_bpf.c Eliminate rmlock from ipfw's BPF code. 2019-07-23 12:52:36 +00:00
ip_fw_dynamic.c - Add more flags to ip_fw_args. At this changeset only IPFW_ARGS_IN and 2019-03-14 22:28:50 +00:00
ip_fw_eaction.c Fix rule truncation on external action module unloading. 2019-08-15 13:44:33 +00:00
ip_fw_iface.c Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock. 2019-01-31 21:04:50 +00:00
ip_fw_log.c PFIL_MEMPTR for ipfw link level hook 2019-03-14 22:52:16 +00:00
ip_fw_nat.c dd ipfw_get_action() function to get the pointer to action opcode. 2019-07-29 15:09:12 +00:00
ip_fw_pfil.c Always create ipfw(4) hooks as long as module is loaded. 2019-03-21 16:15:29 +00:00
ip_fw_private.h dd ipfw_get_action() function to get the pointer to action opcode. 2019-07-29 15:09:12 +00:00
ip_fw_sockopt.c dd ipfw_get_action() function to get the pointer to action opcode. 2019-07-29 15:09:12 +00:00
ip_fw_table_algo.c Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
ip_fw_table_value.c Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock. 2019-01-31 21:04:50 +00:00
ip_fw_table.c Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock. 2019-01-31 21:04:50 +00:00
ip_fw_table.h