diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-04-22 03:26:17 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-04-22 03:26:17 +0000 |
commit | 782e69f62d32ccd5d86bd087b5f0c760a122b8db (patch) | |
tree | 1bba597db88b6fd452df6595a53ce0add0f9f6ed /sys/net/if_var.h | |
parent | 499144806daac2a213e9f2cc21e62806af60c154 (diff) |
add if_vinput so pseudo (ethernet) interfaces can bypass ifiqs
if_vinput assumes that the interface that its called against uses
per cpu counters so it can count input packets, but basically does
all the things that if_input and ifiq_input do. the main difference
is it assumes the network stack is already running and runs the
interface input handlers directly. this is instead of queuing the
packets for a nettq to run.
ifiqs arent free, especially when they only run per packet like
they do on psuedo interfaces. this allows that overhead to be
bypassed.
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r-- | sys/net/if_var.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 9547f66462f..fa61488f71d 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.97 2019/04/19 07:38:02 dlg Exp $ */ +/* $OpenBSD: if_var.h,v 1.98 2019/04/22 03:26:16 dlg Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -341,6 +341,7 @@ void if_start(struct ifnet *); int if_enqueue(struct ifnet *, struct mbuf *); int if_enqueue_ifq(struct ifnet *, struct mbuf *); void if_input(struct ifnet *, struct mbuf_list *); +void if_vinput(struct ifnet *, struct mbuf *); void if_input_process(struct ifnet *, struct mbuf_list *); int if_input_local(struct ifnet *, struct mbuf *, sa_family_t); int if_output_local(struct ifnet *, struct mbuf *, sa_family_t); |