Summary: | [socket] sb_cc counts control data as well as data data | ||
---|---|---|---|
Product: | Base System | Reporter: | Bill Fenner <fenner> |
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed Feedback Timeout | ||
Severity: | Affects Only Me | CC: | imp |
Priority: | Normal | ||
Version: | 3.0-CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Bill Fenner
1998-02-28 21:40:00 UTC
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 Responsible Changed From-To: freebsd-bugs->bmilekic Over to Bosko Milekic <bmilekic@FreeBSD.org>. He seems to have a good grasp of the problem and solution. Responsible Changed From-To: bmilekic->kbyanc Over to kbyanc because this has been sitting around in my basket for way too long and I haven't done anything about it and I don't want to do anything about it. Recently, kbyanc has done some related work, and it was recommended to me to forward this to him. State Changed From-To: open->feedback Is this still a problem with modern versions of FreeBSD? Responsible Changed From-To: kbyanc->linimon State Changed From-To: feedback->suspended Submitter notes that this problem still recurs on 6.1. Mark suspended awaiting someone to take an interest in this antique PR. Responsible Changed From-To: linimon->freebsd-bugs State Changed From-To: suspended->open Doesn't seem like this would be that hard to fix, at least in HEAD where I have the luxury of adding fields to the socket. Responsible Changed From-To: freebsd-bugs->kmacy Doesn't seem like this would be that hard to fix, at least in HEAD where I have the luxury of adding fields to the socket. Responsible Changed From-To: kmacy->freebsd-net kmacy has asked for all of his PRs to be reassigned back to the pool. For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped |