OpenBSD cvs log

created 2018-12-30T10:54:31Z
begin 2018-12-11T00:00:00Z
end 2018-12-12T00:00:00Z
path src/sys
commits 5

date 2018-12-11T01:27:08Z
author dlg
files src/sys/net/if_ethersubr.c log diff annotate
src/sys/netinet/if_ether.h log diff annotate
message split ether_output into resolution, encapsulation, and output functions

if if_output can be overridden on ethernet interfaces, it will allow
things like vlan to do it's packet encapsulation during output
before putting the packet directly on the underlying interface for

this has two benefits. first, it can avoid having ether_output on
pseudo interfaces recurse, which makes profiling of the network
stack a lot clearer. secondly, and more importantly, it allows
pseudo ethernet interface packet encapsulation to by run concurrently
by the stack, rather than having packets unnecessarily serialied
by an ifq.

this diff just splits ether_output up, it doesnt have any interface
take advantage of it yet.

tweaks and ok claudio@

date 2018-12-11T01:33:05Z
author dlg
files src/sys/net/ifq.c log diff annotate
src/sys/net/ifq.h log diff annotate
message add ifq_hdatalen for getting the size of the packet at the head of an ifq

this gets the locks right, and returns 0 if there's no packet available.

ok stsp@

date 2018-12-11T01:34:10Z
author dlg
files src/sys/net/if_tun.c log diff annotate
message use ifq_hdatalen for handling the FIONREAD ioctl

ok stsp@

date 2018-12-11T01:36:42Z
author dlg
files src/sys/net/ifq.c log diff annotate
src/sys/net/ifq.h log diff annotate
message provide ifq_is_priq, mostly so things can tell if hfsc is in effect or not.

date 2018-12-11T22:08:57Z
author dlg
files src/sys/net/if.c log diff annotate
src/sys/net/if_var.h log diff annotate
message add optional per-cpu counters for interface stats.

these exist so interfaces that want to do mpsafe work outside the
ifq machinery have a place to allocate and update stats in. the
generic ioctl handling for getting stats to userland knows how to
roll the new per cpu stats into the rest before export.

ok visa@