diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-07-22 02:16:03 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-07-22 02:16:03 +0000 |
commit | e7539b190c92e728ca85bde26d2ba6e8599ec22c (patch) | |
tree | 855bd097524f5c275d95140541bec54bcee6faae /sys/netinet | |
parent | 2a91cae0189e06d8a9ef9b033ff30a43f9c53bb4 (diff) |
deprecate interface input handler lists, just use one input function.
the interface input handler lists were originally set up to help
us during the intial mpsafe network stack work. at the time not all
the virtual ethernet interfaces (vlan, svlan, bridge, trunk, etc)
were mpsafe, so we wanted a way to avoid them by default, and only
take the kernel lock hit when they were specifically enabled on the
interface. since then, they have been fixed up to be mpsafe.
i could leave the list in place, but it has some semantic problems.
because virtual interfaces filter packets based on the order they
were attached to the parent interface, you can get packets taken
away in surprising ways, especially when you reboot and netstart
does something different to what you did by hand. by hardcoding the
order that things like vlan and bridge get to look at packets, we
can document the behaviour and get consistency.
it also means we can get rid of a use of SRPs which were difficult
to replace with SMRs. the interface input handler list is an SRPL,
which we would like to deprecate. it turns out that you can sleep
during stack processing, which you're not supposed to do with SRPs
or SMRs, but SRPs are a lot more forgiving and it worked.
lastly, it turns out that this code is faster than the input list
handling, so lots of winning all around.
special thanks to hrvoje popovski and aaron bieber for testing.
this has been in snaps as part of a larger diff for over a week.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 5ae7228509f..8ae1f2b3bce 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.h,v 1.77 2020/07/22 00:29:00 dlg Exp $ */ +/* $OpenBSD: if_ether.h,v 1.78 2020/07/22 02:16:02 dlg Exp $ */ /* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */ /* @@ -253,7 +253,7 @@ int ether_multiaddr(struct sockaddr *, u_int8_t[], u_int8_t[]); void ether_ifattach(struct ifnet *); void ether_ifdetach(struct ifnet *); int ether_ioctl(struct ifnet *, struct arpcom *, u_long, caddr_t); -int ether_input(struct ifnet *, struct mbuf *, void *); +void ether_input(struct ifnet *, struct mbuf *); int ether_resolve(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *, struct ether_header *); struct mbuf * |