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:
+1
-1
@@ -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));
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user