freebsd-dev/sys/net
Gleb Smirnoff caf32b260a pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks()
The 0b70e3e78b changed the original design of a single entry point
into pfil(9) chains providing separate functions for the filtering
points that always provide mbufs and know the direction of a flow.
The motivation was to reduce branching.  The logical continuation
would be to do the same for the filtering points that always provide
a memory pointer and retire the single entry point.

o Hooks now provide two functions: one for mbufs and optional for
  memory pointers.
o pfil_hook_args() has a new member and pfil_add_hook() has a
  requirement to zero out uninitialized data. Bump PFIL_VERSION.
o As it was before, a hook function for a memory pointer may realloc
  into an mbuf.  Such mbuf would be returned via a pointer that must
  be provided in argument.
o The only hook that supports memory pointers is ipfw:default-link.
  It is rewritten to provide two functions.
o All remaining uses of pfil_run_hooks() are converted to
  pfil_mem_in().
o Transparent union of pfil_packet_t and tricks to fix pointer
  alignment are retired. Internal pfil_realloc() reduces down to
  m_devget() and thus is retired, too.

Reviewed by:		mjg, ocochard
Differential revision:	https://reviews.freebsd.org/D37977
2023-02-14 10:02:49 -08:00
..
altq altq: ansify 2023-02-13 18:32:45 +00:00
route fibs: restrict jail_attach(2) if process fibnum >= numfibs in the jail. 2023-02-12 11:46:38 +00:00
bpf_buffer.c
bpf_buffer.h
bpf_filter.c bpf(3): Grammar fix for a source code comment 2022-09-04 17:30:05 +02:00
bpf_jitter.c
bpf_jitter.h
bpf_zerocopy.c
bpf_zerocopy.h
bpf.c bpf: Add missing NOP stubs 2023-02-08 18:05:21 +08:00
bpf.h bpf: Add "_if" tap APIs 2023-01-31 15:02:14 -05:00
bpfdesc.h
bridgestp.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
bridgestp.h
debugnet_inet.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
debugnet_int.h
debugnet.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
debugnet.h debugnet: Add ifnet accessor to set debugnet methods 2023-01-24 15:03:35 -05:00
dlt.h net(4): Fix a typo in a source code comment 2022-04-02 14:57:06 +02:00
ethernet.h bpf: Add "_if" tap APIs 2023-01-31 15:02:14 -05:00
firewire.h IfAPI: Add l2com accessor for firewire. 2023-01-31 15:02:17 -05:00
ieee8023ad_lacp.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
ieee8023ad_lacp.h lacp: short timeout erroneously declares link-flapping 2022-04-27 12:41:30 -07:00
ieee_oui.h
if_arp.h
if_bridge.c net: use pfil_mbuf_{in,out} where we always have an mbuf 2023-02-14 10:02:49 -08:00
if_bridgevar.h bridge: Fix whitespace 2023-01-30 13:12:36 -05:00
if_clone.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_clone.h if_clone: add ifc_link_ifp() / ifc_unlink_ifp() to the KPI 2022-09-24 19:42:42 +00:00
if_dead.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_disc.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_dl.h
if_edsc.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_enc.c net: use pfil_mbuf_{in,out} where we always have an mbuf 2023-02-14 10:02:49 -08:00
if_enc.h
if_epair.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_ethersubr.c net: use pfil_mbuf_{in,out} where we always have an mbuf 2023-02-14 10:02:49 -08:00
if_fwsubr.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_gif.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_gif.h
if_gre.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_gre.h
if_infiniband.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_ipsec.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_ipsec.h
if_lagg.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_lagg.h lagg: fix lagg ifioctl after SIOCSIFCAPNV 2022-07-28 10:39:00 -04:00
if_llatbl.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_llatbl.h netinet6: Fix mbuf leak in NDP 2022-05-31 21:06:14 +00:00
if_llc.h
if_loop.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_me.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_media.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_media.h
if_mib.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_mib.h
if_ovpn.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_ovpn.h if_ovpn: implement OVPN_GET_PEER_STATS 2022-12-14 06:48:58 +01:00
if_pflog.h pflog: align header to 4 bytes, not 8 2022-02-01 18:17:44 +01:00
if_pfsync.h pfsync: prepare code to accommodate AF_INET6 family 2022-11-09 21:06:07 +01:00
if_private.h IfAPI: Add some more accessors 2023-01-31 15:02:17 -05:00
if_stf.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_stf.h if_stf: make if_stf.h self-contained 2021-12-17 12:38:34 +01:00
if_tap.h
if_tun.h
if_tuntap.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_types.h Import the WireGuard driver from zx2c4.com. 2022-10-28 13:36:12 -07:00
if_var.h IfAPI: Style cleanup 2023-02-14 10:21:20 -05:00
if_vlan_var.h IfAPI: Add some more accessors 2023-01-31 15:02:17 -05:00
if_vlan.c IfAPI: Add if_llsoftc member accessors for TOEDEV 2023-01-31 15:02:16 -05:00
if_vxlan.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
if_vxlan.h
if.c IfAPI: Style cleanup 2023-02-14 10:21:20 -05:00
if.h Revert "ifnet/API: Move the IfAPI from if_var.h to if.h" 2023-01-12 21:29:19 -05:00
ifdi_if.m IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
iflib_clone.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
iflib_private.h
iflib.c pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks() 2023-02-14 10:02:49 -08:00
iflib.h iflib: Introduce v2 of TX Queue Select Functionality 2022-10-17 14:59:55 -07:00
ifq.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ifq.h ifnet/API: Privatize the implementation of the drbr_* APIs 2023-01-31 15:02:14 -05:00
infiniband.h
mp_ring.c
mp_ring.h
mppc.h
mppcc.c
mppcd.c
netisr_internal.h
netisr.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
netisr.h
netmap_legacy.h
netmap_user.h netmap: fix refcount bug in netmap allocator 2022-03-06 16:39:16 +00:00
netmap_virt.h
netmap.h netmap(4): Fix a typo in a source code comment 2022-10-25 14:56:25 +02:00
paravirt.h
pfil.c pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks() 2023-02-14 10:02:49 -08:00
pfil.h pfil: add pfil_mem_{in,out}() and retire pfil_run_hooks() 2023-02-14 10:02:49 -08:00
pfkeyv2.h ipsec: add support for CHACHA20POLY1305 2022-11-02 14:19:04 +01:00
pfvar.h pf: fix syncookies in conjunction with tcp fast port reuse 2023-01-13 23:14:12 +01:00
ppp_defs.h
radix.c net: constantify radix.c functions 2022-08-01 07:32:40 +00:00
radix.h net: constantify radix.c functions 2022-08-01 07:32:40 +00:00
rndis.h
route.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
route.h netlink: add interface notification on link status / flags change. 2022-12-09 11:20:07 +00:00
rss_config.c Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
rss_config.h
rtsock.c ifnet/API: Move struct ifnet definition to a <net/if_private.h> 2023-01-24 14:36:30 -05:00
sff8436.h
sff8472.h
slcompress.c
slcompress.h
toeplitz.c
toeplitz.h
vnet.c ddb: annotate some commands with DB_CMD_MEMSAFE 2022-07-18 22:06:09 +00:00
vnet.h IPv4: experimental changes to allow net 0/8, 240/4, part of 127/8 2022-07-13 09:46:05 -05:00