From owner-freebsd-hackers Sun Sep 9 22:14:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from albatross-ext.wise.edt.ericsson.se (albatross-ext.wise.edt.ericsson.se [194.237.142.116]) by hub.freebsd.org (Postfix) with ESMTP id 09AAE37B405 for ; Sun, 9 Sep 2001 22:14:37 -0700 (PDT) Received: from super.du.uab.ericsson.se (super.du.uab.ericsson.se [134.138.176.16]) by albatross.wise.edt.ericsson.se (8.11.0/8.11.0/WIREfire-1.3) with ESMTP id f8A5EYK11881 for ; Mon, 10 Sep 2001 07:14:35 +0200 (MEST) Received: from news.du.uab.ericsson.se (news [134.138.176.24]) by super.du.uab.ericsson.se (8.10.1/8.10.1/erix-1.8) with ESMTP id f8A5EY110869 for ; Mon, 10 Sep 2001 07:14:34 +0200 (MET DST) Received: (from news@localhost) by news.du.uab.ericsson.se (8.9.1b+Sun/8.9.1/news-1.1) id HAA21795 for freebsd-hackers@freebsd.org; Mon, 10 Sep 2001 07:14:33 +0200 (MET DST) Received: from GATEWAY by news with netnews for freebsd-hackers@freebsd.org (freebsd-hackers@freebsd.org) To: freebsd-hackers@freebsd.org Date: 10 Sep 2001 07:14:33 +0200 From: Kent Boortz Message-ID: Organization: Ericsson Utvecklings AB, Stockholm, Sweden Content-Type: text/plain; charset=us-ascii References: , <20010909182745.O2965@elvis.mu.org> Subject: Re: How to force small TCP packets? 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 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, kent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message