netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin KaFai Lau <kafai@fb.com>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev <netdev@vger.kernel.org>, Kernel Team <kernel-team@fb.com>,
	Neal Cardwell <ncardwell@google.com>,
	Yuchung Cheng <ycheng@google.com>
Subject: Re: [RFC PATCH net] tcp: Update pcount after skb_pull() during mtu probing
Date: Fri, 5 Jun 2015 11:02:55 -0700	[thread overview]
Message-ID: <20150605180254.GC2951343@devbig242.prn2.facebook.com> (raw)
In-Reply-To: <CANn89iLd1bqCOxbALcDNzi--Hn8A970HmvM2__ryzjwSbOwZ6Q@mail.gmail.com>

On Fri, Jun 05, 2015 at 09:53:51AM -0700, Eric Dumazet wrote:
> Sounds good, although I would simply get rid of all this complexity in
> this very unlikely path.
> 
> Would you instead try the following ?
> 
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index eeb59befaf06867b00e1dd6ded7742b2f0bcd821..41ef2c96b2e810e289d6d773e4be09c493b99c09
> 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1987,16 +1987,7 @@ static int tcp_mtu_probe(struct sock *sk)
>                 } else {
>                         TCP_SKB_CB(nskb)->tcp_flags |=
> TCP_SKB_CB(skb)->tcp_flags &
>                                                    ~(TCPHDR_FIN|TCPHDR_PSH);
> -                       if (!skb_shinfo(skb)->nr_frags) {
> -                               skb_pull(skb, copy);
> -                               if (skb->ip_summed != CHECKSUM_PARTIAL)
> -                                       skb->csum = csum_partial(skb->data,
> -                                                                skb->len, 0);
> -                       } else {
> -                               __pskb_trim_head(skb, copy);
> -                               tcp_set_skb_tso_segs(sk, skb, mss_now);
> -                       }
> -                       TCP_SKB_CB(skb)->seq += copy;
> +                       tcp_trim_head(sk, skb, copy);
tcp_trim_head() does not take the mss_now.
Is it fine to have mss_now <= tcp_skb_mss(skb)? or we can depend on
the tcp_init_tso_segs() in the tcp_write_xmit() to take care of it?

  reply	other threads:[~2015-06-05 18:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 16:16 [RFC PATCH net] tcp: Update pcount after skb_pull() during mtu probing Martin KaFai Lau
2015-06-05 16:53 ` Eric Dumazet
2015-06-05 18:02   ` Martin KaFai Lau [this message]
2015-06-05 21:23     ` Eric Dumazet
2015-06-05 23:02       ` Martin KaFai Lau
2015-06-05 23:45         ` Eric Dumazet

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=20150605180254.GC2951343@devbig242.prn2.facebook.com \
    --to=kafai@fb.com \
    --cc=edumazet@google.com \
    --cc=kernel-team@fb.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).