On Sun, Jul 13, 2003 at 02:26:24AM +0200, alessandro salvatori wrote:
> when you say a thing is not athomic you presume that it returns even though what was fired by it had not yet ended. if you set the send buffer to zero as in the patch i submitted today it won't return till everything is done. sure, this is not suitable for real-time applications... since a context switch would make we wait... but we would wait all the same even if it returned much before the kernel did write the packet to the wire. hence, this way, when we go on we go on because the packet is written.
/me scratches head
Uh, where are you reading that setting SO_SNDBUF to 0, it blocks
until "everything is done"? My understanding is that the SO_SNDBUF
changes the advertized window size under TCP and the max datagram size
under UDP. Obviously we're talking about a different socket type, but
my gut says that it would work the same was as a UDP socket. I would
expect that setting SO_SNDBUF to 0 would result in an ENOBUFS error foreach
packet assuming that the kernel would let you set it that low (I would
hope not).
You might have better luck setting SO_PRIORITY which under Linux at
least is used to prioritize the network queues.
If you're right, then I'll be adding that trick in tcpreplay. :-)
--
Aaron Turner
http://synfin.net/aturner
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. -- Benjamin Franklin
All emails are PGP signed; a lack of a signature indicates a forgery.
- application/pgp-signature attachment: stored
Received on Sat Jul 12 21:42:32 2003
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 14:02:24 EDT
|