Andrew Gallatin aee409b987 Make kttcp work in -stable (and -current)
- Removed kttcp_sosend() and kttcp_soreceive() in favor of using
  sosend() / soreceive() with UIO_NOCOPY.  The locking changes in the
  socket layer make merging the kttcp_so* and the so* routines a real
  pain.  It was a lot easier to just use the integrated routines.

- Eliminated KTTCP_MAX_XMIT restrictions on send and receive sizes
  because I encountered no problems with streams larger than MAX_INT.
  MAX_INT bytes is only good for a few seconds at 4Gb/sec ;)

- Removed Giant from send / recv routines.

- Fixed character device protos, cdevsw init, etc, to work in 5.x /
  6.x

Reviewed by: sam
MFC after: 1 week
2004-12-13 20:40:16 +00:00
..

$FreeBSD$

This is a port of Jason Thorpe's kttcp tool for testing network
performance for in-kernel applications (like NFS).  The tool consists
of a loadable module and a small user-mode application.  Beware
that you should match the kernel module to the kernel it is to be
used with.  By default SYSDIR is set to /usr/src/sys in Makefile.
You may want to change that.

To use the tool do something like on each of two machines:

1. make
2. su; make install (installs module and kttcp in /usr/local/bin)
3. kldload kttcp

Then:

4. kttcp -r on one machine
5. kttcp -t foo on the other machine, where foo is the
   machine where #4 was done.

kttcp w/o arguments gives usage.  Otherwise the source is your
friend.  Beware that the kernel code must mimic soreceive and sosend
for results to be meaningful.