From owner-freebsd-hackers Mon Sep 10 12:22:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 0FBC637B40D for ; Mon, 10 Sep 2001 12:22:43 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA49573; Mon, 10 Sep 2001 12:43:16 -0700 (PDT) Date: Mon, 10 Sep 2001 12:43:15 -0700 (PDT) From: Julian Elischer To: Jonathan Lemon Cc: kent@erix.ericsson.se, hackers@freebsd.org Subject: Re: How to force small TCP packets? In-Reply-To: <200109101817.f8AIH7t11927@prism.flugsvamp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG just set the MTU on the sender to something really small (120 byres) On Mon, 10 Sep 2001, Jonathan Lemon wrote: > In article you write: > > > >bright@mu.org (Alfred Perlstein) writes: > >> there's a setsockopt for this called TCP_NODELAY in netinet/tcp.h. > >> > >> you should read further into stevens before posting such questions. > > > >I seem to have expressed myself really bad :-( I want to debug an > >application. We have had code that broke only occasionally on a > >specific Linux version under heavy load. I want to detect bad code > >like that and had hoped that some FreeBSD hackers had some tricks how > >to use kernel configuration to do that. > > > >If application A do a write like > > > > write(socket, buf, 100); > > > >and application B read this like > > > > read(socket, buf, 100); > > > >without checking the result from the read operation, then this code > >will probably work 99.9999% of the time. But if I could force the > >kernel to pass data from a socket on to the application say one byte > >at the time then this code will break 100% of the time. This makes > >finding these problems more easy. > > > >This is highly simplified example, else I could just grep the sources > >for all calls to read() and manually inspect the code. The data is > >passed on to other parts of the system using message queues. > > > >But using the kernel to debug user applications like this was probably > >a stupid idea. I'm sorry for posting a question to this group without > >the proper knowledge wasting your time, > > One thing you might want to try doing is to write your own read() > function and link against that. Your modified version could then > replace the nbytes value with something smaller, for debugging purposes. > -- > Jonathan > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message