From: Martin KaFai Lau <kafai@fb.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
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 16:02:07 -0700 [thread overview]
Message-ID: <20150605230206.GD2951343@devbig242.prn2.facebook.com> (raw)
In-Reply-To: <1433539435.1895.60.camel@edumazet-glaptop2.roam.corp.google.com>
On Fri, Jun 05, 2015 at 02:23:55PM -0700, Eric Dumazet wrote:
> On Fri, 2015-06-05 at 11:02 -0700, Martin KaFai Lau wrote:
>
> > 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?
>
> It should be fine : packets not yet sent have tcp_skb_pcount()==0,
> so that tcp_init_tso_segs() can do the computation at the right time.
hmm.... From tcp_write_xmit(), tcp_init_tso_segs() makes tcp_skb_pcount(skb) > 0
but it may not be sent out immediately (like failing tcp_cwnd_test()). Later,
this skb is considered for tcp_mtu_probe(), sliced and forgot to update the
pcount, I think.
I am probably missing something. Hence, I have a side question
in tcp_init_tso_segs(), should pcount be also recalculated if
(tso_segs == 1 && mss_now < skb->len)? Like this:
diff --git i/net/ipv4/tcp_output.c w/net/ipv4/tcp_output.c
index a369e8a..15d1c44 100644
--- i/net/ipv4/tcp_output.c
+++ w/net/ipv4/tcp_output.c
@@ -1624,7 +1624,8 @@ static int tcp_init_tso_segs(const struct sock *sk, struct sk_buff *skb,
{
int tso_segs = tcp_skb_pcount(skb);
- if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) {
+ if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now) ||
+ (tso_segs == 1 && mss_now < skb->len)) {
tcp_set_skb_tso_segs(sk, skb, mss_now);
tso_segs = tcp_skb_pcount(skb);
}
next prev parent reply other threads:[~2015-06-05 23:02 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
2015-06-05 21:23 ` Eric Dumazet
2015-06-05 23:02 ` Martin KaFai Lau [this message]
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=20150605230206.GD2951343@devbig242.prn2.facebook.com \
--to=kafai@fb.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.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).