So then this:
val = 1
setsockopt(TCP_CORK, &val) /* cork */
write(100000*MSS+1)
write(1)
val = 0
setsockopt(TCP_CORK, &val) /* uncork */
is different from this:
val = 1
setsockopt(TCP_CORK, &val) /* cork */
write(100000*MSS+1)
write(1)
val = 0
setsockopt(TCP_CORK, &val) /* uncork */
val = 1
setsockopt(TCP_NODELAY, &val)
val = 0
setsockopt(TCP_NODELAY, &val)
This was all my wondering about uncorking not being equivalent to SIOCPUSH.
(the two setsockopt(TCP_NODELAY) can be replaced with a SIOCPUSH of course)
If I understood wall they would been equivalent if I did write(100000*MSS)
instead of write(100000*MSS+1).
(and btw, the TCP_NODELAY being cleared immediatly means that if the last
packet can't be sent during the setsockopt it will be delayed with nagle as
usual when we get the acknowledgments from the receiver, that's the same
mistake of my SIOCPUSH first implementation that infact should be sligtly
improved in the way descriped a few emails ago adding a tp->push field and
then it will become different than going for a moment in TCP_NODELAY mode)
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/