]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: splice: assume by default that splice is working correctly
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2013 15:57:09 +0000 (16:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2013 15:57:09 +0000 (16:57 +0100)
commitb6daedd46ca527bcd16cb3d70a78e897761c33d3
tree76dd1c5af9298cb67af65626d72b08c8e06686ae
parentbaf2a500a185fcaedede4510281be5d16a8dddde
OPTIM: splice: assume by default that splice is working correctly

Versions of splice between 2.6.25 and 2.6.27.12 were bogus and would return EAGAIN
on incoming shutdowns. On these versions, we have to call recv() after such a return
in order to find whether splice is OK or not. Since 2.6.27.13 we don't need to do
this anymore, saving one useless recv() call after each splice() returning EAGAIN,
and we can avoid this logic by defining ASSUME_SPLICE_WORKS.

Building with linux2628 automatically enables splice and the flag above since the
kernel is safe. People enabling splice for custom kernels will be able to disable
this logic by hand too.
Makefile
src/raw_sock.c