<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-hu-rtgwg-cbfc-rsvp-01"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="draft-hu-rtgwg-cbfc-rsvp-01">Credit-based Flow Control Based on RSVP for RDMA transmission in WAN
    </title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-hu-rtgwg-cbfc-rsvp-01"/>
   
    <author fullname="Jiayuan Hu" initials="Jiayuan" role="editor" surname="Hu">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>
          <city>Guangzhou</city>
          <region>Guangzhou</region>
          <code>510000</code>
          <country>CN</country>
        </postal>
        <email>hujy5@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Zehua Hu" initials="Z" role="editor" surname="Hu">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>
          <city>Guangzhou</city>
          <region>Guangzhou</region>
          <code>510000</code>
          <country>CN</country>
        </postal>
        <email>huzh2@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Tanxin Pi" initials="T" role="editor" surname="Pi">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>
          <city>Guangzhou</city>
          <region>Guangzhou</region>
          <code>510000</code>
          <country>CN</country>
        </postal>
        <email>pitx1@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Yongqing Zhu" initials="Y" role="editor" surname="Zhu">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>
          <city>Guangzhou</city>
          <region>Guangzhou</region>
          <code>510000</code>
          <country>CN</country>
        </postal>
        <email>zhuyq8@chinatelecom.cn</email>
      </address>
    </author>

    <date year="2025"/>

    <area>Routing</area>
    <workgroup>Routing Area Working Group</workgroup>
    <!-- "Internet Engineering Task Force" 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 RFC Series. -->

    <keyword>RFC</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This draft defines the Credit-based flow control mechanism for WAN
        based on the RSVP protocol. With the increasing demand for AI computing
        power, the computing power of a single AIDC can no longer meet the needs
        of large model training. This has given rise to cross-AIDC distributed model
        training, driving the demand for transmitting RDMA packets over WAN
        networks. AI training is extremely sensitive to network packet loss,
        and even a small amount of packet loss may lead to a significant decline
        in training efficiency. In addition, the elephant flow and extreme
        concurrent traffic also place higher demands on network performance.
        Credit-based flow control is a Backpressure-based traffic management
        technology, which has high reliability and stability in practical
        applications. It can provide high-throughput and zero-packet-loss
        transmission guarantees for RDMA traffic, effectively ensuring the
        efficiency of cross-data center AI training.</t>
      <t>This draft focuses on the scenario where RDMA packets are transmitted
        through SRv6 tunnels in the WAN and further expands the capabilities of
        the RSVP protocol in WAN. This draft introduces the Credit-based flow
        control mechanism into the RSVP protocol to achieve precise traffic
        control and provides processing analysis.</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>
        The exponential growth of AI computing power demands, especially for large-scale
        model training, has transformed the data center landscape. The current single AIDC
        can no longer meet the needs of large-scale model training. The training parameters
        of large models have skyrocketed in the past five years, reaching the trillion
        level, and are expected to increase a hundred-fold in the next five years, reaching
        the quadrillion level. This has led to the rise of cross-AIDC distributed model
        training, which, in turn, drives the need to transmit RDMA packets across WANs.
      </t>
      <t>
        AI training is highly sensitive to network packet loss. Even a small amount of packet
        loss can significantly reduce training efficiency. Additionally, the presence of elephant
        flow and extreme concurrent traffic poses greater challenges to network performance. To
        address these issues, this Draft focuses on a Credit-based flow control mechanism for
        WAN transmission.
      </t>
      <t>
        Credit-based flow control is a Backpressure-based traffic management technology. It
        has demonstrated high reliability and stability in practical applications, capable of
        providing high-speed and zero-packet-loss transmission guarantees for RDMA traffic.
        This effectively ensures the efficiency of cross-AIDC AI training.
      </t>
      <t>
        This draft centers on the scenario where RDMA packets are transmitted through SRv6
        tunnels in the WAN. It aims to expand the capabilities of the RSVP in WAN environments.
        By introducing the Credit-based flow control mechanism into the RSVP protocol, the draft
        enables precise traffic control and provides in-depth processing analysis. The proposed
        solution redefines an RSVP option to implement the Credit-based flow control, which is
        detailed in subsequent sections through the initial process, data transmission process,
        and termination process.
      </t>
    </section>
      
    <section title="Conventions Used in This Document">
      <section>
        <name>Requirements Language</name>
        <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 title="Abbreviations">
        <t> AIDC: Artificial Intelligence Data Center</t>
        <t> RDMA: RDMA over Converged Ethernet version 2</t>
        <t> RSVP: Resource Reservation Protocol</t>
        <t> MB: Megabytes</t>
      </section>
    </section>
      <!-- [CHECK] The 'Requirements Language' section is optional -->
    
    <section>
      <name>Scenarios for distributed AI training network and problem statement</name>
      <section>
        <name>Transmitting parameter between multiple AIDCs</name>
        <t>
          The computational scaling of individual AI Data Centers (AIDCs) faces physical constraints (e.g.,
            power/cooling limits). To meet ZFLOPS-scale demands for foundational model training, distributed
            coordination across geographically dispersed AIDCs becomes essential. This scenario employs parallelization
            strategies (e.g., pipeline/data parallelism), requiring frequent synchronization of model parameter via
            RDMA protocols. <xref target="draft-hhz-fantel-sar-wan"/>
        </t>
        <t>
            In this scenario, the synchronization traffic of the parameter which usually features some elephant flows.
            The characteristics of elephant flow are long duration and large data amount, which can easily cause network
            congestion. Therefore, WAN needs to have a flow control method in order to provide efficient and lossless
            transmission of parameter data.
        </t>
      </section>
      <section>
        <name>Directly transmitting sample data to AI servers</name>
        <t>For customers with stringent data security requirements, sample data must be streamed directly to training
            servers via RDMA protocols. Current RDMA implementations suffer severe performance degradation (up to 50%
            throughput loss at 0.1% packet loss) due to their Go-back-N retransmission mechanism. <xref target="draft-hhz-fantel-sar-wan"/>
        </t>
        <t>
          In the scenario of transmitting sample data to AI servers, even a tiny data packet loss can
          seriously disrupt the progress of training. Therefore, efficient sample data transmission
          and zero packet loss are of great importance, which also places higher demands on the network.
        </t>
      </section>
      <section>
        <name>Coordinated model inference</name>
        <t>To address the growing demand for LLM inference while reducing infrastructure costs, many customers implement
            split-learning architectures between their data centers and third-party AIDCs. This solution can distribute
            computational loads (e.g., keeping prefill phase local while offloading decode phase to AIDCs) and maintains
            data privacy by retaining input/output layers on-premises.
        </t>
        <t>
          In the scenario of coordinated model inference, similar to scenarios mention above, WAN need to have dynamic
            elephant flow control and fast network failure protection capabilities.
        </t>
      </section>
    </section>

    <section title="Control Plan Solution">
      <section>
        <name>RSVP protocol extension</name>
        <t>
          RSVP is a signaling protocol that enables end systems and network
          devices to reserve resources along a data path. <xref target="RFC2205"/> allows applications
          to request specific levels of QoS, such as bandwidth, delay, and packet
          loss rate, for their data flows. However, it has scalability issues as the
          number of reservations increases. Additionally, RSVP assumes a static
          network topology, and it may not adapt well to highly dynamic networks.
          The following RSVP common header has been provided in <xref target="RFC2205"/>.
        </t>
        <figure>
          <name>Common Header</name>
          <artwork align="center"><![CDATA[
                0             1              2             3
         +-------------+-------------+-------------+-------------+
         | Vers | Flags|  Msg Type   |       RSVP Checksum       |
         +-------------+-------------+-------------+-------------+
         |  Send_TTL   | (Reserved)  |        RSVP Length        |
         +-------------+-------------+-------------+-------------+
          ]]>
          </artwork>
        </figure>
        <t>
          At the same time, in the resource reservation process of the RSVP, even
          if the data flow is not successfully established in the end, the reserved
          resources will not be released, resulting in resource waste. The RSVP
          protocol relies on specific nodes for the management and maintenance of
          resource reservation. If these nodes fail, it may lead to the interruption
          of the entire resource reservation process. In order to solve the problems
          of the RSVP protocol, such as its inability to dynamically adjust resource
          reservation and the service guarantee issues that may occur due to possible
          failures, this draft defines a new RSVP option, which is used to implement
          credit-based flow control. The detail process is divided into
          three steps: the initial process, the data transmission process,
          and the termination process.
        </t>
        <t>
            The new msg type fields in the common header are as follows:
          </t>
          <t>28 = Credit-based Path initialization</t>
          <t>29 = Credit-based Reserve</t>
          <t>30 = Credit-based End</t>
          <t>31 = Credit-based End ACK</t>
          <t>
            The RSVP protocol defines the Object field for expansion for different message types. Every
            object consists of one or more 32-bit words with a one-word header, and the format is as follows:
          </t>
          <figure>
            <name>Object Formats</name>
            <artwork align="center"><![CDATA[
               0             1              2             3
         +-------------+-------------+-------------+-------------+
         |       Length (bytes)      |  Class-Num  |   C-Type    |
         +-------------+-------------+-------------+-------------+
         |                                                       |
         //                  (Object contents)                   //
         |                                                       |
         +-------------+-------------+-------------+-------------+
          ]]>
            </artwork>
          </figure>
        <t>
            The object information in the "Credit-based Path initialization" message is the same as that in the traditional
            PATH message, but the "Credit-based Reserve message" is different. There are newly defined types
            in Class-Num and C-Type, the following new classes are defined in Class-Num:
          </t>
          <t>
            Credit : It represents the initial buffer reserved by the device for the forwarding task,
            with the unit being MB.
          </t>
      </section>
        <section>
          <name>Initial process</name>
          <t>
            Before transmitting RDMA flow between servers in different AIDC, a transmission
            channel with service guarantee capabilities needs to be established between the servers.
            The traditional RSVP can only guarantee the quality of service in a fixed manner
            according to specific service information. The RSVP based on credit is similar to the
            traditional RSVP in initialization. The sender sends a "Credit-based PATH" detection message to
            the receiver, this message will flood to every path that can reach the receiver, and this
            message contains the data flow identifier. When the devices
            on the path receive the RSVP message packet, they will all send a "Credit-based Reserve" message
            to the upstream device in the path with the credit value. The credit value is
            stored in the object contents field of the RSVP message. It represents the buffer reserved
            by the device for the forwarding task, and the credit value should be less than the buffer. Initial process
              as shown in the following figure:
          </t>
          <figure>
            <name>Initial process</name>
            <artwork align="center"><![CDATA[
     +---------------------+
     | Destination Servers |
     +---------------------+
               |              ^
        +------------+        |
        | DC Gateway |        |
        +------------+        |
           /     \            |
 --- +------+   +------+      |
  |  | Leaf |   | Leaf |      |
     +------+   +------+      |
        |    \ /    |         |
  W     |    / \    |         |   Path
  A  +-------+  +-------+     |   initialization
  N  | Spine |  | Spine |     |   message
     +-------+  +-------+     |
        |    \ /    |         |
        |    / \    |         |
     +------+   +------+      |
  |  | Leaf |   | Leaf |      |
 --- +------+   +------+      |
          \       /           |
        +------------+        |
        | DC Gateway |        |
        +------------+
              |
      +----------------+
      | Source Servers |
      +----------------+
]]>
            </artwork>
          </figure>
          <t>
            After confirming the selected traffic control device, the receiver initiates resource reservation through
              an RSVP message,  when the selected device receives the resource reservation message, they will all send a "Credit-based Reserve" message
            to the previous selected device in the path with the credit value. The credit value is
            stored in the object contents field of the RSVP message. It represents the buffer reserved
            by the device for the forwarding task, and the credit value should be less than the buffer.
          </t>
        </section>

        <section>
          <name>Data transmission process</name>
          <t>
            After the resource reservation initial process is completed, each selected network device will maintain
            a credit value. This credit value is equal to the credit value replied by the next-selected device
            on the path during initialization. At this time, the sender server can start sending data.
            The forwarding devices in the path randomly forward data packets smaller than the credit value
            they maintain. After sending, they subtract
            the size of the forwarded data packet from the credit value they maintain. When the credit
            value is not 0, they will continue to send; when the credit value is 0, they will stop sending.
          </t>
          <t>
            In contrast, after the next-selected forwarding device receives the data packet, according to the first
            in first out principle, the device forwards the data block in the buffer, it will reply with
            a Credit-based Reserve packet to the previous-selected forwarding device. This packet carries a new credit
            value, which is the size of the data packet it has just forwarded (indicating that a new buffer
            space has become available).
          </t>
          <t>
            After each data transmission, the device should receive a message carrying the credit value in
            reply from the next-selected device. When a failure occurs in the link or the next-hop device, it
            will not receive the reply message. If the reply message is still not received
            after the preset heartbeat time elapses, it can be considered that a failure has occurred in
            the next-hop device or the link. The forwarding device will forward the traffic to the backup
            path according to the acknowledgment message received during the initialization process, thereby
            ensuring the non-loss transmission of the traffic. Data transmission process as shown in the following figure:
          </t>
          <figure>
            <name>Data transmission process</name>
            <artwork align="center"><![CDATA[
     +---------------------+
     | Destination Servers |
     +---------------------+
               |              | Credit
        +------------+        V
        | DC Gateway |
        +------------+        | Credit
           /     \            V
 --- +------+   +------+
  |  | Leaf |   | Leaf |
     +------+   +------+      |
        |    \ /    |         | Credit
  W     |    / \    |         V
  A  +-------+  +-------+
  N  | Spine |  | Spine |
     +-------+  +-------+     |
        |    \ /    |         | Credit
        |    / \    |         V
     +------+   +------+
  |  | Leaf |   | Leaf |
 --- +------+   +------+      |
          \       /           | Credit
        +------------+        V
        | DC Gateway |
        +------------+        |
              |               | Credit
      +----------------+      V
      | Source Servers |
      +----------------+
]]>
            </artwork>
          </figure>
        </section>

        <section>
          <name>Termination process</name>
          <t>
            After the data transmission is completed, the source device needs to send a "Credit-based End" message
            representing the end of the task to flood along all reachable paths. Upon receiving this
            message, the selected devices on the paths will terminate the corresponding guarantee tasks and answer a
            "Credit-based End ACK" message to the previous selected device. If device not receive the "Credit-based End ACK"
            message from the next-selected device in within the preset time, it will repeatedly send 'Credit-based END'
            messages until it receives a "Credit-based End ACK" message from the next-selected device. Termination process
              as shown in the following figure:
          </t>
                      <figure>
            <name>Termination process</name>
            <artwork align="center"><![CDATA[
     +---------------------+
     | Destination Servers |
     +---------------------+
               |              |
        +------------+        |
        | DC Gateway |        |
        +------------+        |
           /     \            |
 --- +------+   +------+      |
  |  | Leaf |   | Leaf |      |   Mission
     +------+   +------+      |   termination
        |    \ /    |         |   message
  W     |    / \    |         |
  A  +-------+  +-------+     |
  N  | Spine |  | Spine |     |
     +-------+  +-------+     |
        |    \ /    |         |
        |    / \    |         |
     +------+   +------+      |
  |  | Leaf |   | Leaf |      |
 --- +------+   +------+      |
          \       /           |
        +------------+        |
        | DC Gateway |        V
        +------------+
              |
      +----------------+
      | Source Servers |
      +----------------+
]]>
            </artwork>
          </figure>
        </section>
      </section>
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>TBC</t>
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>TBC</t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2205.xml"/>
        <reference anchor="draft-hhz-fantel-sar-wan">
        <front>
          <title>FANTEL scenarios and requirements in Wide Area Network</title>
          <author>
          </author>
        </front>
        </reference>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
    </references>
    
    <section anchor="Contributors" numbered="false">
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
      <name>Contributors</name>
      <t>Thanks to all the contributors.</t>
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
    </section>
    
 </back>
</rfc>
