Re: Honoring SO_RCVLOWAT in proto_ops.poll methods

From: lkml
Date: Mon Oct 06 2008 - 01:17:31 EST


On Sun, Oct 05, 2008 at 03:30:59PM -0700, David Miller wrote:
> From: swivel@xxxxxxxxxxxxxxxxxxxxxxxx
> Date: Sun, 5 Oct 2008 16:45:57 -0500
>
> > I will be testing this patch today. At a glance it appears with this
> > patch we're still not taking rcvlowat into consideration in recv()
> > with MSG_PEEK flag set. This should probably also be corrected, as
> > mentioned in the thread previously.
>
> Yes, I remember you mentioning that.
>
> I'll look into it.


Looks like the RCVLOWAT patch breaks the tcp poll logic in the normal
case.

I didn't have a chance to scrutinize the changes but with the patch
applied simple things like a telnet to 127.0.0.1:80 exit immediately
with "Connection closed by foreign host".

In strace of the above telnet failure I see recv() returning EAGAIN
before exiting. Telnet expected a select() to block until data was
available and didn't expect recv() to find nothing available when the
select() reported there was something. Select() was no longer behaving
properly on ipv4 tcp sockets.

Regards,
Vito Caputo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/