#
e835bce2 |
| 16-Jan-2025 |
bluhm <bluhm@openbsd.org> |
Remove net lock from TCP sysctl for keep alive.
Keep copies in seconds for the sysctl and update timer variables atomically when they change. tcp_maxidle was historically calculated in tcp_slowtimo
Remove net lock from TCP sysctl for keep alive.
Keep copies in seconds for the sysctl and update timer variables atomically when they change. tcp_maxidle was historically calculated in tcp_slowtimo() as the timers were called from there. Better calculate maxidle when needed. tcp_timer_init() is useless, just initialize data. While there make the names consistent.
input sthen@; OK mvs@
show more ...
|
#
4ab10cec |
| 03-Jan-2025 |
bluhm <bluhm@openbsd.org> |
Reference count the inpcb in TCP timers.
Switch from struct tcpcb to inpcb in the TCP timer argument. The latter already has a reference counter. Increment it at timeout_add() and decrement at tim
Reference count the inpcb in TCP timers.
Switch from struct tcpcb to inpcb in the TCP timer argument. The latter already has a reference counter. Increment it at timeout_add() and decrement at timeout_del() or when handler runs. The reaper timeout is special as it does not need a reference, the inpcb is already dead. Use special field t_timer_reaper instead of regular TCP timeout and run it without reference or lock.
OK mvs@
show more ...
|
#
66570633 |
| 01-Jan-2025 |
bluhm <bluhm@openbsd.org> |
Fix whitespace.
|
#
f9d292df |
| 28-Dec-2024 |
bluhm <bluhm@openbsd.org> |
Read more TCP sysctl variables atomically.
OK mvs@
|
#
7aa20da4 |
| 20-Dec-2024 |
bluhm <bluhm@openbsd.org> |
Declare some global TCP variables constant.
OK mvs@
|
#
94c283ed |
| 29-Jan-2024 |
bluhm <bluhm@openbsd.org> |
Run TCP timer without kernel lock.
TCP timers are protected by exclusive net lock. They may sleep to grab it as they run in process context. There is no reason for them to hold additional kernel l
Run TCP timer without kernel lock.
TCP timers are protected by exclusive net lock. They may sleep to grab it as they run in process context. There is no reason for them to hold additional kernel lock. Since we have MP safe timeouts now, convert them by adding TIMEOUT_PROC and TIMEOUT_MPSAFE flag.
OK mvs@
show more ...
|
#
b9587575 |
| 14-Mar-2023 |
yasuoka <yasuoka@openbsd.org> |
To avoid misunderstanding, keep variables for tcp keepalive in milliseconds, which is the same unit of tcp_now(). However, keep the unit of sysctl variables in seconds and convert their unit in tcp_
To avoid misunderstanding, keep variables for tcp keepalive in milliseconds, which is the same unit of tcp_now(). However, keep the unit of sysctl variables in seconds and convert their unit in tcp_sysctl(). Additionally revert TCPTV_SRTTDFLT back to 3 seconds, which was mistakenly changed to 1.5 seconds by tcp_timer.h 1.19.
ok claudio
show more ...
|
#
00007ca3 |
| 07-Nov-2022 |
yasuoka <yasuoka@openbsd.org> |
Modify TCP receive buffer size auto scaling to use the smoothed RTT (SRTT) instead of the timestamp option. Since the timestamp option is disabled on some OSs (eg. Windows) or dropped by some firewa
Modify TCP receive buffer size auto scaling to use the smoothed RTT (SRTT) instead of the timestamp option. Since the timestamp option is disabled on some OSs (eg. Windows) or dropped by some firewalls/routers, in such a case the window size had been fixed at 16KB, this limits throughput at very low on high latency networks. Also replace "tcp_now" from 2HZ tick counter to binuptime in milliseconds to calculate the SRTT better.
tested by krw matthieu jmatthew dlg djm stu stsp ok claudio
show more ...
|
#
5bcca80f |
| 08-May-2018 |
bluhm <bluhm@openbsd.org> |
Historically there were slow and fast tcp timeouts. That is why the delack timer had a different implementation. Use the same mechanism for all TCP timer. OK mpi@ visa@
|
#
772b5f4e |
| 07-Feb-2018 |
bluhm <bluhm@openbsd.org> |
Historically TCP timeouts were implemented with pr_slowtimo and pr_fasttimo. That is the reason why we have two timeout mechanisms with complicated ticks calculation. Move the delay ACK timeout to
Historically TCP timeouts were implemented with pr_slowtimo and pr_fasttimo. That is the reason why we have two timeout mechanisms with complicated ticks calculation. Move the delay ACK timeout to milliseconds and remove some ticks and hz mess from the others. This makes it easier to see the actual values. OK florian@ dhill@ dlg@
show more ...
|
#
ded1556f |
| 06-Feb-2018 |
bluhm <bluhm@openbsd.org> |
There was a race in the TCP timers. As they may sleep to grab the netlock, timers may still run after they have been disarmed. Deleting the timeout is not sufficient to cancel them, but the code fr
There was a race in the TCP timers. As they may sleep to grab the netlock, timers may still run after they have been disarmed. Deleting the timeout is not sufficient to cancel them, but the code from 4.4 BSD is assuming this. The solution is to add a flag for every timer to see whether it has been armed or canceled. Remove the TF_DEAD check as tcp_canceltimers() is called before the reaper timer is fired. Cancelation works reliably now. OK mpi@
show more ...
|
#
9acddc59 |
| 23-Jan-2018 |
bluhm <bluhm@openbsd.org> |
The TCP reaper timeout was still imlemented as soft timeout. So it could run immediately and was not synchronized with the TCP timeouts, although that was the intension when it was introduced in rev
The TCP reaper timeout was still imlemented as soft timeout. So it could run immediately and was not synchronized with the TCP timeouts, although that was the intension when it was introduced in revision 1.85. Convert the reaper to an ordinary TCP timeout so it is scheduled on the same timeout thread after all timeouts have finished. A net lock is not necessary as the process calling tcp_close() will not access the tcpcb after arming the reaper timeout. OK mikeb@
show more ...
|
#
7887537f |
| 04-Oct-2016 |
mpi <mpi@openbsd.org> |
Convert timeouts that need a process context to timeout_set_proc(9).
The current reason is that rtalloc_mpath(9) inside ip_output() might end up inserting a RTF_CLONED route and that require a write
Convert timeouts that need a process context to timeout_set_proc(9).
The current reason is that rtalloc_mpath(9) inside ip_output() might end up inserting a RTF_CLONED route and that require a write lock.
ok kettenis@, bluhm@
show more ...
|
#
04c823f3 |
| 06-Jul-2011 |
sthen <sthen@openbsd.org> |
Add sysctl net.inet.tcp.always_keepalive, when this is set the system behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds.
I
Add sysctl net.inet.tcp.always_keepalive, when this is set the system behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds.
In conjunction with a keepidle value greatly reduced from the default, this can be useful for keeping sessions open if you are stuck on a network with short NAT or firewall timeouts.
Feedback from various people, ok henning@ claudio@
show more ...
|
#
92df2d4e |
| 08-Nov-2008 |
dlg <dlg@openbsd.org> |
fix macros up so they use the do { } while (/* CONSTCOND */ 0) idiom
ok deraadt@ otto@
|
#
f7ab9cef |
| 24-Nov-2007 |
jmc <jmc@openbsd.org> |
some spelling fixes from Martynas Venckus
|
#
29295d1c |
| 02-Jun-2003 |
millert <millert@openbsd.org> |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
#
b8af996b |
| 28-Mar-2003 |
henning <henning@openbsd.org> |
another const char * from David Hill
|
#
759b0e56 |
| 08-Mar-2002 |
provos <provos@openbsd.org> |
use timeout(9) to schedule TCP timers. this avoid traversing all tcp connections during tcp_slowtimo. apdapted from thorpej@netbsd.org
|
#
99abd33f |
| 01-Mar-2002 |
provos <provos@openbsd.org> |
remove tcp_fasttimo and convert delayed acks to the timeout(9) API instead. adapated from netbsd. okay angelos@
|
#
dfed87a5 |
| 14-Jan-2002 |
provos <provos@openbsd.org> |
typo
|
#
2522fca3 |
| 14-Jan-2002 |
provos <provos@openbsd.org> |
use macros to manage tcp timers; based on netbsd
|
#
d1eb37ff |
| 09-Jun-2001 |
angelos <angelos@openbsd.org> |
Inclusion protection.
|
#
8ff6e012 |
| 24-Feb-1997 |
niklas <niklas@openbsd.org> |
OpenBSD tags + some prototyping police
|
#
f489e97b |
| 23-Sep-1996 |
deraadt <deraadt@openbsd.org> |
fix tuba after synbomb fixes
|