summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-05-30 07:50:38 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-05-30 07:50:38 +0000
commitf821aa1c0a176765b922adda04e7978033816e93 (patch)
treef61129b0cc445f31adf461d1eabbc0438b2fe8aa /sys/dev
parentdef6d835df8ef7186f4a9e02f0911bbfe939e469 (diff)
Introduce ipv{4,6}_input(), two wrappers around IP queues.
This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_umb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c
index a7843ab0375..1fbf2ea9c15 100644
--- a/sys/dev/usb/if_umb.c
+++ b/sys/dev/usb/if_umb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_umb.c,v 1.13 2017/05/18 14:48:27 bluhm Exp $ */
+/* $OpenBSD: if_umb.c,v 1.14 2017/05/30 07:50:37 mpi Exp $ */
/*
* Copyright (c) 2016 genua mbH
@@ -768,7 +768,6 @@ umb_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
int
umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
{
- struct niqueue *inq;
uint8_t ipv;
if ((ifp->if_flags & IFF_UP) == 0) {
@@ -789,12 +788,12 @@ umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
ifp->if_ibytes += m->m_pkthdr.len;
switch (ipv) {
case 4:
- inq = &ipintrq;
- break;
+ ipv4_input(ifp, m);
+ return 1;
#ifdef INET6
case 6:
- inq = &ip6intrq;
- break;
+ ipv6_input(ifp, m);
+ return 1;
#endif /* INET6 */
default:
ifp->if_ierrors++;
@@ -803,7 +802,6 @@ umb_input(struct ifnet *ifp, struct mbuf *m, void *cookie)
m_freem(m);
return 1;
}
- niq_enqueue(inq, m);
return 1;
}