diff options
| author | Jonathan Lemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
|---|---|---|
| committer | Jonathan Lemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
| commit | 1cafed3941f1a4e9d2beb4fb126e91018505dfd4 (patch) | |
| tree | f304f726e8973253d3e8a87e56119fec0276a61c /sys/netnatm | |
| parent | c141c242ac0a55a34b58cf2b06d13964d00507a4 (diff) | |
Notes
Diffstat (limited to 'sys/netnatm')
| -rw-r--r-- | sys/netnatm/natm.c | 28 | ||||
| -rw-r--r-- | sys/netnatm/natm.h | 3 | ||||
| -rw-r--r-- | sys/netnatm/natm_proto.c | 6 |
3 files changed, 7 insertions, 30 deletions
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c index e0535b6d5fbf..2df3c226e255 100644 --- a/sys/netnatm/natm.c +++ b/sys/netnatm/natm.c @@ -698,21 +698,12 @@ done: */ void -natmintr() - +natmintr(struct mbuf *m) { int s; - struct mbuf *m; struct socket *so; struct natmpcb *npcb; -next: - s = splimp(); - IF_DEQUEUE(&natmintrq, m); - splx(s); - if (m == NULL) - return; - #ifdef DIAGNOSTIC if ((m->m_flags & M_PKTHDR) == 0) panic("natmintr no HDR"); @@ -729,12 +720,12 @@ next: m_freem(m); if (npcb->npcb_inq == 0) FREE(npcb, M_PCB); /* done! */ - goto next; + return; } if (npcb->npcb_flags & NPCB_FREE) { m_freem(m); /* drop */ - goto next; + return; } #ifdef NEED_TO_RESTORE_IFP @@ -760,21 +751,8 @@ m->m_pkthdr.rcvif = NULL; /* null it out to be safe */ #endif m_freem(m); } - - goto next; } -#if defined(__FreeBSD__) -static void -netisr_natm_setup(void *dummy __unused) -{ - - register_netisr(NETISR_NATM, natmintr); -} -SYSINIT(natm_setup, SI_SUB_CPU, SI_ORDER_ANY, netisr_natm_setup, NULL); -#endif - - /* * natm0_sysctl: not used, but here in case we want to add something * later... diff --git a/sys/netnatm/natm.h b/sys/netnatm/natm.h index b69500605e73..aa4cf3c3f092 100644 --- a/sys/netnatm/natm.h +++ b/sys/netnatm/natm.h @@ -111,7 +111,6 @@ LIST_HEAD(npcblist, natmpcb); /* global data structures */ extern struct npcblist natm_pcbs; /* global list of pcbs */ -extern struct ifqueue natmintrq; /* natm packet input queue */ #define NATM_STAT #ifdef NATM_STAT extern u_int natm_sodropcnt, @@ -153,6 +152,6 @@ int natm_usrreq(struct socket *, int, struct mbuf *, #endif int natm0_sysctl(int *, u_int, void *, size_t *, void *, size_t); int natm5_sysctl(int *, u_int, void *, size_t *, void *, size_t); -void natmintr(void); +void natmintr(struct mbuf *); #endif diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c index 610602671be5..10b78bb28145 100644 --- a/sys/netnatm/natm_proto.c +++ b/sys/netnatm/natm_proto.c @@ -46,7 +46,7 @@ #include <sys/domain.h> #include <net/if.h> -#include <net/intrq.h> +#include <net/netisr.h> #include <netinet/in.h> @@ -107,6 +107,7 @@ static struct domain natmdomain = 0, 0, 0}; static int natmqmaxlen = IFQ_MAXLEN; /* max # of packets on queue */ +static struct ifqueue natmintrq; #ifdef NATM_STAT u_int natm_sodropcnt = 0; /* # mbufs dropped due to full sb */ u_int natm_sodropbytes = 0; /* # of bytes dropped */ @@ -122,8 +123,7 @@ static void natm_init() bzero(&natmintrq, sizeof(natmintrq)); natmintrq.ifq_maxlen = natmqmaxlen; mtx_init(&natmintrq.ifq_mtx, "natm_inq", NULL, MTX_DEF); - natmintrq_present = 1; - + netisr_register(NETISR_NATM, natmintr, &natmintrq); } #if defined(__FreeBSD__) |
