Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2013 11:38:17 -0700
From:      Jinhua Cao <jinhuacao@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   3 dup ack causes cwnd go to 1 mss while sack is enabled
Message-ID:  <CAEGgCY9VGbfcyooieuoZewNBbXxgG2aHKx%2BH9B3RV=3wwv9a_w@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
At present, it seems 3 dup ack would cause cwnd go to 1 mss while sack
enabld (line 2525 in tcp_input as attached). Is this following rfc?

Thanks,
-Jason


2494 } else if (tp->t_dupacks == tcprexmtthresh) {2495 tcp_seq onxt =
tp->snd_nxt;24962497 /*2498 * If we're doing sack, check to2499 * see if
we're already in sack2500 * recovery. If we're not doing sack,2501 * check
to see if we're in newreno2502 * recovery.2503 */2504 if (tp->t_flags &
TF_SACK_PERMIT) {2505 if (IN_FASTRECOVERY(tp->t_flags)) {2506 tp->t_dupacks
= 0;2507 break;2508 }2509 } else {2510 if
(SEQ_LEQ(th->th_ack,2511tp->snd_recover)) {
2512 tp->t_dupacks = 0;2513 break;2514 }2515 }2516 /* Congestion signal
before ack. */2517 cc_cong_signal(tp, th,
CC_NDUPACK);2518cc_ack_received(tp, th, CC_DUPACK);
2519 tcp_timer_activate(tp, TT_REXMT, 0);2520 tp->t_rtttime = 0;2521 if
(tp->t_flags & TF_SACK_PERMIT) {2522
TCPSTAT_INC(2523tcps_sack_recovery_episode);
2524 tp->sack_newdata = tp->snd_nxt;2525 tp->snd_cwnd =
tp->t_maxseg;2526(void) tcp_output(tp);
2527 goto drop;2528 }2529 tp->snd_nxt = th->th_ack;2530 tp->snd_cwnd =
tp->t_maxseg;2531 if ((thflags & TH_FIN)
&&2532(TCPS_HAVERCVDFIN(tp->t_state) == 0)) {
2533 /* 2534 * If its a fin we need to process2535 * it to avoid a race
where both2536 * sides enter FIN-WAIT and send FIN|ACK2537 * at the same
time.2538 */2539 break;2540 }2541 (void)
tcp_output(tp);2542KASSERT(tp->snd_limited <= 2,
2543 ("%s: tp->snd_limited too big",2544 __func__));2545 tp->snd_cwnd =
tp->snd_ssthresh +2546 tp->t_maxseg *2547 (tp->t_dupacks - tp->snd_limited);
2548 if (SEQ_GT(onxt, tp->snd_nxt))2549 tp->snd_nxt = onxt;2550 goto drop;
2551 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEGgCY9VGbfcyooieuoZewNBbXxgG2aHKx%2BH9B3RV=3wwv9a_w>