From owner-freebsd-net Fri Apr 5 16:12:18 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 7A2BE37B419; Fri, 5 Apr 2002 16:12:13 -0800 (PST) Received: from bmah.dyndns.org ([12.233.149.189]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020406001213.MZBE18078.rwcrmhc51.attbi.com@bmah.dyndns.org>; Sat, 6 Apr 2002 00:12:13 +0000 Received: from intruder.bmah.org (localhost [IPv6:::1]) by bmah.dyndns.org (8.12.2/8.12.2) with ESMTP id g360CCt2056168; Fri, 5 Apr 2002 16:12:12 -0800 (PST) (envelope-from bmah@intruder.bmah.org) Received: (from bmah@localhost) by intruder.bmah.org (8.12.2/8.12.2/Submit) id g360CC99056167; Fri, 5 Apr 2002 16:12:12 -0800 (PST) Message-Id: <200204060012.g360CC99056167@intruder.bmah.org> X-Mailer: exmh version 2.5+ 20020404 with nmh-1.0.4 To: Bill Fenner Cc: bmah@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: IP fragmentation (was Re: Fatal trap 12: page fault while in kernel mode) In-reply-to: <200204052345.PAA21989@windsor.research.att.com> References: <20020403181854.I42720-100000@angui.sh> <15532.29114.310072.957330@grasshopper.cs.duke.edu> <200204050504.g355493C001200@intruder.bmah.org> <15533.46222.49598.958821@grasshopper.cs.duke.edu> <3CADE0E7.ED472650@mindspring.com> <15533.57961.725030.692387@grasshopper.cs.duke.edu> <200204052120.g35LKW00034174@intruder.bmah.org> <200204052345.PAA21989@windsor.research.att.com> Comments: In-reply-to Bill Fenner message dated "Fri, 05 Apr 2002 15:45:22 -0800." From: bmah@FreeBSD.ORG (Bruce A. Mah) Reply-To: bmah@FreeBSD.ORG X-Face: g~c`.{#4q0"(V*b#g[i~rXgm*w;:nMfz%_RZLma)UgGN&=j`5vXoU^@n5v4:OO)c["!w)nD/!!~e4Sj7LiT'6*wZ83454H""lb{CC%T37O!!'S$S&D}sem7I[A 2V%N&+ X-Image-Url: http://www.employees.org/~bmah/Images/bmah-cisco-small.gif X-Url: http://www.employees.org/~bmah/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Apr 2002 16:12:12 -0800 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org If memory serves me right, Bill Fenner wrote: > The problem with the ip_nfragments code is that if space becomes > available in the middle of reception of an entire packet, a queue > will be created to reassemble a packet that will never completely > arrive (since we dropped some of the beginning of it due to no space). > I guess the nipq code has a similar problem: it will gladly free > a queue that contains fragments that go with the next fragment that > arrives. ...but of course the "obvious" solution of only creating the queue when we see a fragment with offset 0 doesn't work, because of the potential of out-of-order delivery. Sigh. > In fact, if datagrams that hash to the same bucket arrive with > interleaved fragments, the nipq code could thrash between the two > packets, creating and deleting a frag queue for each fragment arrival, > dropping both datagrams. Bleah. This is an acid flashback to grad school, when I was measuring TCP performance over ATM switches with too-small drop-tail cell buffers. :-( > To address this kind of problem, it might be worth creating a "drop" > frag queue entry, which is a way to remember that we dropped fragments > from a given datagram so we should drop all the other fragments too. Sounds reasonable, I think. > (I'd also go for modifying the data structures to make it easy to drop > the oldest frag queue.) That's a *lot* harder. We're at least dumping the oldest queue in the hash bucket now (64 buckets, fragment queues in the hundreds). Bruce. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message