Date: Wed, 13 Aug 2003 14:00:29 +0200 (CEST) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: Jesper Skriver <jesper@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_output.c Message-ID: <20030813135842.X97608@beagle.fokus.fraunhofer.de> In-Reply-To: <20030813115615.GB43708@FreeBSD.org> References: <200308130850.h7D8ohOj013289@repoman.freebsd.org> <20030813115615.GB43708@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030813135842.X97608>