qlog, AckFrame, and ack_delay

Damien Neil <dneil@google.com> Thu, 09 November 2023 21:44 UTC

Return-Path: <dneil@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 EEDC4C17C890 for <quic@ietfa.amsl.com>; Thu, 9 Nov 2023 13:44:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -22.607
X-Spam-Level:
X-Spam-Status: No, score=-22.607 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n8OUIF_J0RB5 for <quic@ietfa.amsl.com>; Thu, 9 Nov 2023 13:43:58 -0800 (PST)
Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D36F0C17C509 for <quic@ietf.org>; Thu, 9 Nov 2023 13:43:58 -0800 (PST)
Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53db360294fso2349085a12.3 for <quic@ietf.org>; Thu, 09 Nov 2023 13:43:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1699566237; x=1700171037; darn=ietf.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=w/mpYFaTeIWVshFNbaKkFyGxxpzOXe5CztoIs6KGzfk=; b=OrI76CL2tr9NQchvl5s11OsnNsIhSn9ISmL//IQJNyN9Wo+wq3CprVxAvCBrvoBcuG /WUWwbcNwX4mjrrVjN2uMjjua0Yi4ACHHU/BcjSnAEO2pYYSFo9wgmdabFy+d7Aaq4+z 1qL7NucfNLH5OoQ2NQ7UK/do2ICrYzovoLZG2NajPLRljiFsgXu7U87gFxR9O+EDjz3u VUwbblY/T2HX3fp8qbi9CuPKyhZ1ollZnY6NYWMqowzYeiv1l088TIMNhQ+HcQf+Regi SkW3WO886cHcCD9NBwn5iQ64rfrorlTd9LwrwevCfi9Eu0vEKy5GKI1a6WicZov2Xm7i A6mA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699566237; x=1700171037; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=w/mpYFaTeIWVshFNbaKkFyGxxpzOXe5CztoIs6KGzfk=; b=Xp7pykpIVFNkgmSB4JN1LluSwnTJsBEsnJ1NoBondbhyWnvFXdbtx/Xqdf/PItg+Y/ 9C1ZO52xftFLd6ZoNj7mxA049GJ2JfCyVY+6FZP+E3D+EsC06Msg94p1U4PFoUKEd29M O9p3pSrq2BhPHZ7EatxCFXh379/G1mx7ULQBM55Wfj2JX8AbbMFg8AyqUDggc3XmHiyW D0Qrmjez8n7Zex3gFUAgWZueudU7gn3kIZY9Z4AaJTAekP47PxSPD3cx4yJ9f+JzvN0U LYqstx0MVHF8fDzjKkMwrfE97uVOObpMCWSrYZ93AM1uP2ebVYQUkfTQ3qvglIFOUIDD J9Fw==
X-Gm-Message-State: AOJu0Yyi33pzeHYyZyk785skD7pQC985TfydNh3q5/9g4V+Jazg2Nru8 00xE1VyiZcSRFvYExWYJs2rSEl+p6a0raf4OxIloNKCBliBqm8qyk8sAOQ==
X-Google-Smtp-Source: AGHT+IGe21JcaUcQu7agaKQWaWOLBD+Ghg+s0jPX8oy6xqdgL5BO9gJ/AcyMhxbzj0WV8j8f1EKZr3crThqwEuky++Y=
X-Received: by 2002:a17:907:9620:b0:9d3:e48f:30d3 with SMTP id gb32-20020a170907962000b009d3e48f30d3mr5845697ejc.31.1699566236853; Thu, 09 Nov 2023 13:43:56 -0800 (PST)
MIME-Version: 1.0
From: Damien Neil <dneil@google.com>
Date: Thu, 09 Nov 2023 13:43:43 -0800
Message-ID: <CAGgfL4tDDb7jZ-e-_STZ8SFPESyuPtqfFesQZOjzX_5i0XpAdw@mail.gmail.com>
Subject: qlog, AckFrame, and ack_delay
To: quic@ietf.org
Content-Type: multipart/alternative; boundary="000000000000d267b10609bf195f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/db1szAx2ASF-GHaXTaPoNTlBqsw>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.39
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, 09 Nov 2023 21:44:01 -0000

The qlog AckFrame type includes the ack delay as a float32 number of
milliseconds:

AckFrame = {
    frame_type: "ack"

    ; in ms
    ? ack_delay: float32
    ; ...
}

https://www.ietf.org/archive/id/draft-ietf-quic-qlog-quic-events-06.html#section-8.12.3

Given a serialized ack frame, determining the delay as a duration requires
knowing the ack_delay_exponent. In some cases, the logging endpoint may not
have this available (if receiving an ack before transport parameters have
been received). Even when available, it may not be easily accessible at the
point of logging. For example, in my own implementation, I'd like to be
able to convert a packet payload to a series of qlog event frames without
needing to reference persistent connection state.

I think there should be an alternative to log the raw value of the ACK
Delay field:

AckFrame = {
    frame_type: "ack"

    ; in ms
    ? ack_delay: float32

    ; integer value of the ACK Delay field, not scaled by the
ack_delay_exponent
    ? unscaled_ack_delay: uint64

    ; ...
}

- Damien