From: Sepherosa Ziehau Date: Tue, 28 Aug 2012 07:10:58 +0000 (+0800) Subject: tcp/ncr: Avoid using magic number X-Git-Tag: v3.2.0~236 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/0983a903cd3d47af4e6a7fc92cf0d893f11fa63b tcp/ncr: Avoid using magic number --- diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 53e07f098b..2c9bdbcaa8 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -364,7 +364,7 @@ tcp_ncr_update_rxtthresh(struct tcpcb *tp) int old_rxtthresh = tp->t_rxtthresh; uint32_t ownd = tp->snd_max - tp->snd_una; - tp->t_rxtthresh = max(3, ((ownd / tp->t_maxseg) >> 1)); + tp->t_rxtthresh = max(tcprexmtthresh, ((ownd / tp->t_maxseg) >> 1)); if (tp->t_rxtthresh != old_rxtthresh) { tcp_sack_update_lostseq(&tp->scb, tp->snd_una, tp->t_maxseg, tp->t_rxtthresh);