<?xml version="1.0" encoding="US-ASCII"?>
<!--<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>-->
<!---?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>-->
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-custura-tsvwg-careful-resume-qlog-00"
     ipr="trust200902" consensus="true" submissionType="IETF">
    <!-- category values: std, bcp, info, exp, and historic
    ipr values: full3667, noModification3667, noDerivatives3667
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

    <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header
     - it is only necessary if the
full title is longer than 39 characters -->

    <title abbrev="Qlog for Careful Resume"> Quic Logging for Convergence of Congestion
    Control from Retained State</title>

    <author fullname="Ana Custura" initials="A" surname="Custura">
      <organization>University of Aberdeen</organization>
      <address>
        <postal>
          <street>Department of Engineering</street>
          <street>Fraser Noble Building</street>
          <city>Aberdeen</city>
          <code>AB24 3UE</code>
          <country>UK</country>
        </postal>
        <email>ana@erg.abdn.ac.uk</email>
      </address>
    </author>

    <author fullname="Godred Fairhurst" initials="G" surname="Fairhurst">
      <organization>University of Aberdeen</organization>
      <address>
        <postal>
          <street>Department of Engineering</street>
          <street>Fraser Noble Building</street>
          <city>Aberdeen</city>
          <code>AB24 3UE</code>
          <country>UK</country>
        </postal>
        <email>gorry@erg.abdn.ac.uk</email>
      </address>
    </author>

    <date year="2025" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
in the current day for you. If only the current year is specified, xml2rfc will fill
in the current day and month for you. If the year is not the current one, it is
necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
purpose of calculating the expiry date).  With drafts it is normally sufficient to
specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>Transport</area>

    <workgroup>Internet Engineering Task Force</workgroup>

     <!-- WG name at the upperleft corner of the doc,
     IETF is fine for individual submissions.
     If this element is not present, the default is "Network Working Group",
     which is used by the RFC Editor as a nod to the history of the IETF. -->

     <keyword>Transport, Congestion Control, QUIC</keyword>

    <!-- Keywords will be incorporated into HTML output
     files in a meta tag but they have no effect on text or nroff
     output. If you submit your draft to the RFC Editor, the
     keywords will be used for the search engine. -->

    <abstract>
      <t>This document specifies a logging format for a cautious method for
      Careful Resume when using the IETF quic transport protocol. It defines the logging format for qlog.</t>
    </abstract>
  </front>

<middle>
<section anchor="sec-introduction" title="Introduction">
    <t><xref target="I-D.ietf-tsvwg-careful-resume"></xref> defines a
    Congestion Control (CC) mechanism
    called Careful Resume, which is expected to
    reduce the time to complete a transfer
    when the transfer sends significantly more data than allowed by the
    Initial congestion Window (IW), and
    where the BDP of the path is also significantly
    more than the IW.
    It introduces an alternative mechanism to select initial CC parameters that
    seeks to more rapidly and safely grow the sending rate controlled by
    the congestion window (CWND). CC algorithms that are rate-based can make
    similar adjustments to their target sending rate.</t>
     
    <t>When used with the QUIC transport, Careful Resume provides transport services that resemble
    those that could be implemented in TCP, using methods such as TCP Control Block (TCB)
    <xref target="RFC9040"></xref> caching.</t>

</section> <!-- End of introduction and motivation -->

<section anchor="notation" title="Language, Notation and Terms">

    <t>This subsection provides a brief summary of key terms and the
    requirements language.</t>

    <section anchor="sec:req_language" title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
         "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
         "OPTIONAL" in this document are to be interpreted as described in
         BCP 14
         <xref target="RFC2119"/>
         <xref target="RFC8174"/>
         when, and only when, they appear in all
         capitals, as shown here.</t>
    </section>
         
    <section anchor="sec-terms_def" title="Notation and Terms">
        <t> The document uses language drawn
        from a range of IETF RFCs.
        The following terms are defined:
   <list>

             
             <t>Careful Resume (CR): The method specified in XXX </t>

        <t>CWND: The congestion window, or equivalent CC variable limiting
        the maximum sending rate;</t>
                         
        <t>current_rtt: A sample measurement of the current RTT;</t>

        <t>PipeSize: A measure of the validated available capacity based on the acknowledged data;</t>

            <t>saved_cwnd: The preserved capacity derived from observation of a
            previous connection (see <xref target="I-D.ietf-tsvwg-careful-resume"></xref>);</t>

            <t>saved_rtt: The preserved minimum RTT (see <xref target="I-D.ietf-tsvwg-careful-resume"></xref>).</t>

            <t>Unvalidated Packet: A packet sent when the CWND has been increased
            beyond the size normally permitted by the CC algorithm;
            if such a packet is acknowledged, it contributes to the PipeSize, but
            if congestion is detected, it triggers entry to the Safe Retreat Phase.</t>
     </list></t>
    </section> <!-- End of Notation: End of terms -->
</section><!-- End of Notation -->

<section anchor="sec-phase" title="The Phases of CC using Careful Resume">
    <t>Careful Resume<xref target="I-D.ietf-tsvwg-careful-resume"></xref> defines
        a series of phases that a
    congestion controller moves through as a connection
    uses the mechanism. The key phases are illustrated in Figure 1.
</t>

    <t>
<figure title="Key transitions between Phases in Careful Resume.">
<artwork align="left" name="" type="" alt=""><![CDATA[
     
Normal ...> Connect -> Reconnaissance --------------------> Normal
(Observing)              |                                    ^
                         v                                    |
                        Unvalidated --------------------------+
                         |      |                             |
                         |      +--> Validating --------------+
                         |               |                    |
                         |               |                    |
                         +---------------+--> Safe Retreat ---+
     
 ]]></artwork>
    </figure>
    </t>
    
    <t>
    Examples of these transitions between phases
    are provided in the annexe to <xref target="I-D.ietf-tsvwg-careful-resume"></xref>.</t>
     
    <!-- These subsections to match next section format -->
    
    <section title="Observing">
        
        <t>There are currnetly no qlog events associated with this phase.</t>

    </section> <!-- End of define Observing:-->
          
    <section anchor="sec-phase-rec-phase" title="Reconnaissance Phase">
        <t> A sender enters the Reconnaissance Phase after connection setup.
        In this phase, the CWND is initialised to the IW, and the sender transmits initial data.</t>
       
       <t>Reconnaissance Phase (Path confirmed):
        When a sender has confirmed the RTT and also has
            received an acknowledgement for the initial data without reported congestion,
            it MAY then enter the Unvalidated Phase.
            The associated qlog event is XXX.</t>
    </section> <!-- End of Reconnaissance Phase -->
     
    <section anchor="sec-phase-unv-phase" title="Unvalidated Phase">
        <t>The Unvalidated Phase is designed to enable the CWND
        to more rapidly get up to speed by using paced transmission of a tentatively increased CWND.</t>

        <t>Unvalidated Phase (Confirming the path on entry):
         If the current_rtt is not confirmed,
    the sender MUST enter the Normal Phase
          (see trigger
     rtt_not_validated in <xref target="sec-QLOG"></xref>).</t>
             
             <t>Unvalidated Phase (Receiving acknowledgement for an unvalidated packet):
             The sender enters the Validating Phase when an acknowledgement is
             received for the first packet number (or higher) that was sent in the Unvalidated Phase
             or greater than 1 RTT has passed in the Unvalidated Phase
         (see first_unvalidated_packet_acknowledged in
                 <xref target="sec-QLOG"></xref>).</t>
    </section> <!-- End of define Unvalidated Phase -->

    <section anchor="sec-phase-val-phase" title="Validating Phase">
        <t>The Validating Phase checks whether all packets
        sent in the Unvalidated Phase were received without inducing congestion.
        The CWND remains unvalidated and the sender typically remains in this phase for one RTT.</t>

            <t>Validating Phase (Congestion indication):
            If a sender determines that congestion was experienced
            (e.g., packet loss or ECN-CE marking), Careful Resume
            enters the Safe Retreat Phase
            (see trigger packet_loss and ECN_CE  in <xref target="sec-QLOG"></xref>).</t>

            <t>Validating Phase (Receiving acknowledgement of the unvalidated packets):
            The sender enters the Normal Phase when an acknowledgement is
            received for the last packet number (or higher)
            that was sent in the Unvalidated Phase
            (see last_unvalidated_packet_acknowledged in <xref target="sec-QLOG"></xref>).
            This indicates that the packets sent in the Unvalidated Phase were acknowledged
            without congestion.</t>

    </section> <!-- End of define Validating Phase -->


    <section anchor="sec-phase-ret-phase" title="Safe Retreat Phase">

        <t>This phase is entered when congestion is
        detected for an unvalidated packet.
        It drains the path of other unvalidated packets.
        (This trigger is the same as used by a QUIC sender to transition
        from Slow-Start to Recovery <xref target="RFC9002"></xref>.)</t>

            <t>Safe Retreat Phase (Acknowledgement of unvalidated packets):
            The sender enters the Normal Phase
            when the last packet (or a later packet) sent during the
            Unvalidated Phase has been acknowledged. On leaving
            the Safe Retreat Phase, the log is updated to exit_recovery, see <xref target="sec-QLOG"></xref>.)</t>
     
    </section> <!-- End of Safe Retreat Phase -->
            
</section> <!-- end of phases -->


<section anchor="sec-QLOG" title="QLOG support for QUIC">
    <t>This section provides definitions that enable a
    Careful Resume implementation
    to generate qlog events when using QUIC.
    It introduces an event to report the current phase of a sender,
    and an associated description.</t>
    
    <t>The event and data structure definitions in this section are
    expressed in the Concise Data Definition Language (CDDL)
    <xref target="RFC8610"></xref> and its
    extensions described in <xref target="I-D.ietf-quic-qlog-quic-events"></xref>.
    The current convention is to use long names for variables.
    For example, "CWND" is expanded as "congestion_window"
    and "saved_cwnd" is expanded as "saved_congestion_window".</t>
    
    <section title="The cr_phase Event">
        <!--<name>cr_phase</name>-->
        <t>Importance: Extra</t>

        <t>When the CC algorithm changes the Careful Resume Phase
        described in <xref target="sec-phase"></xref> of this specification.</t>
        <t>Definition:</t>

        <figure anchor="qlog-def">
             <!--     <name>cr_phase</name> -->
<sourcecode type="cddl"><![CDATA[
RecoveryCarefulResumePhaseUpdated = {
? old_phase: CarefulResumePhase,
new_phase: CarefulResumePhase,
state_data: CarefulResumeStateParameters,
? restored_data: CarefulResumeRestoredParameters,
? trigger:
        ; for the Unvalidated phase, when no unvalidated packets
        "congestion_window_limited" /
        ; for the Validating phase
        "first_unvalidated_packet_acknowledged" /
    ; for the Normal phase
    ; and no remaining unvalidated packets to be acknowledged
        "last_unvalidated_packet_acknowledged" /
        ; for the Normal phase, when CR not allowed
        "rtt_not_validated" /
        ; for the Normal phase,
        ; when sending fewer unvalidated packets than CWND permits
        "rate_limited" /
    ; for the Safe Retreat phase, when loss detected
        "packet_loss" /
    ; for the Safe Retreat phase,
    ; when ECN congestion experienced reported
        "ECN_CE" /
        ; for the Normal phase 1 RTT after a congestion event
        "exit_recovery"
}

CarefulResumePhase =
        "reconnaissance" /
        "unvalidated" /
        "validating" /
        "normal" /
        "safe_retreat"

CarefulResumeStateParameters = {
pipesize: uint,
first_unvalidated_packet: uint,
last_unvalidated_packet: uint,
? congestion_window: uint,
? ssthresh: uint
}

CarefulResumeRestoredParameters = {
saved_congestion_window: uint,
saved_rtt: float32
}
]]></sourcecode>
        </figure>
   
    </section> <!-- END OF QLOG SUBSECTION -->
</section> <!--  End of Qlog -->

<section anchor="sec-acknowledgments" title="Acknowledgments">
    <t>The authors would like to thank Robin Marx and Lucar Purdue for
    their fruitful comments in developing this specification.</t>
</section>

<section anchor="sec-IANA" title="IANA Considerations">
    <t>No current parameters are required to be registered by IANA.</t>
</section>

<section anchor="sec-security" title="Security Considerations">
    <t>This document does not exhibit specific security considerations.</t>
    <!-- Security considerations for the
    interactions with the receiver are discussed in
    <xref target="I-D.kuhn-quic-bdpframe-extension"></xref>.-->
</section> <!-- Sec Considerations -->
        
</middle>

  <!--  BACK MATTER -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
(for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")
Both are cited textually in the same manner: by using xref elements.
If you use the PI option, xml2rfc will, by default, try to find included files in the same
directory as the including file. You can also define the XML_LIBRARY environment variable
with a value containing a set of directories to search.  These can be either in the local
filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
    
        <?rfc include="reference.RFC.2119.xml"?>
        <!-- <?rfc include="reference.RFC.6349.xml"?> -->
        <?rfc include="reference.RFC.8174.xml"?>
        <?rfc include="reference.RFC.9000.xml"?>
        <!-- <?rfc include="reference.RFC.9001.xml"?> -->
        <?rfc include="reference.RFC.8610.xml"?>
        <?rfc include="reference.I-D.ietf-quic-qlog-quic-events.xml"?>
        <?rfc include="reference.I-D.ietf-tsvwg-careful-resume.xml"?>

    </references>

    <references title="Informative References">
        <?rfc include="reference.RFC.9002.xml"?>
        <?rfc include="reference.RFC.9040.xml"?>
        

      
    </references>
      
<section anchor="rev" title="Internet Draft Revision details">
    <list>
        <t>ID -00 Text extracted from the TSVWG WG draft for CR.</t>
    </list>
</section> <!-- End of Revisions -->

</back>
</rfc>
