[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1351327823.30380.132.camel@edumazet-glaptop>
Date: Sat, 27 Oct 2012 10:50:23 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Vijay Subramanian <subramanian.vijay@...il.com>
Cc: Julian Anastasov <ja@....bg>, netdev@...r.kernel.org,
davem@...emloft.net, edumazet@...gle.com, ncardwell@...gle.com,
Venkat Venkatsubra <venkat.x.venkatsubra@...cle.com>,
Elliott Hughes <enh@...gle.com>
Subject: Re: [PATCH net-next V2 1/1] tcp: Prevent needless syn-ack rexmt
during TWHS
On Fri, 2012-10-26 at 17:07 -0700, Vijay Subramanian wrote:
>
> Thanks for the feedback. I will wait for suggestions as to what to do
> with the patch and have another look at the code.
It seems to me current code for defer accept should be fixed as well.
'Allowing' to send the last SYNACK hoping this wont be lost somewhere
seems really strange.
syn_ack_recalc(...)
{
...
/*
* Do not resend while waiting for data after ACK,
* start to resend on end of deferring period to give
* last chance for data or ACK to create established socket.
*/
*resend = !inet_rsk(req)->acked ||
req->num_timeout >= rskq_defer_accept - 1;
}
DEFER_ACCEPT should really mean :
We have the socket, only defer putting it in the accept queue until :
- Client sent data.
Or
- A given amount of time has elapsed
Defer accept is typically used by protocols where client sends the first
chunk of data.
If after XX seconds chunk of data is still not there, sending a SYNACK
wont really help : just pass the fd to application and application
probably will wait another XX seconds for the client request, then
timeout and close the socket.
So instead of sending a final SYNACK just to be able to receive an ACK
and finally put the request into listener accept queue is a waste of
bandwidth. We should put the request into listener accept queue and save
one/two messages.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists