Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!oliver.cray.COM!dab From: dab@oliver.cray.COM.UUCP Newsgroups: comp.protocols.tcp-ip Subject: Re: Reassembly queues in TCP Message-ID: <8705291425.AA06527@oliver.cray.uucp> Date: Fri, 29-May-87 10:25:55 EDT Article-I.D.: oliver.8705291425.AA06527 Posted: Fri May 29 10:25:55 1987 Date-Received: Sat, 30-May-87 10:32:23 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 30 Many months ago I ran into problems with running out of mbufs on the Cray computers. Among the problems was the one described by Phil Wood, that of getting in lots of little (1 byte) packets, and having one of the early ones get lost. I did a twofold fix to the Berkeley code (4.2, same mods apply to 4.3) to keep this problem to a minimum. 1) Compact the TCP reassembly queue. The Berkeley code does not compact the TCP reassembly queue. If you have 500 1 byte packets on your reassembly queue, you are using up 500 mbufs. 2) In uipc_mbuf.c, there is the comment in m_expand() /* should ask protocols to free code */ Well, I did just that. I wrote a routine called pfdrain(), almost identical to pfctlinput(). Then, I also added code to the tcp_drain() routine to actually go through all the tcp reassembly queues and free up all the fragments. Since we haven't acknowledged any of it, it's no problem to toss it. These mods are not very long, and I sent them to Mike Karels awhile ago (but not in time for the release). It took around 40 lines of code to do the above mods. Perhaps these fixes might show up on the 4.3 bug list at some point. If you are in urgent need of this code, contact me directly. Dave Borman Cray Research, Inc. dab@umn-rei-uc.arpa