xref: /netbsd-src/sys/netinet/tcp_timer.c (revision 001c68bd94f75ce9270b69227c4199fbf34ee396)
1 /*	$NetBSD: tcp_timer.c,v 1.62 2003/02/03 23:51:04 thorpej Exp $	*/
2 
3 /*
4  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  * 3. Neither the name of the project nor the names of its contributors
16  *    may be used to endorse or promote products derived from this software
17  *    without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29  * SUCH DAMAGE.
30  */
31 
32 /*-
33  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
34  * All rights reserved.
35  *
36  * This code is derived from software contributed to The NetBSD Foundation
37  * by Jason R. Thorpe and Kevin M. Lahey of the Numerical Aerospace Simulation
38  * Facility, NASA Ames Research Center.
39  *
40  * Redistribution and use in source and binary forms, with or without
41  * modification, are permitted provided that the following conditions
42  * are met:
43  * 1. Redistributions of source code must retain the above copyright
44  *    notice, this list of conditions and the following disclaimer.
45  * 2. Redistributions in binary form must reproduce the above copyright
46  *    notice, this list of conditions and the following disclaimer in the
47  *    documentation and/or other materials provided with the distribution.
48  * 3. All advertising materials mentioning features or use of this software
49  *    must display the following acknowledgement:
50  *	This product includes software developed by the NetBSD
51  *	Foundation, Inc. and its contributors.
52  * 4. Neither the name of The NetBSD Foundation nor the names of its
53  *    contributors may be used to endorse or promote products derived
54  *    from this software without specific prior written permission.
55  *
56  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
57  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
58  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
59  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
60  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
61  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
62  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
63  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
64  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
66  * POSSIBILITY OF SUCH DAMAGE.
67  */
68 
69 /*
70  * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
71  *	The Regents of the University of California.  All rights reserved.
72  *
73  * Redistribution and use in source and binary forms, with or without
74  * modification, are permitted provided that the following conditions
75  * are met:
76  * 1. Redistributions of source code must retain the above copyright
77  *    notice, this list of conditions and the following disclaimer.
78  * 2. Redistributions in binary form must reproduce the above copyright
79  *    notice, this list of conditions and the following disclaimer in the
80  *    documentation and/or other materials provided with the distribution.
81  * 3. All advertising materials mentioning features or use of this software
82  *    must display the following acknowledgement:
83  *	This product includes software developed by the University of
84  *	California, Berkeley and its contributors.
85  * 4. Neither the name of the University nor the names of its contributors
86  *    may be used to endorse or promote products derived from this software
87  *    without specific prior written permission.
88  *
89  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
90  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
92  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
93  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
94  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
95  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
96  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
97  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
98  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
99  * SUCH DAMAGE.
100  *
101  *	@(#)tcp_timer.c	8.2 (Berkeley) 5/24/95
102  */
103 
104 #include <sys/cdefs.h>
105 __KERNEL_RCSID(0, "$NetBSD: tcp_timer.c,v 1.62 2003/02/03 23:51:04 thorpej Exp $");
106 
107 #include "opt_inet.h"
108 #include "opt_tcp_debug.h"
109 
110 #include <sys/param.h>
111 #include <sys/systm.h>
112 #include <sys/malloc.h>
113 #include <sys/mbuf.h>
114 #include <sys/socket.h>
115 #include <sys/socketvar.h>
116 #include <sys/protosw.h>
117 #include <sys/errno.h>
118 #include <sys/kernel.h>
119 
120 #include <net/if.h>
121 #include <net/route.h>
122 
123 #include <netinet/in.h>
124 #include <netinet/in_systm.h>
125 #include <netinet/ip.h>
126 #include <netinet/in_pcb.h>
127 #include <netinet/ip_var.h>
128 
129 #ifdef INET6
130 #ifndef INET
131 #include <netinet/in.h>
132 #endif
133 #include <netinet/ip6.h>
134 #include <netinet6/in6_pcb.h>
135 #endif
136 
137 #include <netinet/tcp.h>
138 #include <netinet/tcp_fsm.h>
139 #include <netinet/tcp_seq.h>
140 #include <netinet/tcp_timer.h>
141 #include <netinet/tcp_var.h>
142 #include <netinet/tcpip.h>
143 #ifdef TCP_DEBUG
144 #include <netinet/tcp_debug.h>
145 #endif
146 
147 /*
148  * Various tunable timer parameters.  These are initialized in tcp_init(),
149  * unless they are patched.
150  */
151 int	tcp_keepidle = 0;
152 int	tcp_keepintvl = 0;
153 int	tcp_keepcnt = 0;		/* max idle probes */
154 int	tcp_maxpersistidle = 0;		/* max idle time in persist */
155 int	tcp_maxidle;			/* computed in tcp_slowtimo() */
156 
157 /*
158  * Time to delay the ACK.  This is initialized in tcp_init(), unless
159  * its patched.
160  */
161 int	tcp_delack_ticks = 0;
162 
163 void	tcp_timer_rexmt(void *);
164 void	tcp_timer_persist(void *);
165 void	tcp_timer_keep(void *);
166 void	tcp_timer_2msl(void *);
167 
168 const tcp_timer_func_t tcp_timer_funcs[TCPT_NTIMERS] = {
169 	tcp_timer_rexmt,
170 	tcp_timer_persist,
171 	tcp_timer_keep,
172 	tcp_timer_2msl,
173 };
174 
175 /*
176  * Timer state initialization, called from tcp_init().
177  */
178 void
179 tcp_timer_init(void)
180 {
181 
182 	if (tcp_keepidle == 0)
183 		tcp_keepidle = TCPTV_KEEP_IDLE;
184 
185 	if (tcp_keepintvl == 0)
186 		tcp_keepintvl = TCPTV_KEEPINTVL;
187 
188 	if (tcp_keepcnt == 0)
189 		tcp_keepcnt = TCPTV_KEEPCNT;
190 
191 	if (tcp_maxpersistidle == 0)
192 		tcp_maxpersistidle = TCPTV_KEEP_IDLE;
193 
194 	if (tcp_delack_ticks == 0)
195 		tcp_delack_ticks = TCP_DELACK_TICKS;
196 }
197 
198 /*
199  * Callout to process delayed ACKs for a TCPCB.
200  */
201 void
202 tcp_delack(void *arg)
203 {
204 	struct tcpcb *tp = arg;
205 	int s;
206 
207 	/*
208 	 * If tcp_output() wasn't able to transmit the ACK
209 	 * for whatever reason, it will restart the delayed
210 	 * ACK callout.
211 	 */
212 
213 	s = splsoftnet();
214 	tp->t_flags |= TF_ACKNOW;
215 	(void) tcp_output(tp);
216 	splx(s);
217 }
218 
219 /*
220  * Tcp protocol timeout routine called every 500 ms.
221  * Updates the timers in all active tcb's and
222  * causes finite state machine actions if timers expire.
223  */
224 void
225 tcp_slowtimo()
226 {
227 	int s;
228 
229 	s = splsoftnet();
230 	tcp_maxidle = tcp_keepcnt * tcp_keepintvl;
231 	tcp_iss_seq += TCP_ISSINCR;			/* increment iss */
232 	tcp_now++;					/* for timestamps */
233 	splx(s);
234 }
235 
236 /*
237  * Cancel all timers for TCP tp.
238  */
239 void
240 tcp_canceltimers(tp)
241 	struct tcpcb *tp;
242 {
243 	int i;
244 
245 	for (i = 0; i < TCPT_NTIMERS; i++)
246 		TCP_TIMER_DISARM(tp, i);
247 }
248 
249 const int	tcp_backoff[TCP_MAXRXTSHIFT + 1] =
250     { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
251 
252 const int	tcp_totbackoff = 511;	/* sum of tcp_backoff[] */
253 
254 /*
255  * TCP timer processing.
256  */
257 
258 void
259 tcp_timer_rexmt(void *arg)
260 {
261 	struct tcpcb *tp = arg;
262 	uint32_t rto;
263 	int s;
264 #ifdef TCP_DEBUG
265 	struct socket *so;
266 	short ostate;
267 #endif
268 
269 	s = splsoftnet();
270 
271 #ifdef TCP_DEBUG
272 #ifdef INET
273 	if (tp->t_inpcb)
274 		so = tp->t_inpcb->inp_socket;
275 #endif
276 #ifdef INET6
277 	if (tp->t_in6pcb)
278 		so = tp->t_in6pcb->in6p_socket;
279 #endif
280 	ostate = tp->t_state;
281 #endif /* TCP_DEBUG */
282 
283 	/*
284 	 * Retransmission timer went off.  Message has not
285 	 * been acked within retransmit interval.  Back off
286 	 * to a longer retransmit interval and retransmit one segment.
287 	 */
288 
289 	if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
290 		tp->t_rxtshift = TCP_MAXRXTSHIFT;
291 		tcpstat.tcps_timeoutdrop++;
292 		tp = tcp_drop(tp, tp->t_softerror ?
293 		    tp->t_softerror : ETIMEDOUT);
294 		goto out;
295 	}
296 	tcpstat.tcps_rexmttimeo++;
297 	rto = TCP_REXMTVAL(tp);
298 	if (rto < tp->t_rttmin)
299 		rto = tp->t_rttmin;
300 	TCPT_RANGESET(tp->t_rxtcur, rto * tcp_backoff[tp->t_rxtshift],
301 	    tp->t_rttmin, TCPTV_REXMTMAX);
302 	TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
303 
304 	/*
305 	 * If we are losing and we are trying path MTU discovery,
306 	 * try turning it off.  This will avoid black holes in
307 	 * the network which suppress or fail to send "packet
308 	 * too big" ICMP messages.  We should ideally do
309 	 * lots more sophisticated searching to find the right
310 	 * value here...
311 	 */
312 	if (tp->t_mtudisc && tp->t_rxtshift > TCP_MAXRXTSHIFT / 6) {
313 		tcpstat.tcps_pmtublackhole++;
314 
315 #ifdef INET
316 		/* try turning PMTUD off */
317 		if (tp->t_inpcb)
318 			tp->t_mtudisc = 0;
319 #endif
320 #ifdef INET6
321 		/* try using IPv6 minimum MTU */
322 		if (tp->t_in6pcb)
323 			tp->t_mtudisc = 0;
324 #endif
325 
326 		/* XXX: more sophisticated Black hole recovery code? */
327 	}
328 
329 	/*
330 	 * If losing, let the lower level know and try for
331 	 * a better route.  Also, if we backed off this far,
332 	 * our srtt estimate is probably bogus.  Clobber it
333 	 * so we'll take the next rtt measurement as our srtt;
334 	 * move the current srtt into rttvar to keep the current
335 	 * retransmit times until then.
336 	 */
337 	if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
338 #ifdef INET
339 		if (tp->t_inpcb)
340 			in_losing(tp->t_inpcb);
341 #endif
342 #ifdef INET6
343 		if (tp->t_in6pcb)
344 			in6_losing(tp->t_in6pcb);
345 #endif
346 		tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
347 		tp->t_srtt = 0;
348 	}
349 	tp->snd_nxt = tp->snd_una;
350 	/*
351 	 * If timing a segment in this window, stop the timer.
352 	 */
353 	tp->t_rtttime = 0;
354 	/*
355 	 * Remember if we are retransmitting a SYN, because if
356 	 * we do, set the initial congestion window must be set
357 	 * to 1 segment.
358 	 */
359 	if (tp->t_state == TCPS_SYN_SENT)
360 		tp->t_flags |= TF_SYN_REXMT;
361 	/*
362 	 * Close the congestion window down to one segment
363 	 * (we'll open it by one segment for each ack we get).
364 	 * Since we probably have a window's worth of unacked
365 	 * data accumulated, this "slow start" keeps us from
366 	 * dumping all that data as back-to-back packets (which
367 	 * might overwhelm an intermediate gateway).
368 	 *
369 	 * There are two phases to the opening: Initially we
370 	 * open by one mss on each ack.  This makes the window
371 	 * size increase exponentially with time.  If the
372 	 * window is larger than the path can handle, this
373 	 * exponential growth results in dropped packet(s)
374 	 * almost immediately.  To get more time between
375 	 * drops but still "push" the network to take advantage
376 	 * of improving conditions, we switch from exponential
377 	 * to linear window opening at some threshhold size.
378 	 * For a threshhold, we use half the current window
379 	 * size, truncated to a multiple of the mss.
380 	 *
381 	 * (the minimum cwnd that will give us exponential
382 	 * growth is 2 mss.  We don't allow the threshhold
383 	 * to go below this.)
384 	 */
385 	{
386 	u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_segsz;
387 	if (win < 2)
388 		win = 2;
389 	/* Loss Window MUST be one segment. */
390 	tp->snd_cwnd = tp->t_segsz;
391 	tp->snd_ssthresh = win * tp->t_segsz;
392 	tp->t_dupacks = 0;
393 	}
394 	(void) tcp_output(tp);
395 
396  out:
397 #ifdef TCP_DEBUG
398 	if (tp && so->so_options & SO_DEBUG)
399 		tcp_trace(TA_USER, ostate, tp, NULL,
400 		    PRU_SLOWTIMO | (TCPT_REXMT << 8));
401 #endif
402 	splx(s);
403 }
404 
405 void
406 tcp_timer_persist(void *arg)
407 {
408 	struct tcpcb *tp = arg;
409 	uint32_t rto;
410 	int s;
411 #ifdef TCP_DEBUG
412 	struct socket *so;
413 	short ostate;
414 #endif
415 
416 	s = splsoftnet();
417 
418 #ifdef TCP_DEBUG
419 #ifdef INET
420 	if (tp->t_inpcb)
421 		so = tp->t_inpcb->inp_socket;
422 #endif
423 #ifdef INET6
424 	if (tp->t_in6pcb)
425 		so = tp->t_in6pcb->in6p_socket;
426 #endif
427 
428 	ostate = tp->t_state;
429 #endif /* TCP_DEBUG */
430 
431 	/*
432 	 * Persistance timer into zero window.
433 	 * Force a byte to be output, if possible.
434 	 */
435 
436 	/*
437 	 * Hack: if the peer is dead/unreachable, we do not
438 	 * time out if the window is closed.  After a full
439 	 * backoff, drop the connection if the idle time
440 	 * (no responses to probes) reaches the maximum
441 	 * backoff that we would use if retransmitting.
442 	 */
443 	rto = TCP_REXMTVAL(tp);
444 	if (rto < tp->t_rttmin)
445 		rto = tp->t_rttmin;
446 	if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
447 	    ((tcp_now - tp->t_rcvtime) >= tcp_maxpersistidle ||
448 	    (tcp_now - tp->t_rcvtime) >= rto * tcp_totbackoff)) {
449 		tcpstat.tcps_persistdrops++;
450 		tp = tcp_drop(tp, ETIMEDOUT);
451 		goto out;
452 	}
453 	tcpstat.tcps_persisttimeo++;
454 	tcp_setpersist(tp);
455 	tp->t_force = 1;
456 	(void) tcp_output(tp);
457 	tp->t_force = 0;
458 
459  out:
460 #ifdef TCP_DEBUG
461 	if (tp && so->so_options & SO_DEBUG)
462 		tcp_trace(TA_USER, ostate, tp, NULL,
463 		    PRU_SLOWTIMO | (TCPT_PERSIST << 8));
464 #endif
465 	splx(s);
466 }
467 
468 void
469 tcp_timer_keep(void *arg)
470 {
471 	struct tcpcb *tp = arg;
472 	struct socket *so = NULL;	/* Quell compiler warning */
473 	int s;
474 #ifdef TCP_DEBUG
475 	short ostate;
476 #endif
477 
478 	s = splsoftnet();
479 
480 #ifdef TCP_DEBUG
481 	ostate = tp->t_state;
482 #endif /* TCP_DEBUG */
483 
484 	/*
485 	 * Keep-alive timer went off; send something
486 	 * or drop connection if idle for too long.
487 	 */
488 
489 	tcpstat.tcps_keeptimeo++;
490 	if (TCPS_HAVEESTABLISHED(tp->t_state) == 0)
491 		goto dropit;
492 #ifdef INET
493 	if (tp->t_inpcb)
494 		so = tp->t_inpcb->inp_socket;
495 #endif
496 #ifdef INET6
497 	if (tp->t_in6pcb)
498 		so = tp->t_in6pcb->in6p_socket;
499 #endif
500 	if (so->so_options & SO_KEEPALIVE &&
501 	    tp->t_state <= TCPS_CLOSE_WAIT) {
502 	    	if ((tcp_maxidle > 0) &&
503 		    ((tcp_now - tp->t_rcvtime) >=
504 		     tcp_keepidle + tcp_maxidle))
505 			goto dropit;
506 		/*
507 		 * Send a packet designed to force a response
508 		 * if the peer is up and reachable:
509 		 * either an ACK if the connection is still alive,
510 		 * or an RST if the peer has closed the connection
511 		 * due to timeout or reboot.
512 		 * Using sequence number tp->snd_una-1
513 		 * causes the transmitted zero-length segment
514 		 * to lie outside the receive window;
515 		 * by the protocol spec, this requires the
516 		 * correspondent TCP to respond.
517 		 */
518 		tcpstat.tcps_keepprobe++;
519 		if (tcp_compat_42) {
520 			/*
521 			 * The keepalive packet must have nonzero
522 			 * length to get a 4.2 host to respond.
523 			 */
524 			(void)tcp_respond(tp, tp->t_template,
525 			    (struct mbuf *)NULL, NULL, tp->rcv_nxt - 1,
526 			    tp->snd_una - 1, 0);
527 		} else {
528 			(void)tcp_respond(tp, tp->t_template,
529 			    (struct mbuf *)NULL, NULL, tp->rcv_nxt,
530 			    tp->snd_una - 1, 0);
531 		}
532 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepintvl);
533 	} else
534 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
535 
536 #ifdef TCP_DEBUG
537 	if (tp && so->so_options & SO_DEBUG)
538 		tcp_trace(TA_USER, ostate, tp, NULL,
539 		    PRU_SLOWTIMO | (TCPT_KEEP << 8));
540 #endif
541 	splx(s);
542 	return;
543 
544  dropit:
545 	tcpstat.tcps_keepdrops++;
546 	(void) tcp_drop(tp, ETIMEDOUT);
547 	splx(s);
548 }
549 
550 void
551 tcp_timer_2msl(void *arg)
552 {
553 	struct tcpcb *tp = arg;
554 	int s;
555 #ifdef TCP_DEBUG
556 	struct socket *so;
557 	short ostate;
558 #endif
559 
560 	s = splsoftnet();
561 
562 #ifdef TCP_DEBUG
563 #ifdef INET
564 	if (tp->t_inpcb)
565 		so = tp->t_inpcb->inp_socket;
566 #endif
567 #ifdef INET6
568 	if (tp->t_in6pcb)
569 		so = tp->t_in6pcb->in6p_socket;
570 #endif
571 
572 	ostate = tp->t_state;
573 #endif /* TCP_DEBUG */
574 
575 	/*
576 	 * 2 MSL timeout in shutdown went off.  If we're closed but
577 	 * still waiting for peer to close and connection has been idle
578 	 * too long, or if 2MSL time is up from TIME_WAIT, delete connection
579 	 * control block.  Otherwise, check again in a bit.
580 	 */
581 	if (tp->t_state != TCPS_TIME_WAIT &&
582 	    ((tcp_maxidle == 0) || ((tcp_now - tp->t_rcvtime) <= tcp_maxidle)))
583 		TCP_TIMER_ARM(tp, TCPT_2MSL, tcp_keepintvl);
584 	else
585 		tp = tcp_close(tp);
586 
587 #ifdef TCP_DEBUG
588 	if (tp && so->so_options & SO_DEBUG)
589 		tcp_trace(TA_USER, ostate, tp, NULL,
590 		    PRU_SLOWTIMO | (TCPT_2MSL << 8));
591 #endif
592 	splx(s);
593 }
594