From owner-freebsd-hackers Fri Dec 4 12:44:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA18622 for freebsd-hackers-outgoing; Fri, 4 Dec 1998 12:44:44 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA18613 for ; Fri, 4 Dec 1998 12:44:42 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id MAA29409; Fri, 4 Dec 1998 12:43:17 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma029406; Fri, 4 Dec 98 12:43:04 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id MAA06772; Fri, 4 Dec 1998 12:43:04 -0800 (PST) From: Archie Cobbs Message-Id: <199812042043.MAA06772@bubba.whistle.com> Subject: Re: Help with clist_alloc_cblocks() In-Reply-To: <199812042040.MAA08017@root.com> from David Greenman at "Dec 4, 98 12:40:06 pm" To: dg@root.com Date: Fri, 4 Dec 1998 12:43:04 -0800 (PST) Cc: freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Greenman writes: > >I'm trying to write a line discipline, roughly similar to the PPP > >line discipline. My question is, what are the correct parameters to > >give to clist_alloc_cblocks()? > > > > /* > > * Pre-allocate cblocks to the an appropriate amount. > > */ > > > > ttyflush(tp, FREAD | FWRITE); > > clist_alloc_cblocks(&tp->t_canq, 0, 0); > > clist_alloc_cblocks(&tp->t_rawq, 0, 0); /* XXX probably wrong! */ > > clist_alloc_cblocks(&tp->t_outq, MLEN + NGT_HIWATER, MLEN + NGT_HIWATER); > > > >I'm not sure how to determine what the correct values to call > >clist_alloc_cblocks() should be. The values I'm using now cause a > >bunch of "interrupt-level buffer overflows" reported from the sio > >driver. It looks like I can simply increase the values for tp->t_rawq > >but I'd like to understand exactly what they mean first. > > A lack of cblocks should not cause interrupt-level buffer overflows. Hmm, then that assumption is wrong. Do you have any suggestions as to (a) what the problem indicates and/or (b) how to fix it? We're running at 230K (the serial chip supports this speed). This doesn't happen at 115K, so clearly something is overflowing somewhere because characters are arriving too fast. Is this some kind of fundamental limitation of the hardware or is there a way to address it in software by increasing the size of some buffer somewhere? Thanks, -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message