From owner-freebsd-bugs Fri Apr 28 17: 0: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3246337BFCC for ; Fri, 28 Apr 2000 17:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA53115; Fri, 28 Apr 2000 17:00:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Fri, 28 Apr 2000 17:00:02 -0700 (PDT) Message-Id: <200004290000.RAA53115@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bosko Milekic Subject: Re: kern/5877: sb_cc counts control data as well as data data Reply-To: Bosko Milekic Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/5877; it has been noted by GNATS. From: Bosko Milekic To: freebsd-gnats-submit@freebsd.org, fenner@parc.xerox.com Cc: Subject: Re: kern/5877: sb_cc counts control data as well as data data Date: Fri, 28 Apr 2000 20:00:33 -0400 (EDT) Wouldn't you agree that the better solution would be to just fix the computation/adjusting of the high and low watermarks to not include control data, as sb_cc's count is also used for other purposes which may (or may not? [*]) involve the counting of the control data mbufs? This is feasible with a new variable which would hold (sb_cc - control data) which need only be adjusted when control type mbufs are added to the sockbuf. This way, low and high watermarks can be adjusted as per that new value. [*] Of course, "may or may not" is ambiguous. I see sb_cc being a, as commented in socketvar.h, "_actual_ chars in buffer" count. Perhaps some other bit in the code also relies on this interpretation and assumes that, indeed, there are no mbufs attached to sb_mb when sb_cc is zero. Comments, anyone? --Bosko -- Bosko Milekic * pages.infinit.net/bmilekic/index.html * www.technokratis.com bmilekic@dsuper.net * bmilekic@technokratis.com * b.milekic@marianopolis.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message