aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Scheffenegger <rscheff@FreeBSD.org>2020-05-21 21:42:49 +0000
committerRichard Scheffenegger <rscheff@FreeBSD.org>2020-05-21 21:42:49 +0000
commite68cde59c392635d615971c61a1fa26abcc66754 (patch)
treebc4bb9f9af8e24127a6e0ba6c7944381c30aa75e
parentaf2fb894c90b874b565bba7049205d0a283ac140 (diff)
downloadsrc-e68cde59c392635d615971c61a1fa26abcc66754.tar.gz
src-e68cde59c392635d615971c61a1fa26abcc66754.zip
DCTCP: update alpha only once after loss recovery.
In mixed ECN marking and loss scenarios it was found, that the alpha value of DCTCP is updated two times. The second update happens with freshly initialized counters indicating to ECN loss. Overall this leads to alpha not adjusting as quickly as expected to ECN markings, and therefore lead to excessive loss. Reported by: Cheng Cui Reviewed by: chengc_netapp.com, rrs, tuexen (mentor) Approved by: tuexen (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D24817
Notes
Notes: svn path=/head/; revision=361348
-rw-r--r--sys/netinet/cc/cc_dctcp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c
index ad4bda5fc297..f31a9f40be66 100644
--- a/sys/netinet/cc/cc_dctcp.c
+++ b/sys/netinet/cc/cc_dctcp.c
@@ -154,10 +154,8 @@ dctcp_ack_received(struct cc_var *ccv, uint16_t type)
* Update the fraction of marked bytes at the end of
* current window size.
*/
- if ((IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
- SEQ_GEQ(ccv->curack, CCV(ccv, snd_recover))) ||
- (!IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
- SEQ_GT(ccv->curack, dctcp_data->save_sndnxt)))
+ if (!IN_FASTRECOVERY(CCV(ccv, t_flags)) &&
+ SEQ_GT(ccv->curack, dctcp_data->save_sndnxt))
dctcp_update_alpha(ccv);
} else
newreno_cc_algo.ack_received(ccv, type);