<?xml version="1.0" encoding="iso-8859-1" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" ipr="trust200902" docName="draft-sx-detnet-mpls-queue-03" consensus="true" submissionType="IETF">

<front>
        <title abbrev="MPLS Sub-Stack for DLA"> MPLS Sub-Stack Encapsulation for Deterministic Latency Action
 </title>

  <author fullname="Xueyan Song" initials="X." surname="Song">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

         <country>China</country>
       </postal>

       <email>song.xueyan2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Quan Xiong" initials="Q." surname="Xiong">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Wuhan</city>

         <region/>

         <code/>

         <country>China</country>
       </postal>

       <phone/>

       <email>xiong.quan@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
	
    <date year="2022"/>
  
    <area>Routing</area>
    <workgroup>DetNet Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
    <t>  This document specifies formats and principals for the MPLS header which contains the Deterministic Latency Action (DLA) information, designed for use over a 
	DetNet network with MPLS data plane. It enables guaranteed delay support and makes scheduling decisions for time-sensitive service running on
	DetNet nodes that operate within a constrained network domain.</t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">
  
   <t> As specified in <xref target="RFC8655"/> and <xref target="RFC8938"/>, Deterministic Networking (DetNet) operates at the IP layer and delivers
   service with low data loss rates and bounded latency guarantee within a network domain. </t>
  
  <t> As defined in <xref target="RFC8964"/>, the DetNet MPLS data plane provides a foundation of building 
  blocks to enable PREOF (Packet Replication, Elimination and Ordering Functions (PREOF)) functions to DetNet service and forwarding sub-layer. 
  The DetNet service sub-layer includes a DetNet Control Word (d-CW), service label (S-Label), an aggregation label (A-Label) in special case of 
  S-Label used for aggregation. The DetNet forwarding sub-layer supports one or more forwarding labels (F-Labels) used to forward a DetNet flow 
  over MPLS domains. The DetNet forwarding sub-layer provides corresponding forwarding assurance with IETF existing functions using resource allocations and 
  explicit routes. But these functions can not provide the deterministic latency (including bounded latency, low packet loss and in-order delivery) assurance.</t> 
  
  <t> To support time-sensitive service with ultra-low loss rates and deterministic latency, it is required to apply feasible 
  scheduling mechanisms to specific applications for deterministic networking. As described in <xref target="I-D.ietf-detnet-bounded-latency"/>, 
the end-to-end bounded latency is considered as the sum of non-queuing and queuing delay bounds along with the queuing mechanisms. The value for 
non-queuing delay bounds (which consist of packet output delay, link delay, frame preemption delay and processing delay) is relative with the physical
 capability of on-used networks and can be considered to be stable. The unstable latency delay bounds are mainly from queuing delay and regulation 
 delay. The regulation delay is mainly from regulation policy. To simplify the question this draft assumes there is no regulation policy. So the 
 question is left to address the selection for queuing mechanisms and queuing delay information encapsulation in data plane. </t> 
  <t> The queuing mechanisms, as mentioned in <xref target="I-D.ietf-detnet-bounded-latency"/> and <xref target="RFC8655"/>, which include Time Aware Shaping IEEE802.1Qbv, 
 Asynchronous Traffic Shaping IEEE802.1Qcr, cyclic-scheduling queuing mechanism proposed in IEEE802.1Qch. In terms of delay guarantee, to select the
 right scheduling/queuing mechanism applied to a specific application is required. </t>
  
  <t> Based on the existing DetNet MPLS encapsulations and mechanisms <xref target="RFC8964"/>, the draft defines the encoding format for Deterministic Latency Action (DLA) carried in MPLS sub-stack.</t>
  
  </section>
  
  <section title="Conventions">
 
  <section 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 title="Terminology"> 
   <t> Refer to <xref target="RFC8655"/>, <xref target="RFC8964"/>, <xref target="I-D.jags-mpls-mna-hdr"/> and <xref target="I-D.ietf-detnet-bounded-latency"/> for the key terms used in this document.</t>  
    <t> Deterministic Latency (DL):the bound of network latency and delay variation between two DetNet endpoints. It may includes parameters such as bounded latency, bounded delay variation, etc.  </t> 
    <t> Deterministic Latency Action (DLA): used to indicate deterministic latency actions for MPLS Sub-Stack.</t> 
  </section>
  
  </section>

  <section title="DetNet queue encapsulation with MPLS data plane">
  
	<section title="Queuing delay">  
	
     <t> <xref target="RFC8655"/> provides the architecture for deterministic networking (DetNet) which enables the service delivery of DetNet flows with extremely
	 low packet loss rates and deterministic latency. The forwarding sub-layer provides corresponding forwarding assurance but can not provide the deterministic latency (including bounded latency, low packet loss and in-order delivery).
	 As described at <xref target="I-D.ietf-detnet-bounded-latency"/>,
	 the end-to-end bounded latency for one DetNet flow is the sum of delay bound of non-queuing and queuing processing latency. The delay bound for 
	 non-queuing processing may include output delay, link delay, frame preemption delay, and processing delay, the delay bound for queuing 
	 processing may include regulator delay, queuing delay. It is assumed that the delay of non-queuing processing is fixed or be ignorable, 
	 the delay of queuing processing is variable. To realize the guarantee of bounded latency service it is important to select right queuing 
	 methodology applied to specific applications and carry necessary queuing delay information for computation of end-to-end latency. </t>
	 
     <t> The DetNet data plane encapsulation in transport network with MPLS data plane is specified in <xref target="RFC8964"/>. This document provides 
	 additional encapsulation for the DLA in MPLS data plane.</t>	
	 
	</section>  

<section title="DetNet MPLS Encapsulation with Delay Option">  

<t> The DetNet MPLS header follows <xref target="RFC8964"/>, as showed the below figure 1, the SP-Lable (SPL) is added to indicate Deterministic Latency Action (DLA).</t>		

<figure anchor="Figure_1" title="DetNet MPLS Header">
<artwork align="center"> <![CDATA[		 
+---------------------------+
|       DetNet App-Flow     |
|       Payload Packet      |
+---------------------------+--\
|     DetNet Control Word   |   | 
+---------------------------+   | 
|          S-Label          |   | DetNet Data Plane  
+---------------------------+   | MPLS Encapsulation    
|          SP-Lable         |   |  
+---------------------------+   | 
|          F-Label(s)       |   |
+---------------------------+--/
|         Data-Link         |
+---------------------------+
|          Physical         |
+---------------------------+					
]]></artwork>
 </figure>	 
	 
<t> The SP-L (Special Purpose-Label) may be B-SPL <xref target="RFC9017"/>, new-SPL, extended SPL [RFC9017]. 
This draft follows the MNA (MPLS Network Action) solution specified in <xref target="I-D.jags-mpls-mna-hdr"/> and <xref target="I-D.ietf-mpls-mna-fwk"/>, and uses b-SPL to indicate the presence of  the MPLS Network Action Sub-Stack (NASS).
The value for the bSPL value is to be assigned by IANA and follows the assignment in <xref target="I-D.jags-mpls-mna-hdr"/>. The SP-Label field is formatted as below figure.</t>

<figure anchor="Figure_2" title="SP-Label Format">
<artwork align="left"> <![CDATA[
 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     NASI Label = bSPL (TBA1)          | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

   <t> NASI Label: </t>
     <t>A new bSPL value is to be assigned by IANA. It is used to indicate the presence of the MPLS Network Action Sub-Stack (NASS). The assignment for this field value refers to <xref target="I-D.jags-mpls-mna-hdr"/>.</t>
	 

<t> The MPLS sub-stack encoding format for DetNet Latency Action (DLA) is showed as figure 3. The format provides DetNet Latency Network Action Indicator (NAI) indicates the specific DLA. Its detailed information is carried in Ancillary Data. </t>

<figure anchor="Figure_3" title="MPLS LSE Format for DLA">
<artwork align="left"> <![CDATA[
 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NAI-Opcode   |    Flag-Based NAI     |R|NAL|S| 0 |IHS|  NASL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|             Ancillary Data                |S| Ancillary Data|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1|             Ancillary Data                |S| Ancillary Data| 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>


   <t> NAI-Opcode: </t>
     <t>This is the first 8-bit value in the Label Field. The value is used to indicate DLA and to be assigned by IANA. It ranges from 0 to 255. </t>
   <t> Flag-Based NAIs: </t>
     <t> The Flag-Based NAIs field carries flags for DetNet Queuing mechanisms.</t>
   <t> R bit: </t>
      <t>R bit in the TC field is Reserved for future use. </t>
   <t> NAL (Network Action Length): </t>
      <t> The 2-bit field in TC is used to carry the number of additional LSEs used to carry the Ancillary Data for the Network Action. The NAL value for DetNet MUST set to 2.</t>	  
   <t> S bit: </t>
       <t>Indicator for bottom of MPLS stack. </t>  
   <t> P,H (Post-Stack Network Action Presence and Post-Stack Hop-By-hop processing Indicator) bit: </t>
       <t>This is 2-bit flag, where "P" bit indicates the presence of Post-Stack Network Actions and "H" bit indicates the presence of Post-Stack Hop-By-Hop and/or Select processing scope options. While encoding the Post-Stack NAs, the HBH/Select scope NAs MUST be encoded first (closer to the BOS) and then I2E. The DetNet Queuing Option is proposed to use in-stack encoding, the P,H field is set to 0.</t> 	   
   <t> IHS (I2E, HBH, and Select Scope): </t> 
       <t>This 2-bit value indicates the scope of In-Stack NAIs. DetNet Queuing Option is considered to be processed by HBH, so the value is set to 01 refers to table 1 in <xref target="I-D.jags-mpls-mna-hdr"/>. </t>  
   <t> NASL (Network Action Sub-Stack Length):</t> 
       <t> This is a 4-bit field in the TTL.  This indicates the total length of the current NASS. </t>   
   <t> The first bit in the Label field of the second and third LSE MUST be set to "1". As specified in <xref target="I-D.jags-mpls-mna-hdr"/> this is to prevent aliasing the label field with other bSPLs on the legacy routers.	</t>
   <t> Ancillary Data:</t>
   <t> The 19-bit Label field and 4-bit TC field and 8-bit TTL field (except S bit) in the additional LSEs are used to carry the Ancillary Data for specific DetNet queuing delay information.</t>  

<t>The Flag-Based NAIs field is designed as follow:</t>

<figure anchor="Figure_4" title="Flag-based NAIs">
<artwork align="center"> <![CDATA[
	0 1 2 3 4 5 6 7 0 1 2 3 4
	+-+-+-+-+-+-+-+-+-+-+-+-+
	|T|P|C|                 |
	+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
 
<t>T Flag:  1 bit, TAS (Time Aware Shaping) [IIEEE802.1Qbv] queuing indicator. If the flag is set 1, the TAS  is used for the DetNet flows, the can be correlated with the special label encapsulated in figure 2, or be mapped 
with F-Label (s) or S-Label showed in figure 1.</t>

<t>P Flag:  1 bit, Credit-Based Shaper [IEEE802.1q-2014] queuing indicator. </t>
	 
<t>C Flag:  1 bit, CQF [IEEE802.1Qch] queuing indicator. </t>

<t>Note: For one specific DetNet flow, there is one or more choices for queuing mechanisms selection, the queuing mechanisms can be used 
respectively or combined with each other.</t>

<t>If the flag field is set 1 it will associate its AD (Ancillary Data) for specific queuing delay information. 
The encapsulation for AD is showed as TLV format.</t>

<figure anchor="Figure_5" title="Ancillary data for queuing delay">
<artwork align="left"> <![CDATA[
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |    Length     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Special Queuing Ancillary Data                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t> The encapsulation for specific queuing delay information follows the requirements and framework of MPLS MNA discussed in MPLS WG.</t>

<t> The encapsulation for Special Queuing Ancillary Data field is specific for queuing mechanisms. For example, the deadline queuing 
may carry deadline delay information, refer to <xref target="I-D.peng-6man-deadline-option"/>.The 
cyclic-scheduling queuing may carry cycle ID related information, refer to <xref target="I-D.dang-queuing-with-multiple-cyclic-buffers"/>. The detailed format depends on the discussion on the corresponding drafts and left for FFS.</t> 

</section>  
 
</section>   
  
<section title="IANA Considerations">
<t> This document describes a new IANA-managed registry to identify DetNet application processing.  The registration procedure is "IETF Review" 
<xref target="RFC8126"/>.  The registry name is "NAI-Opcode" and assigned for DLA Indicator, as defined in Table 1.</t>

<texttable title="DLA Indicator" anchor="NAI-Opcode">
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Description</ttcol>
      <ttcol align='left'>Reference</ttcol>
      <c>Unassigned</c>
      <c>NAI-Opcode</c>
      <c>this document</c>
</texttable>


<t> This document describes a new IANA-managed registry to identify DetNet MPLS Queue Flags Bits.  The registration procedure is "IETF Review" 
<xref target="RFC8126"/>.  The registry name is "Flag-based-NAIs". There is 12-bit Flag field, as defined in Table 2.</t>

<texttable title="Flags for DLA Indicator" anchor="Tab-Flag-based-NAIs">
      <ttcol align='left'>Bit Position</ttcol>
	  <ttcol align="left">Symbol</ttcol>
      <ttcol align='left'>Description</ttcol>	  
      <ttcol align='left'>Reference</ttcol>
      <c>0</c>
	  <c>T</c>
      <c>TAS Flag</c>
      <c>this document</c>
	  <c>1</c>
	  <c>P</c>
      <c>CBS Flag</c>
      <c>this document</c>
      <c>2</c>
	  <c>C</c>
      <c>CQF Flag</c>
      <c>this document</c>
      <c>3-11</c>
	  <c>Unassigned</c>
      <c>Unassigned</c>
      <c>this document</c>	  
</texttable>

</section>

  
<section title="Security Considerations">
<t> Security considerations for DetNet are covered in the DetNet Architecture RFC8655 and DetNet Security Considerations 
<xref target="RFC9055"/>. MPLS security considerations are covered in <xref target="RFC8964"/>, <xref target="RFC3031"/>, <xref target="RFC3032"/>. 
These security considerations also apply to this document. </t>
</section>

<section title="Acknowledgements">
<t> The authors would like to acknowledge Shaofu Peng for his thorough review and very helpful comments. </t>
</section>  
  
</middle>
  
<back>
    <references title="Normative References">
		<?rfc include="reference.RFC.2119"?>
		<?rfc include="reference.RFC.3031"?>
		<?rfc include="reference.RFC.3032"?>
		<?rfc include="reference.RFC.8655"?>
		<?rfc include="reference.RFC.8126"?>
		<?rfc include="reference.RFC.8174"?>
		<?rfc include="reference.RFC.8964"?>
		<?rfc include="reference.RFC.9017"?>	
    </references>
	
    <references title="Informative References">
		<?rfc include="reference.RFC.8938"?>
		<?rfc include="reference.RFC.9055"?>	
		<?rfc include="reference.I-D.ietf-detnet-bounded-latency"?>
	    <?rfc include='reference.I-D.ietf-mpls-mna-fwk'?>
	    <?rfc include='reference.I-D.jags-mpls-mna-hdr'?>	
	    <?rfc include='reference.I-D.dang-queuing-with-multiple-cyclic-buffers'?>	
	    <?rfc include='reference.I-D.peng-6man-deadline-option'?>		
    </references>	
</back>

</rfc>

