From owner-p4-projects@FreeBSD.ORG Fri Aug 22 05:32:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A0E2106566C; Fri, 22 Aug 2008 05:32:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E3AD1065678 for ; Fri, 22 Aug 2008 05:32:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3BC678FC16 for ; Fri, 22 Aug 2008 05:32:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7M5WHsv090535 for ; Fri, 22 Aug 2008 05:32:17 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7M5WHE0090533 for perforce@freebsd.org; Fri, 22 Aug 2008 05:32:17 GMT (envelope-from ed@FreeBSD.org) Date: Fri, 22 Aug 2008 05:32:17 GMT Message-Id: <200808220532.m7M5WHE0090533@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 148083 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 05:32:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=148083 Change 148083 by ed@ed_dull on 2008/08/22 05:31:39 Properly document the SNP_*_BUFSIZE definitions. Requested by: sam Affected files ... .. //depot/projects/mpsafetty/sys/dev/snp/snp.c#11 edit Differences ... ==== //depot/projects/mpsafetty/sys/dev/snp/snp.c#11 (text+ko) ==== @@ -48,8 +48,19 @@ "tty snoop registration"); static MALLOC_DEFINE(M_SNP, "snp", "tty snoop device"); -#define SNP_INPUT_BUFSIZE 16 /* For uiomove(). */ -#define SNP_OUTPUT_BUFSIZE 16384 /* For the ttyoutq. */ +/* + * There is no need to have a big input buffer. In most typical setups, + * we won't inject much data into the TTY, because users can't type + * really fast. + */ +#define SNP_INPUT_BUFSIZE 16 +/* + * The output buffer has to be really big. Right now we don't support + * any form of flow control, which means we lost any data we can't + * accept. We set the output buffer size to about twice the size of a + * pseudo-terminal/virtual console's output buffer. + */ +#define SNP_OUTPUT_BUFSIZE 16384 static d_open_t snp_open; static d_read_t snp_read;