Module Name: src Committed By: christos Date: Fri Sep 23 15:29:09 UTC 2011
Modified Files: src/sys/kern: tty.c src/sys/net: if_sl.c if_strip.c src/sys/sys: tty.h Log Message: Change obsolete CBSIZE constant (48), to a power of two constant (64) that is close enough to match the original assumptions. To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/kern/tty.c cvs rdiff -u -r1.117 -r1.118 src/sys/net/if_sl.c cvs rdiff -u -r1.95 -r1.96 src/sys/net/if_strip.c cvs rdiff -u -r1.88 -r1.89 src/sys/sys/tty.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/tty.c diff -u src/sys/kern/tty.c:1.246 src/sys/kern/tty.c:1.247 --- src/sys/kern/tty.c:1.246 Tue Jul 26 09:14:18 2011 +++ src/sys/kern/tty.c Fri Sep 23 11:29:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.246 2011/07/26 13:14:18 yamt Exp $ */ +/* $NetBSD: tty.c,v 1.247 2011/09/23 15:29:08 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.246 2011/07/26 13:14:18 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.247 2011/09/23 15:29:08 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2350,7 +2350,7 @@ tp->t_lowat = x = CLAMP(cps / 2, TTMAXLOWAT, TTMINLOWAT); x += cps; x = CLAMP(x, TTMAXHIWAT, TTMINHIWAT); - tp->t_hiwat = roundup(x, CBSIZE); + tp->t_hiwat = roundup(x, TTROUND); #undef CLAMP } Index: src/sys/net/if_sl.c diff -u src/sys/net/if_sl.c:1.117 src/sys/net/if_sl.c:1.118 --- src/sys/net/if_sl.c:1.117 Mon Apr 5 03:22:23 2010 +++ src/sys/net/if_sl.c Fri Sep 23 11:29:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sl.c,v 1.117 2010/04/05 07:22:23 joerg Exp $ */ +/* $NetBSD: if_sl.c,v 1.118 2011/09/23 15:29:09 christos Exp $ */ /* * Copyright (c) 1987, 1989, 1992, 1993 @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.117 2010/04/05 07:22:23 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.118 2011/09/23 15:29:09 christos Exp $"); #include "opt_inet.h" @@ -154,7 +154,7 @@ #if (SLMTU < 3) #error SLMTU way too small. #endif -#define SLIP_HIWAT roundup(50,CBSIZE) +#define SLIP_HIWAT roundup(50, TTROUND) #ifndef __NetBSD__ /* XXX - cgd */ #define CLISTRESERVE 1024 /* Can't let clists get too low */ #endif /* !__NetBSD__ */ Index: src/sys/net/if_strip.c diff -u src/sys/net/if_strip.c:1.95 src/sys/net/if_strip.c:1.96 --- src/sys/net/if_strip.c:1.95 Mon Apr 5 03:22:24 2010 +++ src/sys/net/if_strip.c Fri Sep 23 11:29:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_strip.c,v 1.95 2010/04/05 07:22:24 joerg Exp $ */ +/* $NetBSD: if_strip.c,v 1.96 2011/09/23 15:29:09 christos Exp $ */ /* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */ /* @@ -87,7 +87,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.95 2010/04/05 07:22:24 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.96 2011/09/23 15:29:09 christos Exp $"); #include "opt_inet.h" @@ -186,7 +186,7 @@ #define STRIP_MTU_ONWIRE (SLMTU + 20 + STRIP_HDRLEN) /* (2*SLMTU+2 in sl.c */ -#define SLIP_HIWAT roundup(50,CBSIZE) +#define SLIP_HIWAT roundup(50, TTROUND) /* This is a NetBSD-1.0 or later kernel. */ #define CCOUNT(q) ((q)->c_cc) Index: src/sys/sys/tty.h diff -u src/sys/sys/tty.h:1.88 src/sys/sys/tty.h:1.89 --- src/sys/sys/tty.h:1.88 Tue Jul 26 09:14:17 2011 +++ src/sys/sys/tty.h Fri Sep 23 11:29:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.h,v 1.88 2011/07/26 13:14:17 yamt Exp $ */ +/* $NetBSD: tty.h,v 1.89 2011/09/23 15:29:09 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -165,10 +165,11 @@ #define TTYHOG 1024 #ifdef _KERNEL -#define TTMAXHIWAT roundup(2048, CBSIZE) -#define TTMINHIWAT roundup(100, CBSIZE) +#define TTMAXHIWAT roundup(2048, TTROUND) +#define TTMINHIWAT roundup(100, TTROUND) #define TTMAXLOWAT 256 #define TTMINLOWAT 32 +#define TTROUND 64 #endif /* _KERNEL */ /* These flags are kept in t_state. */