From owner-cvs-all@FreeBSD.ORG Wed Aug 13 05:00:32 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FF1F37B401; Wed, 13 Aug 2003 05:00:32 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3095943FAF; Wed, 13 Aug 2003 05:00:30 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h7DC0Tv20316; Wed, 13 Aug 2003 14:00:29 +0200 (MEST) Date: Wed, 13 Aug 2003 14:00:29 +0200 (CEST) From: Harti Brandt To: Jesper Skriver In-Reply-To: <20030813115615.GB43708@FreeBSD.org> Message-ID: <20030813135842.X97608@beagle.fokus.fraunhofer.de> References: <200308130850.h7D8ohOj013289@repoman.freebsd.org> <20030813115615.GB43708@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_output.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Hartmut Brandt List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2003 12:00:32 -0000 On Wed, 13 Aug 2003, Jesper Skriver wrote: JS>On Wed, Aug 13, 2003 at 01:50:43AM -0700, Hartmut Brandt wrote: JS>> harti 2003/08/13 01:50:42 PDT JS>> JS>> FreeBSD src repository JS>> JS>> Modified files: JS>> sys/netinet tcp_output.c JS>> Log: JS>> The tcp_trace call needs the length of the header. Unfortunately the JS>> code has rotten a bit so that the header length is not correct at JS>> the point when tcp_trace is called. Temporarily compute the correct JS>> value before the call and restore the old value after. This makes JS>> ports/benchmarks/dbs to almost work. JS>> JS>> This is a NOP unless you compile with TCPDEBUG. JS> JS>Not quite, you execute code not excuted before, what about #ifdef TCPDEBUG ? That is (and was) in a #define TCPDEBUG! It's just above the comment and is too far away for diff -u to show it. harti JS> JS>/Jesper JS> JS>> Revision Changes Path JS>> 1.79 +5 -1 src/sys/netinet/tcp_output.c JS>> http://cvsweb.FreeBSD.org/src/sys/netinet/tcp_output.c.diff?r1=1.78&r2=1.79&f=h JS>> | =================================================================== JS>> | RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v JS>> | retrieving revision 1.78 JS>> | retrieving revision 1.79 JS>> | diff -u -p -r1.78 -r1.79 JS>> | --- src/sys/netinet/tcp_output.c 2003/02/19 22:18:05 1.78 JS>> | +++ src/sys/netinet/tcp_output.c 2003/08/13 08:50:42 1.79 JS>> | @@ -31,7 +31,7 @@ JS>> | * SUCH DAMAGE. JS>> | * JS>> | * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 JS>> | - * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v 1.78 2003/02/19 22:18:05 jlemon Exp $ JS>> | + * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netinet/tcp_output.c,v 1.79 2003/08/13 08:50:42 harti Exp $ JS>> | */ JS>> | JS>> | #include "opt_inet6.h" JS>> | @@ -848,8 +848,12 @@ send: JS>> | /* JS>> | * Trace. JS>> | */ JS>> | - if (so->so_options & SO_DEBUG) JS>> | + if (so->so_options & SO_DEBUG) { JS>> | + u_short save = ipov->ih_len; JS>> | + ipov->ih_len = htons(m->m_pkthdr.len /* - hdrlen + (th->th_off << 2) */); JS>> | tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, void *), th, 0); JS>> | + ipov->ih_len = save; JS>> | + } JS>> | #endif JS>> | JS>> | /* JS> JS>/Jesper JS> JS> -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org