From owner-freebsd-hackers Fri Dec 4 12:39:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA18155 for freebsd-hackers-outgoing; Fri, 4 Dec 1998 12:39:06 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from root.com (root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA18007 for ; Fri, 4 Dec 1998 12:39:01 -0800 (PST) (envelope-from root@root.com) Received: from root.com (localhost [127.0.0.1]) by root.com (8.8.8/8.8.5) with ESMTP id MAA08017; Fri, 4 Dec 1998 12:40:06 -0800 (PST) Message-Id: <199812042040.MAA08017@root.com> To: Archie Cobbs cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Help with clist_alloc_cblocks() In-reply-to: Your message of "Fri, 04 Dec 1998 12:28:57 PST." <199812042028.MAA06497@bubba.whistle.com> From: David Greenman Reply-To: dg@root.com Date: Fri, 04 Dec 1998 12:40:06 -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message