From: Fan Du <fengyuleidian0615@gmail.com>
To: John Heffner <johnwheffner@gmail.com>
Cc: Fan Du <fan.du@intel.com>,
edumazet@google.com, David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCHv3 net-next 3/4] ipv4: shrink current mss for tcp PMTU blackhole detection
Date: Mon, 02 Mar 2015 17:29:56 +0800 [thread overview]
Message-ID: <54F42D94.6070802@gmail.com> (raw)
In-Reply-To: <CABrhC0m6nCwHy-CCLiFStYhSbMf78E1i6Lvh=DsPi6Pcg-GCOw@mail.gmail.com>
于 2015年03月01日 07:39, John Heffner 写道:
> On Fri, Feb 27, 2015 at 10:23 PM, Fan Du<fan.du@intel.com> wrote:
>> >Reducing current tcp mss instead of search_low will make
>> >more sense, as current tcp mss still got lost.
>> >@@ -113,7 +114,8 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
>> > struct tcp_sock *tp = tcp_sk(sk);
>> > int mss;
>> >
>> >- mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
>> >+ /* try mss smaller than current mss */
>> >+ mss = tcp_current_mss(sk) >> 1;
>> > mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
>> > mss = max(mss, 68 - tp->tcp_header_len);
>> > icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
>> >@@ -176,7 +178,7 @@ static int tcp_write_timeout(struct sock *sk)
> I don't believe there's a problem with the code as written. Modulo
> headers, search_low <= mss =< search_high. This code, on successive
> timeouts, widens the search range by adjusting search_low (and mss)
> downward.
With original approach(doubling mss), mss is not in between search_low and search_high,
it always equates search_low(subtract headers), the potential mss in case of blackhole
is 256 and 128, after doubling, it will become 512 and 256 eventually no matter how
route changes, even mtu reduced from 1500 to 1100 in intermediate node.
After using binary search, halve search_low will make search window left boundary expending
in a slower manner, as a result the limit of mss is search_high/2, because search_high does
not change.
Timeout indicates search_high should be set to the new mtu corresponding to current_mss no
matter how we change search_low. So the best shot here IMO would be updating search_high
with current_mss, which in return makes the search window *slide* from right to left, and
the probing will converge in good speed eventually.
So my thoughts is:
@@ -113,6 +113,7 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
struct tcp_sock *tp = tcp_sk(sk);
int mss;
+ icsk_mtup.search_high = tcp_mss_to_mtu(sk, tcp_current_mss(sk));
mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
mss = max(mss, 68 - tp->tcp_header_len);
next prev parent reply other threads:[~2015-03-02 9:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-28 3:23 [PATCHv3 net-next 0/4] Improvements for TCP PMTU Fan Du
2015-02-28 3:23 ` [PATCHv3 net-next 1/4] ipv4: Raise tcp PMTU probe mss base size Fan Du
2015-02-28 3:23 ` [PATCHv3 net-next 2/4] ipv4: Use binary search to choose tcp PMTU probe_size Fan Du
2015-02-28 23:20 ` John Heffner
2015-03-02 9:29 ` Fan Du
2015-02-28 3:23 ` [PATCHv3 net-next 3/4] ipv4: shrink current mss for tcp PMTU blackhole detection Fan Du
2015-02-28 23:39 ` John Heffner
2015-03-02 9:29 ` Fan Du [this message]
2015-03-02 20:32 ` John Heffner
2015-03-03 9:18 ` Fan Du
2015-02-28 3:23 ` [PATCHv3 net-next 4/4] ipv4: Create probe timer for tcp PMTU as per RFC4821 Fan Du
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=54F42D94.6070802@gmail.com \
--to=fengyuleidian0615@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fan.du@intel.com \
--cc=johnwheffner@gmail.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).