OpenBSD cvs log

created 2020-01-27T00:11:24Z
begin 2019-11-06T00:00:00Z
end 2019-11-06T03:51:26Z
path src/sys
commits 1

date 2019-11-06T03:51:26Z
author dlg
files src/sys/net/if.c log diff annotate
src/sys/net/if_aggr.c log diff annotate
src/sys/net/if_bpe.c log diff annotate
src/sys/net/if_bridge.c log diff annotate
src/sys/net/if_bridge.h log diff annotate
src/sys/net/if_gre.c log diff annotate
src/sys/net/if_pfsync.c log diff annotate
src/sys/net/if_switch.c log diff annotate
src/sys/net/if_switch.h log diff annotate
src/sys/net/if_tpmr.c log diff annotate
src/sys/net/if_trunk.c log diff annotate
src/sys/net/if_trunk.h log diff annotate
src/sys/net/if_var.h log diff annotate
src/sys/net/if_vlan.c log diff annotate
src/sys/net/if_vxlan.c log diff annotate
src/sys/netinet/ip_carp.c log diff annotate
message replace the hooks used with if_detachhooks with a task list.

the main semantic change is that things registering detach hooks
have to allocate and set a task structure that then gets added to
the list. this means if the task is allocated up front (eg, as part
of carps softc or bridges port structure), it avoids the possibility
that adding a hook can fail. a lot of drivers weren't checking for
failure, and unwinding state in the event of failure in other parts
was error prone.

while doing this i discovered that the list operations have to be
in a particular order, but drivers weren't doing that consistently
either. this diff wraps the list ops up so you have to seriously
go out of your way to screw them up.

ive also sprinkled some NET_ASSERT_LOCKED around the list operations
so we can make sure there's no potential for the list to be corrupted,
especially while it's being run.

hrvoje popovski has tested this a bit, and some issues he discovered
have been fixed.

ok sashan@