summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bpe.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2019-04-23 10:53:45 +0000
committerdlg <dlg@openbsd.org>2019-04-23 10:53:45 +0000
commit26415d92bd9308bb6af8c530d2e314e144b121f0 (patch)
tree161f40b6481691306ce00e8a250f972e7aa77976 /sys/net/if_bpe.c
parentAdd -no-clear variants of copy-selection and copy-pipe which do not (diff)
downloadwireguard-openbsd-26415d92bd9308bb6af8c530d2e314e144b121f0.tar.xz
wireguard-openbsd-26415d92bd9308bb6af8c530d2e314e144b121f0.zip
a first cut at converting some virtual ethernet interfaces to if_vinput
this let's input processing bypass ifiqs. there's a performance benefit from this, and it will let me tweak the backpressure detection mechanism that ifiqs use without impacting on a stack of virtual interfaces. ive tested all of these except mpw, which i will end up testing soon anyway.
Diffstat (limited to 'sys/net/if_bpe.c')
-rw-r--r--sys/net/if_bpe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/if_bpe.c b/sys/net/if_bpe.c
index c307a4caf76..c86f7810b6f 100644
--- a/sys/net/if_bpe.c
+++ b/sys/net/if_bpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bpe.c,v 1.4 2019/04/19 07:39:37 dlg Exp $ */
+/* $OpenBSD: if_bpe.c,v 1.5 2019/04/23 10:53:45 dlg Exp $ */
/*
* Copyright (c) 2018 David Gwynne <dlg@openbsd.org>
*
@@ -194,6 +194,7 @@ bpe_clone_create(struct if_clone *ifc, int unit)
IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
ether_fakeaddr(ifp);
+ if_counters_alloc(ifp);
if_attach(ifp);
ether_ifattach(ifp);
@@ -891,7 +892,6 @@ bpe_input_map(struct bpe_softc *sc, const uint8_t *ba, const uint8_t *ca)
void
bpe_input(struct ifnet *ifp0, struct mbuf *m)
{
- struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct bpe_softc *sc;
struct ifnet *ifp;
struct ether_header *beh, *ceh;
@@ -969,8 +969,7 @@ bpe_input(struct ifnet *ifp0, struct mbuf *m)
pf_pkt_addr_changed(m);
#endif
- ml_enqueue(&ml, m);
- if_input(ifp, &ml);
+ if_vinput(ifp, m);
return;
drop: