Home | History | Annotate | Download | only in netinet
History log of /src/sys/netinet/tcp_timer.h
RevisionDateAuthorComments
 1.30  06-Aug-2019  riastradh Clamp tcp timer quantities to reasonable ranges.

Reported-by: syzbot+259675123340bf46a6de@syzkaller.appspotmail.com
 1.29  19-Jan-2018  ozaki-r branches: 1.29.4; 1.29.8;
Run tcp_slowtimo in workqueue if NET_MPSAFE

If NET_MPSAFE is enabled, we have to avoid taking softnet_lock in softint as
much as possible to prevent any softint handlers including callout handlers
such as tcp_slowtimo from sticking on softnet_lock because it results in
undesired delays of executing subsequent softint handlers.

NFCI for !NET_MPSAFE
 1.28  24-May-2011  gdt branches: 1.28.48;
Note units and current value for TCP_DELACK_TICKS.
 1.27  20-Apr-2011  gdt Rewrite comments about TCP RTO calculations.

Long ago, the storage representations of srtt and rttvar were changed
from the 4.4BSD scheme, and the comments are out of sync with the
code. This commit rewrites most of the comments that explain the RTO
calculations, and points out some issues in the code.

Joint work with Bev Schwartz of BBN (original analysis and comments),
but I have rewritten and extended them, so errors are mine.

This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073. Approved for Public
Release, Distribution Unlimited
 1.26  28-Apr-2008  martin branches: 1.26.22; 1.26.28;
Remove clause 3 and 4 from TNF licenses
 1.25  20-Jun-2007  christos branches: 1.25.28; 1.25.30; 1.25.32;
- per socket keepalive settings
- settable connection establishment timeout
 1.24  26-Sep-2006  jeremy branches: 1.24.8; 1.24.10;
Fixed a bug in the timeout range constraint macro that can cause a timeout
to break free of the constraint if the range minimum boundary is larger than
the maximum boundary.

Discovered by jmg@FreeBSD.org. (See FreeBSD's tcp_timer.h rev 1.31).
 1.23  10-Dec-2005  elad branches: 1.23.20; 1.23.22;
Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.
 1.22  02-Jun-2005  riz branches: 1.22.2;
Fix some const fallout.
 1.21  04-Mar-2005  mycroft Re-add callout_active(), in a way compatible with the FreeBSD version, and use
it in the TCP stack to test which of the REXMT or PERSIST timer is in use.
This fixes a race condition that could cause "panic: tcp_output REXMT". See
tech-net for details.
 1.20  07-Aug-2003  agc branches: 1.20.8; 1.20.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.19  04-Feb-2003  thorpej branches: 1.19.2;
Use callout_setfunc() and callout_schedule().
 1.18  03-Feb-2003  thorpej Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.
 1.17  04-Nov-2001  matt Change a few variable/tables to const since they are read-only.
 1.16  10-Sep-2001  thorpej branches: 1.16.2;
Update copyrights.
 1.15  10-Sep-2001  thorpej Use callouts for TCP timers, rather than traversing the list of
all open TCP connections in tcp_slowtimo() (which is called 2x
per second). It's fairly rare for TCP timers to actually fire,
so saving this list traversal is good, especially if you want
to scale to thousands of open connections.
 1.14  10-Sep-2001  thorpej Initialize TCP timer variables in a new function, tcp_timer_init().
 1.13  10-Sep-2001  thorpej Add explicit initialization of TCP timer state. A noop right now.
 1.12  10-Sep-2001  thorpej Split tcp_timers() into multiple functions, one for each timer,
and call it directly from tcp_slowtimo() (via a table) rather
than going through tcp_userreq().

This will allow us to call TCP timers directly from callouts,
in a future revision.
 1.11  10-Sep-2001  thorpej Use a callout for the delayed ACK timer, and delete tcp_fasttimo().
Expose the delayed ACK timer as net.inet.tcp.delack_ticks.
 1.10  10-Sep-1998  mouse branches: 1.10.24; 1.10.26; 1.10.28;
Create tcp.keepidle, tcp.keepintvl, tcp.keepcnt, tcp.slowhz sysctls.
 1.9  07-May-1998  thorpej Define all TCP timers in terms of PRT timers.
 1.8  06-May-1998  thorpej Use the monotonically increasing slow timer timestamp provided by
the protocol dispatch layer for TCP timers. This saves having to
modify a potentially large number of timer values (which were shorts,
and expanded to ... a lot of code on the Alpha).
 1.7  10-Feb-1998  perry add/cleanup multiple inclusion protection.
 1.6  26-Mar-1995  jtc KERNEL -> _KERNEL
 1.5  29-Jun-1994  cgd New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.4  13-May-1994  mycroft Update to 4.4-Lite networking code, with a few local changes.
 1.3  20-May-1993  cgd more rcsid additions and file header cleanups
 1.2  19-Apr-1993  mycroft Add consistent multiple-inclusion protection.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  05-Jan-1998  thorpej Import sys/netinet from 4.4BSD-Lite for reference purposes.
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.28.1  01-Oct-2001  fvdl Catch up with -current.
 1.10.26.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.26.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.10.24.2  14-Nov-2001  nathanw Catch up to -current.
 1.10.24.1  21-Sep-2001  nathanw Catch up to -current.
 1.16.2.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.19.2.6  11-Dec-2005  christos Sync with head.
 1.19.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.19.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.19.2.1  03-Aug-2004  skrll Sync with HEAD
 1.20.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.20.8.1  29-Apr-2005  kent sync with -current
 1.22.2.3  03-Sep-2007  yamt sync with head.
 1.22.2.2  30-Dec-2006  yamt sync with head.
 1.22.2.1  21-Jun-2006  yamt sync with head.
 1.23.22.1  22-Oct-2006  yamt sync with head
 1.23.20.1  18-Nov-2006  ad Sync with head.
 1.24.10.1  11-Jul-2007  mjf Sync with head.
 1.24.8.1  15-Jul-2007  ad Sync with head.
 1.25.32.1  16-May-2008  yamt sync with head.
 1.25.30.1  18-May-2008  yamt sync with head.
 1.25.28.1  02-Jun-2008  mjf Sync with HEAD.
 1.26.28.1  06-Jun-2011  jruoho Sync with HEAD.
 1.26.22.2  31-May-2011  rmind sync with head
 1.26.22.1  21-Apr-2011  rmind sync with head
 1.28.48.1  03-Feb-2018  snj Pull up following revision(s) (requested by ozaki-r in ticket #514):
sys/net/route.c: 1.205
sys/net/rtsock.c: 1.237-1.238
sys/netinet/in.c: 1.215
sys/netinet/tcp_subr.c: 1.272
sys/netinet/tcp_timer.c: 1.93
sys/netinet/tcp_timer.h: 1.29
sys/netinet/tcp_var.h: 1.182
sys/netinet6/in6.c: 1.258
Remove extra pserialize_perform from in_purgeaddr
It's already performed in ifa_remove. Note so there (in in6_unlink_ifa too).
Release rt_so_mtx on updating a rtentry to avoid a deadlock with route_intr
The deadlock happened only if NET_MPSAFE on.
Run tcp_slowtimo in workqueue if NET_MPSAFE
If NET_MPSAFE is enabled, we have to avoid taking softnet_lock in softint as
much as possible to prevent any softint handlers including callout handlers
such as tcp_slowtimo from sticking on softnet_lock because it results in
undesired delays of executing subsequent softint handlers.
NFCI for !NET_MPSAFE
Fix a return value of rt_update_prepare
Callers expect it to be an errno.
Fix another deadlock
When waiting for a route update to finish, a waiter has to release its reference
to the route to avoid a deadlock. Because a updater tries to wait for references
to a target route (except for a reference by the updater itself) to be released.
 1.29.8.1  10-Sep-2019  martin Pull up following revision(s) (requested by maxv in ticket #193):

sys/netinet/tcp_timer.h: revision 1.30
sys/netinet/tcp_input.c: revision 1.415
sys/netinet/tcp_usrreq.c: revision 1.225
sys/netinet/tcp_subr.c: revision 1.283

Clamp tcp timer quantities to reasonable ranges.
 1.29.4.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed