Date: Sun, 9 Sep 2001 18:27:45 -0500 From: Alfred Perlstein <bright@mu.org> To: Kent Boortz <kent@erix.ericsson.se> Cc: freebsd-hackers@freebsd.org Subject: Re: How to force small TCP packets? Message-ID: <20010909182745.O2965@elvis.mu.org> In-Reply-To: <d2y9nogetm.fsf@erix.ericsson.se>; from kent@erix.ericsson.se on Mon, Sep 10, 2001 at 12:49:25AM %2B0200 References: <d2y9nogetm.fsf@erix.ericsson.se>
next in thread | previous in thread | raw e-mail | index | archive | help
* Kent Boortz <kent@erix.ericsson.se> [010909 17:49] wrote: > > I want to run an application with the OS set to send small TCP packets > to spot programming errors like assuming that a write of 100 bytes on > a socket can be read in a single read operation. It may work most of > the time but break at some point. So if I could configure FreeBSD to > use small packets I can spot these programming errors faster. > > How can I do this? I can't just set the MTU on the interface right? > Can I use sysctl "net.inet.tcp.sendspace" or some other configuration? > Can I set it as low as sending one byte of data in each packet? Will > this still not help, i.e. if we are not reading fast enough we will > get all 100 bytes we wrote in a single read even if the packets were > small? Is there another way to force the behaviour that read() on a > socket just return a few bytes at the time? > > Sorry if this is a stupid question, I haven't gone deep enough in > Stevens "TCP/IP Illustrated" to understand things like this yet, there's a setsockopt for this called TCP_NODELAY in netinet/tcp.h. you should read further into stevens before posting such questions. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010909182745.O2965>