summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-04-16 13:49:03 +0000
committerglebius <glebius@FreeBSD.org>2012-04-16 13:49:03 +0000
commit9297dd4c7e824aadeea6dae741d5f37f4882fda0 (patch)
treee28d7a410365611b09028480f37189613684135f /sys/netinet/tcp_var.h
parentb9ad5bf2361636dfc9d0a86b468fd194f8f63671 (diff)
downloadFreeBSD-src-9297dd4c7e824aadeea6dae741d5f37f4882fda0.zip
FreeBSD-src-9297dd4c7e824aadeea6dae741d5f37f4882fda0.tar.gz
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)
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index b602c27..3b8bdf7 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -675,7 +675,8 @@ void tcp_reass_destroy(void);
void tcp_input(struct mbuf *, int);
u_long tcp_maxmtu(struct in_conninfo *, int *);
u_long tcp_maxmtu6(struct in_conninfo *, int *);
-void tcp_mss_update(struct tcpcb *, int, struct hc_metrics_lite *, int *);
+void tcp_mss_update(struct tcpcb *, int, int, struct hc_metrics_lite *,
+ int *);
void tcp_mss(struct tcpcb *, int);
int tcp_mssopt(struct in_conninfo *);
struct inpcb *
OpenPOWER on IntegriCloud