summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2003-03-04 23:19:55 +0000
committerjlemon <jlemon@FreeBSD.org>2003-03-04 23:19:55 +0000
commit04e28d5a816573d1300b4591306a8785d3ace29c (patch)
treef304f726e8973253d3e8a87e56119fec0276a61c /sys/netinet/ip_input.c
parent45fcac94f475f1d18d50dde4f72eb51ee4abddcc (diff)
downloadFreeBSD-src-04e28d5a816573d1300b4591306a8785d3ace29c.zip
FreeBSD-src-04e28d5a816573d1300b4591306a8785d3ace29c.tar.gz
Update netisr handling; Each SWI now registers its queue, and all queue
drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index afac57c..44e4eda 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -65,7 +65,6 @@
#include <net/if_dl.h>
#include <net/route.h>
#include <net/netisr.h>
-#include <net/intrq.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -156,6 +155,7 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW,
static int ipprintfs = 0;
#endif
+static struct ifqueue ipintrq;
static int ipqmaxlen = IFQ_MAXLEN;
extern struct domain inetdomain;
@@ -233,7 +233,6 @@ static void ip_forward(struct mbuf *m, int srcrt,
static void ip_freef(struct ipqhead *, struct ipq *);
static struct mbuf *ip_reass(struct mbuf *, struct ipqhead *,
struct ipq *, u_int32_t *, u_int16_t *);
-static void ipintr(void);
/*
* IP initialization: fill in IP protocol switch table.
@@ -269,9 +268,7 @@ ip_init()
#endif
ipintrq.ifq_maxlen = ipqmaxlen;
mtx_init(&ipintrq.ifq_mtx, "ip_inq", NULL, MTX_DEF);
- ipintrq_present = 1;
-
- register_netisr(NETISR_IP, ipintr);
+ netisr_register(NETISR_IP, ip_input, &ipintrq);
}
/*
@@ -951,22 +948,6 @@ bad:
}
/*
- * IP software interrupt routine - to go away sometime soon
- */
-static void
-ipintr(void)
-{
- struct mbuf *m;
-
- while (1) {
- IF_DEQUEUE(&ipintrq, m);
- if (m == 0)
- return;
- ip_input(m);
- }
-}
-
-/*
* Take incoming datagram fragment and try to reassemble it into
* whole datagram. If a chain for reassembly of this datagram already
* exists, then it is given as fp; otherwise have to make a chain.
OpenPOWER on IntegriCloud