Re: too much call to SetLossDetectionTimer()?

Ian Swett <ianswett@google.com> Thu, 10 September 2020 15:26 UTC

Return-Path: <ianswett@google.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F217D3A08B6 for <quic@ietfa.amsl.com>; Thu, 10 Sep 2020 08:26:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.6
X-Spam-Level:
X-Spam-Status: No, score=-17.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FE6VWaZ_xJAM for <quic@ietfa.amsl.com>; Thu, 10 Sep 2020 08:26:43 -0700 (PDT)
Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B39E93A09F5 for <quic@ietf.org>; Thu, 10 Sep 2020 08:26:43 -0700 (PDT)
Received: by mail-yb1-xb36.google.com with SMTP id e11so1230802ybk.1 for <quic@ietf.org>; Thu, 10 Sep 2020 08:26:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DVJDWo9kQIECG7EoShlvqoZyvRNkTUqCCWcjiLMgoIQ=; b=U4piEFiaOjaWv5//InIA5+x/RZXfRdkn/4umV5Ncyz2o4xpddt9XQzirjgTqTYJwrq L8RuQUPo7WOI17HJ+Tx7EPUFBCib0TaGQvOjZNYgr7yQMjZmSkBgNdOACrYX/4aPEDDX t5ivzqTx+B7f53oR9VvE6/sXFicgtXBiCjGEidky0fBWwcA15YjDkubzPQuy9x8EoiZS ngXZGhdgrjkTkl4/F9Ny10ctnQqDn/8Opljhl86Iin2Gej3ONN/atCH+UL6nuYtDvl6u Hh9YiOeBHQAy+qqHz8zTuh0+dRhMNVAVaytzk8R90/nhEPG6w8eY39DloTtDi4oKh0Zf DR6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DVJDWo9kQIECG7EoShlvqoZyvRNkTUqCCWcjiLMgoIQ=; b=Rtq+dglYvFzLoKf+oaI4BUTy6kxyXR1XmWEP5Attzemcc54DN5fsKP0hXV/l4Uujbs JaGTH9jTykREE5A0tq0bF2WZQG5iU4U1xrjVOeuu76vhgpQRAWxOecljaQHAargGOJ6U Z1qEiFgUoDPDbLPfJ0x3pr+IkFR1IYYQaE3YoBGZm5DanrS+fGaFvrIyL0iZZ/ovJuD2 9TmrYO2xO2U2nSnL2ZbUKgNtVlk7JlHCXUkFI9WfM+VRSZkMD5TVC3zwpFsPszeN6qTj Cy0izmojGYrcqY4ATxn1cYGECnl0cHurTO7X7DVnD913KPQXRY5yKkefYo6PF8z5js5c 27xA==
X-Gm-Message-State: AOAM532WVmJ7BmktdZaJ1Bq9lEi4kB+oRaIUFoX8nMHTnnONAgY6XXn8 8ZCf/ipL8uU2Ybq42XvOhECHn7+3eCpWraOEv5qTfN0Spi4=
X-Google-Smtp-Source: ABdhPJxK/SA7bMKeGFi9H3b+4zJuvq3KPjBn+SAvjoQii6AEHRRcksuOEjdYJY/nfnDznBk3ZlG5dSQkcye0ME0kbMM=
X-Received: by 2002:a25:3185:: with SMTP id x127mr13968119ybx.77.1599751602725; Thu, 10 Sep 2020 08:26:42 -0700 (PDT)
MIME-Version: 1.0
References: <CADf7dJgAi4dcRDUZgEm5S8tXHBJ-95LxZx-=wrUbrHP1VdhWbQ@mail.gmail.com>
In-Reply-To: <CADf7dJgAi4dcRDUZgEm5S8tXHBJ-95LxZx-=wrUbrHP1VdhWbQ@mail.gmail.com>
From: Ian Swett <ianswett@google.com>
Date: Thu, 10 Sep 2020 11:26:31 -0400
Message-ID: <CAKcm_gPBXtDhSyw3N80YJTAEwRs4f-8wfnEFfZRjVWcUjXuvjQ@mail.gmail.com>
Subject: Re: too much call to SetLossDetectionTimer()?
To: newbie quic <quicnewbie@gmail.com>
Cc: IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000002ddb605aef73288"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/gREfO5FvSCWY_JqBe_vVJAGAcrY>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Sep 2020 15:26:45 -0000

Good point, this is typically unnecessary.  However, I think it also may be
clearer to call it here than not?  Alternatively, we could add a comment
and an assert.

On Thu, Sep 10, 2020 at 10:10 AM newbie quic <quicnewbie@gmail.com> wrote:

> Hello,
>
> I have a question about the pseudo-code found in
> draft-ietf-quic-recovery-30.txt.
>
> Especially the part where at least one ack-eliciting packet is sent from
> OnLossDetectionTimeout(). In every cases, we finally set the loss
> detection/PTO timer calling SetLossDetectionTimer():
>
>      if (bytes_in_flight > 0):
>          // PTO. Send new data if available, else retransmit old data.
>          // If neither is available, send a single PING frame.
>          _, pn_space = GetPtoTimeAndSpace()
>         SendOneOrTwoAckElicitingPackets(pn_space)
>      else:
>          assert(!PeerCompletedAddressValidation())
>          // Client sends an anti-deadlock packet: Initial is padded
>          // to earn more anti-amplification credit,
>          // a Handshake packet proves address ownership.
>          if (has Handshake keys):
>               SendOneAckElicitingHandshakePacket()
>          else:
>               SendOneAckElicitingPaddedInitialPacket()
>
>      pto_count++
>      SetLossDetectionTimer()
>
> Then as a sent ack-eliciting packet must be considered as in flight,
> OnSentPacket() will also make a call to SetLossDetectionTimer().
>
>
> Regards.
>