opnsense-src/sys/dev/usb/net
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
..
if_aue.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_auereg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_axe.c Use mbuf queue instead of ifqueue in USB network drivers. 2019-08-30 00:05:04 +00:00
if_axereg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_axge.c Use mbuf queue instead of ifqueue in USB network drivers. 2019-08-30 00:05:04 +00:00
if_axgereg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
if_cdce.c Add support for RTL8156, 2.5GbE USB network controller, to if_cdce(4). 2019-07-10 05:45:50 +00:00
if_cdceem.c Add cdceem(4) driver, for virtual ethernet devices compliant 2019-08-07 18:14:45 +00:00
if_cdcereg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_cue.c ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
if_cuereg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_ipheth.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
if_iphethvar.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
if_kue.c ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
if_kuefw.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_kuereg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_mos.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_mosreg.h spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
if_muge.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_mugereg.h muge: update FDT LED configuration 2019-05-20 19:31:49 +00:00
if_rue.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_ruereg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
if_smsc.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_smscreg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
if_udav.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_udavreg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-20 19:36:21 +00:00
if_ure.c Unbreak USB ethernet module builds 2019-08-20 15:14:32 +00:00
if_urereg.h Fix URE_WDT6_SET_MODE value in the register definition. 2019-04-08 13:40:46 +00:00
if_urndis.c Add support for tethering with Nokia 7 plus and the alike. 2019-07-28 21:47:04 +00:00
if_urndisreg.h net: Split RNDIS protocol structs/macros out of dev/usb/net/if_urndisreg.h 2016-08-23 02:54:06 +00:00
if_usie.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
if_usievar.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ruephy.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
ruephyreg.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
uhso.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
usb_ethernet.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
usb_ethernet.h Use mbuf queue instead of ifqueue in USB network drivers. 2019-08-30 00:05:04 +00:00