From: Fan Du <fan.du@intel.com>
To: johnwheffner@gmail.com
Cc: edumazet@google.com, davem@davemloft.net, netdev@vger.kernel.org,
fengyuleidian0615@gmail.com
Subject: [PATCHv3 net-next 3/4] ipv4: shrink current mss for tcp PMTU blackhole detection
Date: Sat, 28 Feb 2015 11:23:04 +0800 [thread overview]
Message-ID: <1425093785-27380-4-git-send-email-fan.du@intel.com> (raw)
In-Reply-To: <1425093785-27380-1-git-send-email-fan.du@intel.com>
Reducing current tcp mss instead of search_low will make
more sense, as current tcp mss still got lost.
In addition, rename tcp_mtu_probing to tcp_blackhole_probe
to clearify confusion between tcp_mtu_probing and
tcp_mtu_probe.
Signed-off-by: Fan Du <fan.du@intel.com>
---
net/ipv4/tcp_timer.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 0732b78..3465175 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -99,7 +99,8 @@ static int tcp_orphan_retries(struct sock *sk, int alive)
return retries;
}
-static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
+static void tcp_blackhole_probe(struct inet_connection_sock *icsk,
+ struct sock *sk)
{
struct net *net = sock_net(sk);
@@ -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)
} else {
if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
/* Black hole detection */
- tcp_mtu_probing(icsk, sk);
+ tcp_blackhole_probe(icsk, sk);
dst_negative_advice(sk);
}
--
1.7.1
next prev parent reply other threads:[~2015-02-28 3:27 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 ` Fan Du [this message]
2015-02-28 23:39 ` [PATCHv3 net-next 3/4] ipv4: shrink current mss for tcp PMTU blackhole detection John Heffner
2015-03-02 9:29 ` Fan Du
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=1425093785-27380-4-git-send-email-fan.du@intel.com \
--to=fan.du@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fengyuleidian0615@gmail.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).