From owner-freebsd-net@FreeBSD.ORG Wed Oct 2 18:38:18 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9B01771 for ; Wed, 2 Oct 2013 18:38:18 +0000 (UTC) (envelope-from jinhuacao@gmail.com) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [IPv6:2607:f8b0:400c:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 571A22FAA for ; Wed, 2 Oct 2013 18:38:18 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id c14so948490vea.10 for ; Wed, 02 Oct 2013 11:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6vav2Pkc2QVRl82ULm+K9NmP/oYC818613M42sYTADs=; b=imLqzwyZEvL9sUJitIRjqIm/u/ALjNKS6Yp3onsFDhoh6M514zYcm2IcYLFHP9tvCb piVN2J01H84UclOtQRuKV7DrkDfRf99zCbgzV0zGoNx7v0kZkHtyadmBDA/R3ZUCU3ZU U0MrKtL/mp0r3g7kedAohxa6vr0aYKbGwNDwOYevx3WmdTym67lg1ZJoyLBo5AW2XBwR tN34KvZfTtgHbaAGNnjdMK+PV17n30Hv2Cp6264RlnhnQILXj2YUMD3WuNG5vCHfsIZv Zz6JORqgbUoqzEb9QY4houWgzip2wpVSC59ItV2kYjF9ewC9Uj7xMGwKEEBIHh559tVH ZJdQ== MIME-Version: 1.0 X-Received: by 10.52.75.228 with SMTP id f4mr2666142vdw.6.1380739097370; Wed, 02 Oct 2013 11:38:17 -0700 (PDT) Received: by 10.221.39.68 with HTTP; Wed, 2 Oct 2013 11:38:17 -0700 (PDT) Date: Wed, 2 Oct 2013 11:38:17 -0700 Message-ID: Subject: 3 dup ack causes cwnd go to 1 mss while sack is enabled From: Jinhua Cao To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Oct 2013 18:38:18 -0000 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 }