On Mon, May 18, 2009 at 11:51:04AM -0700, Brian Kruger wrote: > Hi, probably a question maybe covered elsewhere and I apologize as I > couldn't find anything, but am curious what the difference is between > USE_TCPSPLICE and USE_LINUX_SPLICE? I know TCP_SPLICE is a patch > that's needed (possibly just for older kernels), but do they accomplish > the same thing otherwise? (tcp splicing options to speed up connections)
indeed, TCP_SPLICE is the first splicing implementation by Alexandre Cassen, as found on linux-l7sw.org. Eventhough it works, we found several oddities in its design and thought about redesigning it differently (for instance, it takes care of the connection till the end, and forwards data per packet, without using socket buffers). Since we have very limited time to work on this, we did not make much progress and at the same time the splice() system call appeared in the linux kernel. It works very differently, was a bit of a pain to get to work initially but finally does what we need : pass a given amount of data between socket buffers. I would say that the LINUX_SPLICE is more reliable by design and is recommended. However it's only available on very recent kernels (>2.6.27), and most early versions are buggy. The TCPSPLICE is available for old kernels (starting from 2.6.18 if my memory serves me right), as well as 2.4, and could possibly be ported to other systems without too many difficulties. Hoping this clarifies the choice, Willy