| #
7b71f57f
|
| 03-Dec-2025 |
Warner Losh <imp@FreeBSD.org> |
netinet: Remove left-over sys/cdefs.h
These were for $FreeBSD$ that was removed a while ago, but these includes didn't get swept up in that. Remove them all now.
Sponsored by: Netflix MFC After:
netinet: Remove left-over sys/cdefs.h
These were for $FreeBSD$ that was removed a while ago, but these includes didn't get swept up in that. Remove them all now.
Sponsored by: Netflix MFC After: 2 weeks
show more ...
|
| #
b1f96169
|
| 24-Sep-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
tcp: Add CTLFLAG_VNET flag to some sysctls
The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET flag
tcp: Add CTLFLAG_VNET flag to some sysctls
The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET flag to them since they are per-vnet sysctls.
This change does not have any impact on reading the two sysctls, but `sysctl -ANV net.inet.tcp.hostcache` will report them correctly.
Reviewed by: tuexen, #transport, #network MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52693
show more ...
|
| #
33ceb31e
|
| 24-Sep-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
tcp: Fix expiring and purging hostcache entries of vnet jails
A jailed process, `sysctl -j foo` or `jexec foo sysctl`, do not have privilege to write to non-vnet sysctls but only to those marked as
tcp: Fix expiring and purging hostcache entries of vnet jails
A jailed process, `sysctl -j foo` or `jexec foo sysctl`, do not have privilege to write to non-vnet sysctls but only to those marked as jail writable, aka sysctls those marked with CTLFLAG_VNET flag.
Without this change we will get EPERM when trying to expire and purge hostcache entries of vnet jails via the net.inet.tcp.hostcache.purgenow sysctl. Fix that by adding a CTLFLAG_VNET flag.
Reviewed by: tuexen, #transport, #network Fixes: 264563806496 Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire ... MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52692
show more ...
|
| #
b80c06cc
|
| 21-Nov-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: use const argument in the TCP hostcache KPI
The hostcache can't modify tcpcb, inpcb or connection info.
|
| #
09000cc1
|
| 21-Nov-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: mechanically rename hostcache metrics structure fields
Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and is an artifact from the 90-ies, when TCP caching was embedded in
tcp: mechanically rename hostcache metrics structure fields
Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and is an artifact from the 90-ies, when TCP caching was embedded into the routing table. The rename should have happened back in 97d8d152c28bb.
No functional change. Done with sed(1) command:
s/rmx_(mtu|ssthresh|rtt|rttvar|cwnd|sendpipe|recvpipe|granularity|expire|q|hits|updates)/hc_\1/g
show more ...
|
| #
b6b4ac2f
|
| 07-May-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: remove unnecessary socketvar.h
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
b4aa9cb2
|
| 30-Nov-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
tcp(4): Fix a typo in a sysctl description
- s/entires/entries/
MFC after: 3 days
|
| #
d554522f
|
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: use SMR for lookups, mutex(9) for updates.
In certain cases, e.g. a SYN-flood from a limited set of hosts, the TCP hostcache becomes the main contention point. To solve that, this cha
tcp_hostcache: use SMR for lookups, mutex(9) for updates.
In certain cases, e.g. a SYN-flood from a limited set of hosts, the TCP hostcache becomes the main contention point. To solve that, this change introduces lockless lookups on the hostcache.
The cache remains a hash, however buckets are now CK_SLIST. For updates a bucket mutex is obtained, for read an SMR section is entered.
Reviewed by: markj, rscheff Differential revision: https://reviews.freebsd.org/D29729
show more ...
|
| #
faa9ad8a
|
| 20-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Fix off-by-one error in KASSERT from 02f26e98c7f4.
|
| #
1a7fe55a
|
| 09-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: make THC_LOCK/UNLOCK macros to work with hash head pointer. Not a functional change.
|
| #
4f49e338
|
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: style(9)
Reviewed by: rscheff
|
| #
7c71f3bd
|
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: remove extraneous check. All paths leading here already checked this setting.
Reviewed by: rscheff
|
| #
0c25bf7e
|
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: implement tcp_hc_updatemtu() via tcp_hc_update. Locking changes are planned here, and without this change too much copy-and-paste would be between these two functions.
Reviewed by: rs
tcp_hostcache: implement tcp_hc_updatemtu() via tcp_hc_update. Locking changes are planned here, and without this change too much copy-and-paste would be between these two functions.
Reviewed by: rscheff
show more ...
|
| #
b878ec02
|
| 08-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Use jenkins_hash32() in hostcache
As other parts of the base tcp stack (eg. tcp fastopen) already use jenkins_hash32, and the properties appear reasonably good, switching to use that.
Reviewed
tcp: Use jenkins_hash32() in hostcache
As other parts of the base tcp stack (eg. tcp fastopen) already use jenkins_hash32, and the properties appear reasonably good, switching to use that.
Reviewed By: tuexen, #transport, ae MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29515
show more ...
|
| #
373ffc62
|
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache.c: remove unneeded includes.
Reviewed by: rscheff
|
| #
29acb543
|
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: add bool argument for tcp_hc_lookup() to tell are we looking to only read from the result, or to update it as well. For now doesn't affect locking, but allows to push stats and expire
tcp_hostcache: add bool argument for tcp_hc_lookup() to tell are we looking to only read from the result, or to update it as well. For now doesn't affect locking, but allows to push stats and expire update into single place.
Reviewed by: rscheff
show more ...
|
| #
489bde57
|
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: hide rmx_hits/rmx_updates under ifdef.
They have little value unless you do some profiling investigations, but they are performance bottleneck.
Reviewed by: rscheff
|
| #
2cca4c0e
|
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove tcp_hostcache.h. Everything is private.
Reviewed by: rscheff
|
| #
a04906f0
|
| 02-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
fix typo in 38ea2bd0698e
|
| #
38ea2bd0
|
| 02-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
Use sbuf_drain unconditionally
After making sbuf_drain safe for external use, there is no need to protect the call.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Dif
Use sbuf_drain unconditionally
After making sbuf_drain safe for external use, there is no need to protect the call.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29545
show more ...
|
| #
9aef4e7c
|
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Shouldn't drain empty sbuf
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29524
|
| #
02f26e98
|
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Add hash histogram output and validate bucket length accounting
Provide a histogram output to check, if the hashsize or bucketlimit could be optimized. Also add some basic sanity checks around
tcp: Add hash histogram output and validate bucket length accounting
Provide a histogram output to check, if the hashsize or bucketlimit could be optimized. Also add some basic sanity checks around the accounting of the hash utilization.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29506
show more ...
|
| #
529a2a0f
|
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: For hostcache performance, use atomics instead of counters
As accessing the tcp hostcache happens frequently on some classes of servers, it was recommended to use atomic_add/subtract rather tha
tcp: For hostcache performance, use atomics instead of counters
As accessing the tcp hostcache happens frequently on some classes of servers, it was recommended to use atomic_add/subtract rather than (per-CPU distributed) counters, which have to be summed up at high cost to cache efficiency.
PR: 254333 MFC after: 2 weeks Sponsored by: NetApp, Inc. Reviewed By: #transport, tuexen, jtl Differential Revision: https://reviews.freebsd.org/D29522
show more ...
|
| #
95e56d31
|
| 31-Mar-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t
Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global v
tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t
Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global variable by using counter(9).
PR: 254333 Reviewed By: tuexen, #transport MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29510
show more ...
|