#
b6c137de |
| 17-Sep-2024 |
Cheng Cui <cc@FreeBSD.org> |
tcp cc: re-organize newreno functions into parts that can be re-used
Reviewed by: rscheff, tuexen Differential Revision: https://reviews.freebsd.org/D46046
|
Revision tags: release/13.4.0 |
|
#
8cc528c6 |
| 14-Aug-2024 |
Cheng Cui <cc@FreeBSD.org> |
tcp cc: clean up some un-used cc_var flags
Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D46299
|
#
00d3b744 |
| 28-Jul-2024 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp cc: remove non-working sctp support
As suggested by lstewart, remove the non-working SCTP support in the TCP congestion control modules. SCTP has a similar functionality (although not using kern
tcp cc: remove non-working sctp support
As suggested by lstewart, remove the non-working SCTP support in the TCP congestion control modules. SCTP has a similar functionality (although not using kernel loadable modules), on which the TCP stuff was built on, but the integration was never done. No functional change intended.
Reviewed by: Peter Lei, cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46142
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
5e248c23 |
| 24-Feb-2024 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: retain some CC signals outside of kernel scope
Summary: fix build error after f74352fbcf15341accaf5a92240871f98323215d
Reviewers: #transport!
Subscribers: imp, melifaro, glebius
Differential
tcp: retain some CC signals outside of kernel scope
Summary: fix build error after f74352fbcf15341accaf5a92240871f98323215d
Reviewers: #transport!
Subscribers: imp, melifaro, glebius
Differential Revision: https://reviews.freebsd.org/D44066
show more ...
|
#
f74352fb |
| 24-Feb-2024 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: use enum for all congestion control signals
Facilitate easier troubleshooting by enumerating all congestion control signals. Typecast the enum to int, when a congestion control module uses priv
tcp: use enum for all congestion control signals
Facilitate easier troubleshooting by enumerating all congestion control signals. Typecast the enum to int, when a congestion control module uses private signals.
No external change.
Reviewed By: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43838
show more ...
|
Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0 |
|
#
e68b3792 |
| 07-Dec-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: embed inpcb into tcpcb
For the TCP protocol inpcb storage specify allocation size that would provide space to most of the data a TCP connection needs, embedding into struct tcpcb several struct
tcp: embed inpcb into tcpcb
For the TCP protocol inpcb storage specify allocation size that would provide space to most of the data a TCP connection needs, embedding into struct tcpcb several structures, that previously were allocated separately.
The most import one is the inpcb itself. With embedding we can provide strong guarantee that with a valid TCP inpcb the tcpcb is always valid and vice versa. Also we reduce number of allocs/frees per connection. The embedded inpcb is placed in the beginning of the struct tcpcb, since in_pcballoc() requires that. However, later we may want to move it around for cache line efficiency, and this can be done with a little effort. The new intotcpcb() macro is ready for such move.
The congestion algorithm data, the TCP timers and osd(9) data are also embedded into tcpcb, and temprorary struct tcpcb_mem goes away. There was no extra allocation here, but we went through extra pointer every time we accessed this data.
One interesting side effect is that now TCP data is allocated from SMR-protected zone. Potentially this allows the TCP stacks or other TCP related modules to utilize that for their own synchronization.
Large part of the change was done with sed script:
s/tp->ccv->/tp->t_ccv./g s/tp->ccv/\&tp->t_ccv/g s/tp->cc_algo/tp->t_cc/g s/tp->t_timers->tt_/tp->tt_/g s/CCV\(ccv, osd\)/\&CCV(ccv, t_osd)/g
Dependency side effect is that code that needs to know struct tcpcb should also know struct inpcb, that added several <netinet/in_pcb.h>.
Differential revision: https://reviews.freebsd.org/D37127
show more ...
|
Revision tags: release/12.4.0 |
|
#
ea6d0de2 |
| 13-Sep-2022 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Make all references to CUBIC uppercase
Consistently refer to the CUBIC congestion control mechanism in uppercase throughout all comments.
No functional change.
Reviewed By: #transport, tuexen
tcp: Make all references to CUBIC uppercase
Consistently refer to the CUBIC congestion control mechanism in uppercase throughout all comments.
No functional change.
Reviewed By: #transport, tuexen, mav, guest-ccui, emaste Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36547
show more ...
|
Revision tags: release/13.1.0 |
|
#
ea9017fb |
| 21-Feb-2022 |
Randall Stewart <rrs@FreeBSD.org> |
tcp: Congestion control move to using reference counting.
In the transport call on 12/3 Gleb asked to move the CC modules towards using reference counting to prevent folks from unloading a module in
tcp: Congestion control move to using reference counting.
In the transport call on 12/3 Gleb asked to move the CC modules towards using reference counting to prevent folks from unloading a module in use. It was also agreed that Michael would do a user space utility like tcp_drop that could be used to move all connections that are using a specific CC to some other CC.
This is the half I committed to doing, making it so that we maintain a refcount on a cc module every time a pcb refers to it and decrementing that every time a pcb no longer uses a cc module. This also helps us simplify the whole unloading process by getting rid of tcp_ccunload() which munged through all the tcb's. Instead we mark a module as being removed and prevent further references to it. We also make sure that if a module is marked as being removed it cannot be made as the default and also the opposite of that, if its a default it fails and does not mark it as being removed.
Reviewed by: Michael Tuexen, Gleb Smirnoff Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D33249
show more ...
|
#
a9696510 |
| 07-Feb-2022 |
Randall Stewart <rrs@FreeBSD.org> |
tcp: Add hystart++ to our cubic implementation.
As promised to the transport call on 11/4/22 here is an implementation of hystart++ for cubic. It also cleans up the tcp_congestion function to have a
tcp: Add hystart++ to our cubic implementation.
As promised to the transport call on 11/4/22 here is an implementation of hystart++ for cubic. It also cleans up the tcp_congestion function to have a better name. Common variables are moved into the general cc.h structure so that both cubic and newreno can use them for hystart++
Reviewed by: Michael Tuexen, Richard Scheffenegger Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D33035
show more ...
|
Revision tags: release/12.3.0 |
|
#
b8d60729 |
| 11-Nov-2021 |
Randall Stewart <rrs@FreeBSD.org> |
tcp: Congestion control cleanup.
NOTE: HEADS UP read the note below if your kernel config is not including GENERIC!!
This patch does a bit of cleanup on TCP congestion control modules. There were s
tcp: Congestion control cleanup.
NOTE: HEADS UP read the note below if your kernel config is not including GENERIC!!
This patch does a bit of cleanup on TCP congestion control modules. There were some rather interesting surprises that one could get i.e. where you use a socket option to change from one CC (say cc_cubic) to another CC (say cc_vegas) and you could in theory get a memory failure and end up on cc_newreno. This is not what one would expect. The new code fixes this by requiring a cc_data_sz() function so we can malloc with M_WAITOK and pass in to the init function preallocated memory. The CC init is expected in this case *not* to fail but if it does and a module does break the "no fail with memory given" contract we do fall back to the CC that was in place at the time.
This also fixes up a set of common newreno utilities that can be shared amongst other CC modules instead of the other CC modules reaching into newreno and executing what they think is a "common and understood" function. Lets put these functions in cc.c and that way we have a common place that is easily findable by future developers or bug fixers. This also allows newreno to evolve and grow support for its features i.e. ABE and HYSTART++ without having to dance through hoops for other CC modules, instead both newreno and the other modules just call into the common functions if they desire that behavior or roll there own if that makes more sense.
Note: This commit changes the kernel configuration!! If you are not using GENERIC in some form you must add a CC module option (one of CC_NEWRENO, CC_VEGAS, CC_CUBIC, CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than one defined as well if you desire. Note that if you create a kernel configuration that does not define a congestion control module and includes INET or INET6 the kernel compile will break. Also you need to define a default, generic adds 'options CC_DEFAULT=\"newreno\" but you can specify any string that represents the name of the CC module (same names that show up in the CC module list under net.inet.tcp.cc). If you fail to add the options CC_DEFAULT in your kernel configuration the kernel build will also break.
Reviewed by: Michael Tuexen Sponsored by: Netflix Inc. RELNOTES:YES Differential Revision: https://reviews.freebsd.org/D32693
show more ...
|
#
4e4c84f8 |
| 22-Oct-2021 |
Randall Stewart <rrs@FreeBSD.org> |
tcp: Add hystart-plus to cc_newreno and rack.
TCP Hystart draft version -03: https://datatracker.ietf.org/doc/html/draft-ietf-tcpm-hystartplusplus
Is a new version of hystart that allows one to car
tcp: Add hystart-plus to cc_newreno and rack.
TCP Hystart draft version -03: https://datatracker.ietf.org/doc/html/draft-ietf-tcpm-hystartplusplus
Is a new version of hystart that allows one to carefully exit slow start if the RTT spikes too much. The newer version has a slower-slow-start so to speak that then kicks in for five round trips. To see if you exited too early, if not into congestion avoidance. This commit will add that feature to our newreno CC and add the needed bits in rack to be able to enable it.
Reviewed by: tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D32373
show more ...
|
#
5d8fd932 |
| 06-May-2021 |
Randall Stewart <rrs@FreeBSD.org> |
This brings into sync FreeBSD with the netflix versions of rack and bbr. This fixes several breakages (panics) since the tcp_lro code was committed that have been reported. Quite a few new features a
This brings into sync FreeBSD with the netflix versions of rack and bbr. This fixes several breakages (panics) since the tcp_lro code was committed that have been reported. Quite a few new features are now in rack (prefecting of DGP -- Dynamic Goodput Pacing among the largest). There is also support for ack-war prevention. Documents comming soon on rack..
Sponsored by: Netflix Reviewed by: rscheff, mtuexen Differential Revision: https://reviews.freebsd.org/D30036
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
e74e64a1 |
| 10-Sep-2020 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
cc_mod: remove unused CCF_DELACK definition
During the DCTCP improvements, use of CCF_DELACK was removed. This change is just to rename the unused flag bit to prevent use of it, without also re-impl
cc_mod: remove unused CCF_DELACK definition
During the DCTCP improvements, use of CCF_DELACK was removed. This change is just to rename the unused flag bit to prevent use of it, without also re-implementing the tcp_input and tcp_output interfaces.
No functional change.
Reviewed by: chengc_netapp.com, tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D26181
show more ...
|
Revision tags: release/11.4.0 |
|
#
adc56f5a |
| 02-Dec-2019 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Make use of the stats(3) framework in the TCP stack.
This makes it possible to retrieve per-connection statistical information such as the receive window size, RTT, or goodput, using a newly added T
Make use of the stats(3) framework in the TCP stack.
This makes it possible to retrieve per-connection statistical information such as the receive window size, RTT, or goodput, using a newly added TCP_STATS getsockopt(3) option, and extract them using the stats_voistat_fetch(3) API.
See the net/tcprtt port for an example consumer of this API.
Compared to the existing TCP_INFO system, the main differences are that this mechanism is easy to extend without breaking ABI, and provides statistical information instead of raw "snapshots" of values at a given point in time. stats(3) is more generic and can be used in both userland and the kernel.
Reviewed by: thj Tested by: thj Obtained from: Netflix Relnotes: yes Sponsored by: Klara Inc, Netflix Differential Revision: https://reviews.freebsd.org/D20655
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
51e712f8 |
| 15-Dec-2018 |
Hiren Panchasara <hiren@FreeBSD.org> |
Revert r331567 CC Cubic: fix underflow for cubic_cwnd()
This change is causing TCP connections using cubic to hang. Need to dig more to find exact cause and fix it.
Reported by: tj at mrsk dot me,
Revert r331567 CC Cubic: fix underflow for cubic_cwnd()
This change is causing TCP connections using cubic to hang. Need to dig more to find exact cause and fix it.
Reported by: tj at mrsk dot me, Matt Garber (via twitter) Discussed with: sbruno (previously), allanjude, cperciva MFC after: 3 days
show more ...
|
#
67350cb5 |
| 09-Dec-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340918 through r341763.
|
Revision tags: release/12.0.0 |
|
#
c8b53ced |
| 30-Nov-2018 |
Michael Tuexen <tuexen@FreeBSD.org> |
Limit option_len for the TCP_CCALGOOPT.
Limiting the length to 2048 bytes seems to be acceptable, since the values used right now are using 8 bytes.
Reviewed by: glebius, bz, rrs MFC after: 3 day
Limit option_len for the TCP_CCALGOOPT.
Limiting the length to 2048 bytes seems to be acceptable, since the values used right now are using 8 bytes.
Reviewed by: glebius, bz, rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D18366
show more ...
|
Revision tags: release/11.2.0 |
|
#
e2041bfa |
| 26-Mar-2018 |
Sean Bruno <sbruno@FreeBSD.org> |
CC Cubic: fix underflow for cubic_cwnd()
Singed calculations in cubic_cwnd() can result in negative cwnd value which is then cast to an unsigned value. Values less than 1 mss are generally bad for o
CC Cubic: fix underflow for cubic_cwnd()
Singed calculations in cubic_cwnd() can result in negative cwnd value which is then cast to an unsigned value. Values less than 1 mss are generally bad for other parts of the code, also fixed.
Submitted by: Jason Eggleston <jason@eggnet.com> Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14141
show more ...
|
#
370efe5a |
| 19-Mar-2018 |
Lawrence Stewart <lstewart@FreeBSD.org> |
Add support for the experimental Internet-Draft "TCP Alternative Backoff with ECN (ABE)" proposal to the New Reno congestion control algorithm module. ABE reduces the amount of congestion window redu
Add support for the experimental Internet-Draft "TCP Alternative Backoff with ECN (ABE)" proposal to the New Reno congestion control algorithm module. ABE reduces the amount of congestion window reduction in response to ECN-signalled congestion relative to the loss-inferred congestion response.
More details about ABE can be found in the Internet-Draft: https://tools.ietf.org/html/draft-ietf-tcpm-alternativebackoff-ecn
The implementation introduces four new sysctls:
- net.inet.tcp.cc.abe defaults to 0 (disabled) and can be set to non-zero to enable ABE for ECN-enabled TCP connections.
- net.inet.tcp.cc.newreno.beta and net.inet.tcp.cc.newreno.beta_ecn set the multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to a loss-based or ECN-based congestion signal respectively. They default to the values specified in the draft i.e. beta=50 and beta_ecn=80.
- net.inet.tcp.cc.abe_frlossreduce defaults to 0 (disabled) and can be set to non-zero to enable the use of standard beta (50% by default) when repairing loss during an ECN-signalled congestion recovery episode. It enables a more conservative congestion response and is provided for the purposes of experimentation as a result of some discussion at IETF 100 in Singapore.
The values of beta and beta_ecn can also be set per-connection by way of the TCP_CCALGOOPT TCP-level socket option and the new CC_NEWRENO_BETA or CC_NEWRENO_BETA_ECN CC algo sub-options.
Submitted by: Tom Jones <tj@enoti.me> Tested by: Tom Jones <tj@enoti.me>, Grenville Armitage <garmitage@swin.edu.au> Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D11616
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
721fc9d8 |
| 16-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r312207 through r312308.
|
#
a61b4567 |
| 16-Jan-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r312305
|
#
1d64db52 |
| 15-Jan-2017 |
Conrad Meyer <cem@FreeBSD.org> |
Fix a variety of cosmetic typos and misspellings
No functional change.
PR: 216096, 216097, 216098, 216101, 216102, 216106, 216109, 216110 Reported by: Bulat <bltsrc at mail.ru> Sponsored by: Dell
Fix a variety of cosmetic typos and misspellings
No functional change.
PR: 216096, 216097, 216098, 216101, 216102, 216106, 216109, 216110 Reported by: Bulat <bltsrc at mail.ru> Sponsored by: Dell EMC Isilon
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
491cdc1b |
| 27-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r304700 through r304884.
|
#
ed04e0c3 |
| 25-Aug-2016 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r304815
|