From: Christoph Paasch Subject: Re: [PATCH net] tcp: do not mangle skb->cb[] in tcp_make_synack() Date: Thu, 02 Nov 2017 12:49:07 -0700 Message-ID: <20171102194907.GX44287@da0602a-dhcp105.apple.com> References: <20171101211001.57901-1-cpaasch@apple.com> <1509573218.3828.54.camel@edumazet-glaptop3.roam.corp.google.com> <20171102001035.GR44287@da0602a-dhcp105.apple.com> <1509584410.3828.64.camel@edumazet-glaptop3.roam.corp.google.com> <1509589291.2849.1.camel@edumazet-glaptop3.roam.corp.google.com> <1509651025.2849.23.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Cc: Eric Dumazet , David Miller , netdev To: Eric Dumazet Return-path: Received: from mail-out25.apple.com ([17.171.2.35]:52296 "EHLO mail-in25.apple.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932547AbdKBTsl (ORCPT ); Thu, 2 Nov 2017 15:48:41 -0400 Content-disposition: inline In-reply-to: <1509651025.2849.23.camel@edumazet-glaptop3.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On 02/11/17 - 12:30:25, Eric Dumazet wrote: > From: Eric Dumazet > > Christoph Paasch sent a patch to address the following issue : > > tcp_make_synack() is leaving some TCP private info in skb->cb[], > then send the packet by other means than tcp_transmit_skb() > > tcp_transmit_skb() makes sure to clear skb->cb[] to not confuse > IPv4/IPV6 stacks, but we have no such cleanup for SYNACK. > > tcp_make_synack() should not use tcp_init_nondata_skb() : > > tcp_init_nondata_skb() really should be limited to skbs put in write/rtx > queues (the ones that are only sent via tcp_transmit_skb()) > > This patch fixes the issue and should even save few cpu cycles ;) > > Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") > Signed-off-by: Eric Dumazet > Reported-by: Christoph Paasch > --- > net/ipv4/tcp_output.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Christoph Paasch