diff options
author | jlemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2003-03-04 23:19:55 +0000 |
commit | 04e28d5a816573d1300b4591306a8785d3ace29c (patch) | |
tree | f304f726e8973253d3e8a87e56119fec0276a61c /sys/netinet6 | |
parent | 45fcac94f475f1d18d50dde4f72eb51ee4abddcc (diff) | |
download | FreeBSD-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/netinet6')
-rw-r--r-- | sys/netinet6/ah_input.c | 6 | ||||
-rw-r--r-- | sys/netinet6/esp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet6/in6_var.h | 1 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 24 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 1 |
5 files changed, 6 insertions, 32 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index 0afdfed..d7d3030 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -454,13 +454,12 @@ ah4_input(m, off) goto fail; } - if (! IF_HANDOFF(&ipintrq, m, NULL)) { + if (! netisr_queue(NETISR_IP, m)) { ipsecstat.in_inval++; m = NULL; goto fail; } m = NULL; - schednetisr(NETISR_IP); /* can be skipped but to make sure */ nxt = IPPROTO_DONE; } else { /* @@ -852,13 +851,12 @@ ah6_input(mp, offp, proto) goto fail; } - if (! IF_HANDOFF(&ip6intrq, m, NULL)) { + if (! netisr_queue(NETISR_IPV6, m)) { ipsec6stat.in_inval++; m = NULL; goto fail; } m = NULL; - schednetisr(NETISR_IPV6); /* can be skipped but to make sure */ nxt = IPPROTO_DONE; } else { /* diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c index d8de60c..43f0a61 100644 --- a/sys/netinet6/esp_input.c +++ b/sys/netinet6/esp_input.c @@ -388,13 +388,12 @@ noreplaycheck: goto bad; } - if (! IF_HANDOFF(&ipintrq, m, NULL)) { + if (! netisr_queue(NETISR_IP, m)) { ipsecstat.in_inval++; m = NULL; goto bad; } m = NULL; - schednetisr(NETISR_IP); /* can be skipped but to make sure */ nxt = IPPROTO_DONE; } else { /* @@ -750,13 +749,12 @@ noreplaycheck: goto bad; } - if (! IF_HANDOFF(&ip6intrq, m, NULL)) { + if (! netisr_queue(NETISR_IPV6, m)) { ipsec6stat.in_inval++; m = NULL; goto bad; } m = NULL; - schednetisr(NETISR_IPV6); /* can be skipped but to make sure */ nxt = IPPROTO_DONE; } else { /* diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index fc2242a..35f9e5b 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -460,7 +460,6 @@ do { \ } \ } while (0) -extern struct ifqueue ip6intrq; /* IP6 packet input queue */ extern struct in6_addr zeroin6_addr; extern u_char inet6ctlerrmap[]; extern unsigned long in6_maxmtu; diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 1f37bae..bb46d35 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -90,7 +90,6 @@ #include <net/if_dl.h> #include <net/route.h> #include <net/netisr.h> -#include <net/intrq.h> #ifdef PFIL_HOOKS #include <net/pfil.h> #endif @@ -132,6 +131,7 @@ extern struct domain inet6domain; u_char ip6_protox[IPPROTO_MAX]; +static struct ifqueue ip6intrq; static int ip6qmaxlen = IFQ_MAXLEN; struct in6_ifaddr *in6_ifaddr; @@ -186,8 +186,7 @@ ip6_init() ip6_protox[pr->pr_protocol] = pr - inet6sw; ip6intrq.ifq_maxlen = ip6qmaxlen; mtx_init(&ip6intrq.ifq_mtx, "ip6_inq", NULL, MTX_DEF); - ip6intrq_present = 1; - register_netisr(NETISR_IPV6, ip6intr); + netisr_register(NETISR_IPV6, ip6_input, &ip6intrq); nd6_init(); frag6_init(); /* @@ -230,25 +229,6 @@ ip6_init2(dummy) /* This must be after route_init(), which is now SI_ORDER_THIRD */ SYSINIT(netinet6init2, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ip6_init2, NULL); -/* - * IP6 input interrupt handling. Just pass the packet to ip6_input. - */ -void -ip6intr() -{ - int s; - struct mbuf *m; - - for (;;) { - s = splimp(); - IF_DEQUEUE(&ip6intrq, m); - splx(s); - if (m == 0) - return; - ip6_input(m); - } -} - extern struct route_in6 ip6_forward_rt; void diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 9edb73b..7ffdf1e 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -294,7 +294,6 @@ int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt)); struct in6_ifaddr; void ip6_init __P((void)); -void ip6intr __P((void)); void ip6_input __P((struct mbuf *)); struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *)); void ip6_freepcbopts __P((struct ip6_pktopts *)); |