From owner-p4-projects@FreeBSD.ORG Fri Jan 11 02:16:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5ACF416A420; Fri, 11 Jan 2008 02:16:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BE3C16A419 for ; Fri, 11 Jan 2008 02:16:36 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id AC4CD13C457 for ; Fri, 11 Jan 2008 02:16:35 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 56540 invoked from network); 11 Jan 2008 01:40:19 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 11 Jan 2008 01:40:19 -0000 Message-ID: <4786D187.9000600@freebsd.org> Date: Fri, 11 Jan 2008 03:16:39 +0100 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: perforce@freebsd.org References: <200801110147.m0B1l5Ok068042@repoman.freebsd.org> In-Reply-To: <200801110147.m0B1l5Ok068042@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: PERFORCE change 133007 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 02:16:36 -0000 Andre Oppermann wrote: > http://perforce.freebsd.org/chv.cgi?CH=133007 > > Change 133007 by andre@andre_flirtbox on 2008/01/11 01:47:04 > > Initial branch and import of new TCP reassembly queue. > > It's primarily a code dump. It compiles, doesn't crash and > almost works as advertized. Finish will come tomorrow. > > Description is at the top of the file. Lots of comments > inline. > > It seems TAILQ_LAST() doesn't work as described in its > man page. Won't return NULL when queue is empty but instead > crashes on NULL pointer dereferencing. I can't really really > believe I'm the first one to trip over this. Must have done > something wrong. > > Affected files ... Damn, didn't know I'd have to do a p4 submit to actually create the branch. Now my changes are already mixed into the branch changeset. Modified files are: netinet/tcp_reass.c netinet/tcp_input.c netinet/tcp_subr.c netinet/tcp_var.h netinet/tcp_usrreq.c sys/queue.h netinet/ip_fw.h netinet/ip_fw2.h netinet/src-usr-sbin-ipfw-ipfw2.c.diff The latter is a new function to ipfw that truncates tcp segments. Currently it only truncates from the tail and doesn't update the checksum. That doesn't matter for packets that go to a local socket but won't work for packets transiting through the box. Truncation from the head is planned too. Already now it makes a good tool for testing of the reassembly queue, SACK and other code that must deal with weird segments. Testing with truncated segments exercises much more code than simply dropping packets. Now it's already 3am here and I'm very tired. More code and fixes tomorrow. -- Andre