Re: MSG_ZEROCOPY doesn't work on half-open TCP sockets

2019-01-09 Thread Willy Tarreau
On Wed, Jan 09, 2019 at 08:55:14AM -0500, Willem de Bruijn wrote: > > In other words: because the socket needs to be ESTABLISHED for > > MSG_ZEROCOPY to work, and because remote party can send FIN and move > > the socket to CLOSE_WAIT, a sending party must implement a fallback > > from EINVAL retur

Re: MSG_ZEROCOPY doesn't work on half-open TCP sockets

2019-01-09 Thread Willem de Bruijn
On Wed, Jan 9, 2019 at 7:50 AM Marek Majkowski wrote: > > I got it slightly wrong, and it's even worse than this. As far as I > understand it, the current semantics of MSG_ZEROCOPY on TCP make it > close to unusable. The problem is that the remote party can move your > MSG_ZEROCOPY socket from EST

Re: MSG_ZEROCOPY doesn't work on half-open TCP sockets

2019-01-09 Thread Marek Majkowski
I got it slightly wrong, and it's even worse than this. As far as I understand it, the current semantics of MSG_ZEROCOPY on TCP make it close to unusable. The problem is that the remote party can move your MSG_ZEROCOPY socket from ESTABLISHED to CLOSE_WAIT without your involvement. This will mean t