Subject: Re: [PATCH RFC 0/2] xfrm: Remove ancient sleeping code

From: Steffen Klassert <[email-masked]>
Date: Wed, 16 Oct 2013 11:45:49 +0200

On Tue, Oct 15, 2013 at 04:58:34PM -0700, Eric Dumazet wrote:
> On Tue, 2013-10-15 at 09:30 +0200, Steffen Klassert wrote:
> 
> > Right, that's why I've limited the queue to 100 packets. We can
> > queue the SYNs of up to 100 tcp connestions that want to use
> > this IPsec state. It surely can happen that we queue multiple
> > retransmitted SYNs if the IPsec resolution is slow. But the
> > queueing code tries at least to get the packets out before
> > the first tcp retransmit. I think there is still room for
> > optimizations, maybe reducing the queue lenght or the queue
> > timeout to avoid queueing retransmitted SYNs as much as possible.
> 
> Note that its totally possible to avoid retransmitting SYN if original
> SYN is still in a host queue.
> 
> We currently increment a SNMP counter when we detect this, we could
> do something else (like not queuing a copy of the packet)
> 
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=0e280af026a5662ffd57c4e623b822df1f7f47ff

This is interesting, we could do the same check before we queue
the packet and drop it if the original packet is still in a host
queue.

I'll do a RFC patch.

> 
> Another work in progress is to delay RTO arming at the time TCP
> packet leaves the host queues, instead of at the enqueue time.
> 

That would be even better, are there already patches publicly
available?

Thanks!