Netdev List
 help / color / mirror / Atom feed
From: Koichiro Den <den@klaipeden.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org
Subject: Re: [net-next 1/3] tcp: avoid useless copying and collapsing of just one skb
Date: Sun, 15 Oct 2017 11:32:48 +0900	[thread overview]
Message-ID: <1508034768.29679.1.camel@klaipeden.com> (raw)
In-Reply-To: <1507995761.31614.56.camel@edumazet-glaptop3.roam.corp.google.com>

On Sat, 2017-10-14 at 08:42 -0700, Eric Dumazet wrote:
> On Sat, 2017-10-14 at 16:27 +0900, Koichiro Den wrote:
> > On the starting point chosen, it could be possible that just one skb
> > remains in between the range provided, leading to copying and re-insertion
> > of rb node, which is useless with respect to the rcv buf measurement.
> > This is rather probable in ooo queue case, in which non-contiguous bloated
> > packets have been queued up.
> > 
> > Signed-off-by: Koichiro Den <den@klaipeden.com>
> > ---
> >  net/ipv4/tcp_input.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> > index d0682ce2a5d6..1d785b5bf62d 100644
> > --- a/net/ipv4/tcp_input.c
> > +++ b/net/ipv4/tcp_input.c
> > @@ -4807,7 +4807,8 @@ tcp_collapse(struct sock *sk, struct sk_buff_head
> > *list, struct rb_root *root,
> >  		start = TCP_SKB_CB(skb)->end_seq;
> >  	}
> >  	if (end_of_skbs ||
> > -	    (TCP_SKB_CB(skb)->tcp_flags & (TCPHDR_SYN | TCPHDR_FIN)))
> > +	    (TCP_SKB_CB(skb)->tcp_flags & (TCPHDR_SYN | TCPHDR_FIN)) ||
> > +	    (TCP_SKB_CB(skb)->seq == start && TCP_SKB_CB(skb)->end_seq ==
> > end))
> >  		return;
> >  
> >  	__skb_queue_head_init(&tmp);
> 
> 
> What do you mean by useless ?
> 
> Surely if this skb contains 17 segments (some USB drivers allocate 8KB
> per frame), we want to collapse them to save memory.
> 
> So I do not agree with this patch.
> 
> 
I missed that, and sorry about bothering with all, I totally misunderstood it.
Thank you for all of them.

  reply	other threads:[~2017-10-15  2:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  7:27 [net-next 0/3] optimisations and reorganisations of tcp_collapse Koichiro Den
2017-10-14  7:27 ` [net-next 1/3] tcp: avoid useless copying and collapsing of just one skb Koichiro Den
2017-10-14 15:42   ` Eric Dumazet
2017-10-15  2:32     ` Koichiro Den [this message]
2017-10-14  7:27 ` [net-next 2/3] tcp: do not tcp_collapse once SYN or FIN found Koichiro Den
2017-10-14 15:43   ` Eric Dumazet
2017-10-15  2:43     ` Koichiro Den
2017-10-14  7:27 ` [net-next 3/3] tcp: keep tcp_collapse controllable even after processing starts Koichiro Den
2017-10-14 15:46   ` Eric Dumazet
2017-10-15  2:45     ` Koichiro Den

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508034768.29679.1.camel@klaipeden.com \
    --to=den@klaipeden.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox