aboutsummaryrefslogtreecommitdiff
path: root/crypto/krb5/doc/html/appdev/refs
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2025-12-18 16:47:39 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2025-12-18 19:15:53 +0000
commit0d469d23715d690b863787ebfa51529e1f6a9092 (patch)
tree0390fed17b039cdc00f0b2a0e18f7698c0b13b46 /crypto/krb5/doc/html/appdev/refs
parent713b57c414b789fd6c3eb2ce7ecb682b6cb4ba30 (diff)
net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)HEADmain
This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods. The if_afdata[] array is a relic of the era, when there was expectation that many transport protocols will coexist with IP, e.g. IPX or NetAtalk. The array hasn't had any members except AF_INET and AF_INET6 for over a decade already. This change removes the array and just leaves two pointer fields: if_inet and if_inet6. The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) framework and was a good enough method to initialize protocol contexts back then. Today there is no good reason to treat IPv4 and IPv6 stacks differently to other protocols/features that attach and detach from an interface. The locking of if_afdata[] is a relic of SMPng times, when the system startup and the interface attach was even more convoluted than before this change, and we also had unloadable protocols that used a field in if_afdata[]. Note that IPv4 and IPv6 are not unloadable. Note that this change removes NET_EPOCH_WAIT() from the interface detach sequence. This may surface several new races associated with interface removal. I failed to hit any with consecutive test suite runs, though. The expected general race scenario is that while struct ifnet is freed with proper epoch_call(9) itself, some structures hanging off ifnet are freed with direct free(9). The proper fix is either make if_foo point at some static "dead" structure providing SMP visibility of this store, or free those structure with epoch_call(9). All of these cases are planned to be found and resolved during 16.0-CURRENT lifetime. Reviewed by: zlei, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D54089
Diffstat (limited to 'crypto/krb5/doc/html/appdev/refs')
0 files changed, 0 insertions, 0 deletions