netisr.c (180239) | netisr.c (191816) |
---|---|
1/*- 2 * Copyright (c) 2001,2002,2003 Jonathan Lemon <jlemon@FreeBSD.org> 3 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 2001,2002,2003 Jonathan Lemon <jlemon@FreeBSD.org> 3 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/net/netisr.c 180239 2008-07-04 00:21:38Z rwatson $ | 27 * $FreeBSD: head/sys/net/netisr.c 191816 2009-05-05 10:56:12Z zec $ |
28 */ 29 30#include "opt_device_polling.h" 31 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/rtprio.h> 35#include <sys/systm.h> 36#include <sys/interrupt.h> 37#include <sys/kernel.h> 38#include <sys/kthread.h> 39#include <sys/lock.h> 40#include <sys/malloc.h> 41#include <sys/proc.h> 42#include <sys/random.h> 43#include <sys/resourcevar.h> 44#include <sys/sysctl.h> 45#include <sys/unistd.h> | 28 */ 29 30#include "opt_device_polling.h" 31 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/rtprio.h> 35#include <sys/systm.h> 36#include <sys/interrupt.h> 37#include <sys/kernel.h> 38#include <sys/kthread.h> 39#include <sys/lock.h> 40#include <sys/malloc.h> 41#include <sys/proc.h> 42#include <sys/random.h> 43#include <sys/resourcevar.h> 44#include <sys/sysctl.h> 45#include <sys/unistd.h> |
46#include <sys/vimage.h> |
|
46#include <machine/atomic.h> 47#include <machine/cpu.h> 48#include <machine/stdarg.h> 49 50#include <sys/mbuf.h> 51#include <sys/socket.h> 52 53#include <net/if.h> --- 83 unchanged lines hidden (view full) --- 137netisr_processqueue(struct netisr *ni) 138{ 139 struct mbuf *m; 140 141 for (;;) { 142 IF_DEQUEUE(ni->ni_queue, m); 143 if (m == NULL) 144 break; | 47#include <machine/atomic.h> 48#include <machine/cpu.h> 49#include <machine/stdarg.h> 50 51#include <sys/mbuf.h> 52#include <sys/socket.h> 53 54#include <net/if.h> --- 83 unchanged lines hidden (view full) --- 138netisr_processqueue(struct netisr *ni) 139{ 140 struct mbuf *m; 141 142 for (;;) { 143 IF_DEQUEUE(ni->ni_queue, m); 144 if (m == NULL) 145 break; |
146 VNET_ASSERT(m->m_pkthdr.rcvif != NULL); 147 CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); |
|
145 ni->ni_handler(m); | 148 ni->ni_handler(m); |
149 CURVNET_RESTORE(); |
|
146 } 147} 148 149/* 150 * Call the netisr directly instead of queueing the packet, if possible. 151 */ 152void 153netisr_dispatch(int num, struct mbuf *m) --- 100 unchanged lines hidden --- | 150 } 151} 152 153/* 154 * Call the netisr directly instead of queueing the packet, if possible. 155 */ 156void 157netisr_dispatch(int num, struct mbuf *m) --- 100 unchanged lines hidden --- |