[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141119.145741.1905980604994551607.davem@davemloft.net>
Date: Wed, 19 Nov 2014 14:57:41 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: ycheng@...gle.com
Cc: eric.dumazet@...il.com, nuclearcat@...learcat.com,
netdev@...r.kernel.org, ncardwell@...gle.com
Subject: Re: [PATCH v2 net-next] tcp: make connect() mem charging friendly
From: Yuchung Cheng <ycheng@...gle.com>
Date: Wed, 19 Nov 2014 14:10:42 +0800
> On Tue, Nov 18, 2014 at 3:06 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>> From: Eric Dumazet <edumazet@...gle.com>
>>
>> While working on sk_forward_alloc problems reported by Denys
>> Fedoryshchenko, we found that tcp connect() (and fastopen) do not call
>> sk_wmem_schedule() for SYN packet (and/or SYN/DATA packet), so
>> sk_forward_alloc is negative while connect is in progress.
>>
>> We can fix this by calling regular sk_stream_alloc_skb() both for the
>> SYN packet (in tcp_connect()) and the syn_data packet in
>> tcp_send_syn_data()
>>
>> Then, tcp_send_syn_data() can avoid copying syn_data as we simply
>> can manipulate syn_data->cb[] to remove SYN flag (and increment seq)
>>
>> Instead of open coding memcpy_fromiovecend(), simply use this helper.
>>
>> This leaves in socket write queue clean fast clone skbs.
>>
>> This was tested against our fastopen packetdrill tests.
>>
>> Reported-by: Denys Fedoryshchenko <nuclearcat@...learcat.com>
>> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Acked-by: Yuchung Cheng <ycheng@...gle.com>
>
> Thanks! this simplifies the code a lot.
Agreed, applied, thanks everyone!
--
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