tcp: use tcp_fixed_maxseg instead of tcp_maxseg in cc modules

tcp_fixed_maxseg() is the streamlined calculation of typical
tcp options and more suitable for heavy use in the congestion
control modules on every received packet.

No external functional change.

Reviewed By:           tuexen, #transport
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43779
This commit is contained in:
Richard Scheffenegger
2024-02-08 17:56:29 +01:00
parent 0bd8eb3e08
commit 1adab814e8
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -440,7 +440,7 @@ newreno_cc_after_idle(struct cc_var *ccv)
* maximum of the former ssthresh or 3/4 of the old cwnd, to
* not exit slow-start prematurely.
*/
rw = tcp_compute_initwnd(tcp_maxseg(ccv->ccvc.tcp));
rw = tcp_compute_initwnd(tcp_fixed_maxseg(ccv->ccvc.tcp));
CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh),
CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2));
+1 -1
View File
@@ -423,7 +423,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type)
u_int mss;
cubic_data = ccv->cc_data;
mss = tcp_maxseg(ccv->ccvc.tcp);
mss = tcp_fixed_maxseg(ccv->ccvc.tcp);
switch (type) {
case CC_NDUPACK:
+1 -1
View File
@@ -245,7 +245,7 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
if (CCV(ccv, t_flags2) & TF2_ECN_PERMIT) {
dctcp_data = ccv->cc_data;
cwin = CCV(ccv, snd_cwnd);
mss = tcp_maxseg(ccv->ccvc.tcp);
mss = tcp_fixed_maxseg(ccv->ccvc.tcp);
switch (type) {
case CC_NDUPACK:
+1 -1
View File
@@ -284,7 +284,7 @@ htcp_cong_signal(struct cc_var *ccv, uint32_t type)
u_int mss;
htcp_data = ccv->cc_data;
mss = tcp_maxseg(ccv->ccvc.tcp);
mss = tcp_fixed_maxseg(ccv->ccvc.tcp);
switch (type) {
case CC_NDUPACK: