freebsd-dev/sys/contrib
Bjoern A. Zeeb 6d8a5eacae Virtualise ipfilter.
Split initializzation an teardown into module (global state) and VNET
(per virtual network stack) parts.  Virtualise global state, which is
not "const".

Cleanup eventhandlers, so that we can make use of the passed in argument
to get the vnet state from the ifp;  disable the "cloner" event as it is
too early, has no state, and can fire before initialisation (see comment
in the source).

Handle the dynamic sysctls specially.  The problem is that "ipmain"
is the virtualized struct, but the fields used for the sysctls are
hanging off memory allocated and attached to the virtualized "ipmain"
thus standard VNET macros and sysctl handling do not work.
We still say it is VNET sysctls to get the proper protection checks
in the VIMAGE case;  to solve the problem of accessing the right bit
of memory hanging of each per-VNET ipmain, we use a dedicated handler
function wrapping around sysctl_ipf_int() undoing the base calculation
from kern_sysctl.c and then adding the passed-in offset into the right
struct depending on handler.  A bit of a mess exposing VNET-internals
this way but the only way to keep the code without having to massively
restructure ipf internals.

Approved by:		re (hrs)
Sponsored by:		The FreeBSD Foundation
Obtained from:		projects/vnet
MFC after:		2 weeks
Reviewed by:		cy
Differential Revision:	https://reviews.freebsd.org/D7000
2016-06-30 15:01:07 +00:00
..
alpine-hal Import Annapurna Labs Alpine HAL for networking 2016-01-26 15:22:04 +00:00
cloudabi Make CloudABI's way of doing TLS more friendly to userspace emulators. 2016-04-06 11:11:31 +00:00
dev [ath] implement TX queue configuration extensions for the AR9380 HAL. 2016-06-20 16:12:27 +00:00
ipfilter/netinet Virtualise ipfilter. 2016-06-30 15:01:07 +00:00
libfdt
libnv Add support for the arrays in nvlist library. 2015-08-15 06:34:49 +00:00
ncsw Zero the newly allocated spinlock. 2016-04-24 01:38:45 +00:00
ngatm Fix the following -Werror warning from clang 3.5.0, while building 2014-11-19 07:47:37 +00:00
octeon-sdk
rdma/krping Fix for printf() compile warning when fast_reg.length is 64-bit. 2016-04-22 07:29:38 +00:00
v4l
vchiq/interface ARM: Use new ARMv6 naming conventions for cache and TLB functions 2016-02-05 14:57:41 +00:00
x86emu Optimize ROL and ROR emulations and fix comments. 2016-02-18 23:03:37 +00:00
xz-embedded