Re: [squid-dev] [PATCH] Do not make bogus recvmsg calls

2016-06-15 Thread Alex Rousskov
On 06/09/2016 08:09 PM, Amos Jeffries wrote:
> On 10/06/2016 12:20 p.m., Alex Rousskov wrote:
>> The attached simple patch prevents bogus recvmsg(2) calls when
>> closing file descriptors. Please see the patch preamble for details.

> +1. Looks okay for now.

Committed to trunk (r14714).


> Its relation to RST implies UDP sockets are also doing useless reads.
> IIRC there is a difference between client and server TCP sockets RST
> behaviour as well. So this probably needs a full re-analysis to get right.

Agreed.


Thank you,

Alex.

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] [PATCH] Do not make bogus recvmsg calls

2016-06-09 Thread Amos Jeffries
On 10/06/2016 12:20 p.m., Alex Rousskov wrote:
> Hello,
> 
> The attached simple patch prevents bogus recvmsg(2) calls when
> closing file descriptors. Please see the patch preamble for details.
> 
> A cleaner way to handle this problem may be to introduce a new
> FD_FLUSH_METHOD() API that would do nothing for UDS (and possibly BIO
> SSL?) sockets. However, a whole new API feels like a too-heavy solution
> for such a small/isolated/hacky purpose. It may be better to spend that
> development cycles on avoiding flushing TCP sockets that already
> returned a zero-size read and do not need to be flushed. Please let me
> know if you disagree (and I will not commit this patch).
> 

+1. Looks okay for now.

Its relation to RST implies UDP sockets are also doing useless reads.
IIRC there is a difference between client and server TCP sockets RST
behaviour as well. So this probably needs a full re-analysis to get right.

Amos

___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev