freebsd-dev/sys/compat/linux
Gleb Smirnoff a6b55ee6be net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH
Expect that drivers call into the network stack with the net epoch
entered. This has already been the fact since early 2020. The net
interrupts, that are marked with INTR_TYPE_NET, were entering epoch
since 511d1afb6b. For the taskqueues there is NET_TASK_INIT() and
all drivers that were known back in 2020 we marked with it in
6c3e93cb5a. However in e87c494015 we took conservative approach
and preferred to opt-in rather than opt-out for the epoch.

This change not only reverts e87c494015 but adds a safety belt to
avoid panicing with INVARIANTS if there is a missed driver. With
INVARIANTS we will run in_epoch() check, print a warning and enter
the net epoch.  A driver that prints can be quickly fixed with the
IFF_NEEDSEPOCH flag, but better be augmented to properly enter the
epoch itself.

Note on TCP LRO: it is a backdoor to enter the TCP stack bypassing
some layers of net stack, ignoring either old IFF_KNOWSEPOCH or the
new IFF_NEEDSEPOCH.  But the tcp_lro_flush_all() asserts the presence
of network epoch.  Indeed, all NIC drivers that support LRO already
provide the epoch, either with help of INTR_TYPE_NET or just running
NET_EPOCH_ENTER() in their code.

Reviewed by:		zlei, gallatin, erj
Differential Revision:	https://reviews.freebsd.org/D39510
2023-04-17 09:08:35 -07:00
..
check_error.d linux(4): Eliminating remnants of futex sdt. 2021-07-29 12:52:36 +03:00
check_internal_locks.d
linux_common.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_common.h linux(4): Add a counterpart to linux_ifflags 2023-03-04 12:26:48 +03:00
linux_dtrace.h
linux_dummy.c linux(4): Implement close_range over native 2023-04-04 23:24:04 +03:00
linux_elf32.c linux(4): implement coredump support 2021-06-30 22:45:06 +01:00
linux_elf64.c linux(4): implement coredump support 2021-06-30 22:45:06 +01:00
linux_elf.c linux(4): Get rid of the opt_compat.h include. 2023-02-12 20:24:32 +03:00
linux_elf.h linux(4): Deduplicate linux_trans_osrel(). 2023-02-02 17:58:07 +03:00
linux_emul.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_emul.h linux(4): Microoptimize linux_elf.h for future use. 2023-02-02 17:58:06 +03:00
linux_errno.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_errno.h linux: Fix ptrace panic with ERESTART 2021-10-29 14:55:59 +01:00
linux_errno.inc
linux_event.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_event.h Drop rdivacky@ "All rights reserved" from linux_event. 2021-07-20 10:06:16 +03:00
linux_file.c linux(4): Implement close_range over native 2023-04-04 23:24:04 +03:00
linux_file.h linux(4): Implement close_range over native 2023-04-04 23:24:04 +03:00
linux_fork.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_fork.h linux(4): Add CLONE_PIDFD option bit. 2021-08-12 11:55:24 +03:00
linux_futex.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_futex.h linux(4): Deduplicate MI futex structures. 2023-02-01 21:57:04 +03:00
linux_getcwd.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_ioctl.c linux(4): Drop excess assert that Linux IFNAMSIZ is equal to FreeBSD 2023-03-04 12:11:39 +03:00
linux_ioctl.h linux: Improve debugging by recognizing TIOCGPTPEER 2022-01-10 15:36:11 +00:00
linux_ipc64.h
linux_ipc.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_ipc.h linux(4): Implement semtimedop syscalls. 2022-05-06 20:02:59 +03:00
linux_mib.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_mib.h linux(4): Rid unused defines from linux_mib. 2022-03-31 20:45:12 +03:00
linux_misc.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_misc.h linux(4): Cleanup sys/sysctl.h from linux_misc.h 2023-02-14 17:46:32 +03:00
linux_mmap.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_mmap.h
linux_netlink.c net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH 2023-04-17 09:08:35 -07:00
linux_persona.h
linux_ptrace.c Add security.bsd.allow_ptrace sysctl 2022-01-22 19:36:56 +02:00
linux_rseq.c linux(4): Add a simple rseq syscall implementation. 2022-04-26 19:35:56 +03:00
linux_siginfo.h linux(4): Add kernel signal code definitions 2022-05-19 19:55:56 +03:00
linux_signal.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_signal.h linux(4): Trace Linux l_sigset_t. 2022-06-22 14:09:54 +03:00
linux_socket.c linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD 2023-03-04 12:11:38 +03:00
linux_socket.h linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD 2023-03-04 12:11:38 +03:00
linux_stats.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_sysctl.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_sysproto.h
linux_time.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_time.h linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_timer.c linux(4): Rename linux_timer.h to linux_time.h 2023-02-14 17:46:33 +03:00
linux_uid16.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_util.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_util.h linux(4): Move use_real_names knob to the linux.c 2023-02-14 17:46:32 +03:00
linux_vdso_gtod.inc linux(4): Implement __vdso_time 2022-07-04 23:41:32 +03:00
linux_vdso.c linux(4): Cleanup includes under compat/linux 2023-02-14 17:46:32 +03:00
linux_vdso.h Drop "All rights reserved" from my copyright statements. 2021-07-20 10:05:50 +03:00
linux_videodev2_compat.h
linux_videodev_compat.h
linux.c linux: Use the if_name() accessor to get loopback name 2023-03-07 09:47:01 -05:00
linux.h linux(4): Migrate to IfAPI 2023-03-04 12:11:38 +03:00
stats_timing.d
trace_futexes.d