tcp/ncr: Avoid using magic number
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 28 Aug 2012 07:10:58 +0000 (15:10 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 28 Aug 2012 07:10:58 +0000 (15:10 +0800)
sys/netinet/tcp_input.c

index 53e07f0..2c9bdbc 100644 (file)
@@ -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);