aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2012-04-16 13:49:03 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2012-04-16 13:49:03 +0000
commitef341ee1e3f777b302c9ba9dcd303a5ef206cab1 (patch)
treee28d7a410365611b09028480f37189613684135f /sys/netinet/tcp_output.c
parent5bc2249ff8dcdd60e310b865d6cdb3f895270bad (diff)
downloadsrc-ef341ee1e3f777b302c9ba9dcd303a5ef206cab1.tar.gz
src-ef341ee1e3f777b302c9ba9dcd303a5ef206cab1.zip
When we receive an ICMP unreach need fragmentation datagram, we take
proposed MTU value from it and update the TCP host cache. Then tcp_mss_update() is called on the corresponding tcpcb. It finds the just allocated entry in the TCP host cache and updates MSS on the tcpcb. And then we do a fast retransmit of what we have in the tcp send buffer. This sequence gets broken if the TCP host cache is exausted. In this case allocation fails, and later called tcp_mss_update() finds nothing in cache. The fast retransmit is done with not reduced MSS and is immidiately replied by remote host with new ICMP datagrams and the cycle repeats. This ping-pong can go up to wirespeed. To fix this: - tcp_mss_update() gets new parameter - mtuoffer, that is like offer, but needs to have min_protoh subtracted. - tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify(). - tcp_mtudisc() now accepts not a useless error argument, but proposed MTU value, that is passed to tcp_mss_update() as mtuoffer. Reported by: az Reported by: Andrey Zonov <andrey zonov.org> Reviewed by: andre (previous version of patch)
Notes
Notes: svn path=/head/; revision=234342
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 1965db15d9cd..645fb37a9971 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1293,7 +1293,7 @@ out:
*/
if (tso)
tp->t_flags &= ~TF_TSO;
- tcp_mtudisc(tp->t_inpcb, 0);
+ tcp_mtudisc(tp->t_inpcb, -1);
return (0);
case EHOSTDOWN:
case EHOSTUNREACH: