Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v retrieving revision 1.116.2.1 retrieving revision 1.117 diff -u -p -r1.116.2.1 -r1.117 --- src/sys/netinet6/ip6_input.c 2008/05/18 12:35:35 1.116.2.1 +++ src/sys/netinet6/ip6_input.c 2008/04/23 06:09:05 1.117 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.116.2.1 2008/05/18 12:35:35 yamt Exp $ */ +/* $NetBSD: ip6_input.c,v 1.117 2008/04/23 06:09:05 thorpej Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.116.2.1 2008/05/18 12:35:35 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.117 2008/04/23 06:09:05 thorpej Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -206,11 +206,11 @@ ip6_init2(void *dummy) { /* nd6_timer_init */ - callout_init(&nd6_timer_ch, CALLOUT_MPSAFE); + callout_init(&nd6_timer_ch, 0); callout_reset(&nd6_timer_ch, hz, nd6_timer, NULL); /* timer for regeneranation of temporary addresses randomize ID */ - callout_init(&in6_tmpaddrtimer_ch, CALLOUT_MPSAFE); + callout_init(&in6_tmpaddrtimer_ch, 0); callout_reset(&in6_tmpaddrtimer_ch, (ip6_temp_preferred_lifetime - ip6_desync_factor - ip6_temp_regen_advance) * hz, @@ -226,23 +226,19 @@ ip6intr(void) int s; struct mbuf *m; - mutex_enter(softnet_lock); - KERNEL_LOCK(1, NULL); for (;;) { s = splnet(); IF_DEQUEUE(&ip6intrq, m); splx(s); if (m == 0) - break; + return; /* drop the packet if IPv6 operation is disabled on the IF */ if ((ND_IFINFO(m->m_pkthdr.rcvif)->flags & ND6_IFF_IFDISABLED)) { m_freem(m); - break; + return; } ip6_input(m); } - KERNEL_UNLOCK_ONE(NULL); - mutex_exit(softnet_lock); } extern struct route ip6_forward_rt; @@ -1654,8 +1650,13 @@ u_char inet6ctlerrmap[PRC_NCMDS] = { static int sysctl_net_inet6_ip6_stats(SYSCTLFN_ARGS) { + netstat_sysctl_context ctx; + uint64_t ip6s[IP6_NSTATS]; - return (NETSTAT_SYSCTL(ip6stat_percpu, IP6_NSTATS)); + ctx.ctx_stat = ip6stat_percpu; + ctx.ctx_counters = ip6s; + ctx.ctx_ncounters = IP6_NSTATS; + return (NETSTAT_SYSCTL(&ctx)); } SYSCTL_SETUP(sysctl_net_inet6_ip6_setup, "sysctl net.inet6.ip6 subtree setup")