<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<rfc category="std" docName="draft-rvelucha-bfd-offload-yang-06" ipr="trust200902">
  <front>
    <title abbrev="BFD YANG">YANG Data Model for Bidirectional Forwarding
    Detection (BFD) Hardware Offloaded Session</title>

    <author fullname="Rajaguru Veluchamy" initials="V." role="editor"
            surname="Rajaguru">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>India</country>
        </postal>

        <email>rvelucha@cisco.com</email>
      </address>
    </author>

    <date year="2023"/>

    <abstract>
      <t>This document defines a extension YANG data model that can be used to
         manage Hardware Offloaded Bidirectional Forwarding Detection (BFD).</t>

      <t>This document specially talks about BFD sessions that are offloaded
         to hardware.</t>

      <t>The YANG modules in this document conform to the Network Management
      Datastore Architecture (NMDA).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
       <t>This document defines an extension YANG data model to base 
         model <xref target="RFC9314"/> 
	 that can be used to manage BFD sessions that are offloaded to hardware. 
	 BFD is a network protocol which is used for liveness detection of arbitrary 
	 paths between systems.</t> 
      
      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD 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="Tree Diagrams">
         <t>This document uses the graphical representation of data models defined in
            <xref target="RFC8340"/>.</t>
      </section>
    </section>

    <section anchor="DESIGN-DATA" title="Design of the Data Model">
    <t>This yang model which is extension to base BFD yang mode been 
       designed to manage BFD HW offloaded sessions.  This new "bfd" container is 
       augmented by all the YANG modules for their respective specific information: <list
          style="numbers">
          <t>ietf-bfd-ip-sh-ext.yang augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/sessions/session" with
          the "session-offloaded" leaf for BFD sessions over IP single-hop extension.</t>
          <t>ietf-bfd-ip-mh-ext.yang augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/sessions-groups/session-group" with
          the "session-offloaded" leaf for BFD sessions over IP multi-hop extension.</t>
          <t>ietf-bfd-lag-ext.yang augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/bfd-lag/sessions/session" with
          the "ession-offloaded" leaf for BFD sessions over LAG extension.</t>
        </list></t>
      </section>

      <section title="BFD IP single-hop-ext hierarchy">
        <t>An "ip-sh-ext" node is added under "bfd" node in
        control-plane-protocol. The operational state data
	for each BFD IP single-hop session is under this "ip-sh-ext" 
	node.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
module: ietf-bfd-ip-sh-ext
augment /rt:routing/rt:control-plane-protocols
         /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh
	 /bfd-ip-sh:sessions/bfd-ip-sh:session:
    +--rw ip-sh-ext
       +--ro session-running-ext
          +--ro session-offloaded?   boolean

              ]]></artwork>
        </figure>
      </section>

      <section title="BFD IP multi-hop-ext hierarchy">
        <t>An "ip-mh-ext" node is added under "bfd" node in
        control-plane-protocol. The operational state data
	for each BFD IP multi-hop session is under this "ip-mh-ext" 
	node.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
module: ietf-bfd-ip-mh-ext
augment /rt:routing/rt:control-plane-protocols
         /rt:control-plane-protocol/bfd:bfd/bfd-ip-mh:ip-mh
	 /bfd-ip-mh:session-groups/bfd-ip-mh:session-group:
          +rw session-offloaded?   boolean

              ]]></artwork>
        </figure>
      </section>

      <section title="BFD Over LAG-ext hierarchy">
        <t>An "lag-ext" node is added under "bfd" node in
        control-plane-protocol. The operational state data
	for each BFD Over LAG session is under this "lag-ext" 
	node.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
module: ietf-bfd-lag-ext
augment /rt:routing/rt:control-plane-protocols
         /rt:control-plane-protocol/bfd:bfd/bfd-lag:lag
	 /bfd-lag:sessions/bfd-lag:session:
          +rw session-offloaded?   boolean

              ]]></artwork>
        </figure>
      </section>

   <section title="BFD IP single-hop ext YANG Module">
     <t>This YANG module imports "ietf-bfd-ip-sh" from RFC9314 
        and augments.</t>

    <figure align="left">
       <preamble/>

       <artwork align="left"><![CDATA[
   <CODE BEGINS> file "ietf-bfd-ip-sh-ext@2022-02-22.yang"

   module ietf-bfd-ip-sh-ext {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh-ext";

     prefix "bfd-ip-sh-ext";

     import ietf-bfd {
       prefix "bfd";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     import ietf-routing {
       prefix "rt";
       reference
         "RFC 8349: A YANG Data Model for Routing Management
          (NMDA version)";
     }

     import ietf-bfd-ip-sh {
       prefix "bfd-ip-sh";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     organization "IETF BFD Working Group";
     contact
       "WG Web:   <http://tools.ietf.org/wg/bfd>
        WG List:  <rtg-bfd@ietf.org>

        Editors:  Rajaguru Veluchamy (rvelucha@cisco.com)";

     description
       "This module contains the YANG definition for BFD IP single-hop
        as per RFC 5881 with some extended info.

        Copyright (c) 2018 IETF Trust and the persons
        identified as authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.";

     reference
        "RFC 5881: Bidirectional Forwarding Detection (BFD)
         for IPv4 and IPv6 (Single Hop)
         RFC 9314: YANG Data Model for Bidirectional Forwarding
         Detection (BFD)";

     revision 2022-02-18 {
       description "Initial revision.";
       reference 
          "RFC XXXX: A YANG data model for BFD IP single-hop extension";
     }

     /*
      * Augments
      */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/" 
           + "bfd-ip-sh:sessions/bfd-ip-sh:session" {
       description "BFD augmentation for IP single-hop-ext";
       leaf session-offloaded {
           type boolean;
           description 
              "Indicates whether BFD session is running in hardware";
       }
     }
   }

<CODE ENDS>
        ]]></artwork>
        </figure>
      </section>

      <section title="BFD IP multi-hop ext YANG Module">
        <t>This YANG module imports "ietf-bfd-ip-mh" from RFC9314 
           and augments.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
   <CODE BEGINS> file "ietf-bfd-ip-mh-ext@2022-02-22.yang"

   module ietf-bfd-ip-mh-ext {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh-ext";
     prefix "bfd-ip-mh-ext";

     import ietf-bfd {
       prefix "bfd";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     import ietf-routing {
       prefix "rt";
       reference
         "RFC 8349: A YANG Data Model for Routing Management
          (NMDA version)";
     }

     import ietf-bfd-ip-mh {
       prefix "bfd-ip-mh";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     organization "IETF BFD Working Group";
     contact
       "WG Web:   <http://tools.ietf.org/wg/bfd>
        WG List:  <rtg-bfd@ietf.org>

        Editors:  Rajaguru Veluchamy (rvelucha@cisco.com)";

     description
       "This module contains the YANG definition for BFD IP single-hop
        as per RFC 5881 with some extended info.

        Copyright (c) 2018 IETF Trust and the persons
        identified as authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.";

     reference
        "RFC 5881: Bidirectional Forwarding Detection (BFD)
         for IPv4 and IPv6 (Single Hop)
         RFC 9314: YANG Data Model for Bidirectional Forwarding
         Detection (BFD)";

     revision 2022-02-18 {
       description "Initial revision.";
       reference 
          "RFC XXXX: A YANG data model for BFD IP single-hop extension";
     }

     /*
      * Augments
      */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/bfd:bfd/bfd-ip-mh:ip-mh/" 
           + "bfd-ip-mh:session-groups/bfd-ip-mh:session-group" {
       description "BFD augmentation for IP multi-hop-ext";
       leaf session-offloaded {
           type boolean;
           description
              "Indicates whether BFD session is running in hardware";
       }
     }
   }

<CODE ENDS>
        ]]></artwork>
        </figure>
      </section>

      <section title="BFD Over LAG ext YANG Module">
        <t>This YANG module imports "ietf-bfd-lag" from RFC9314 
           and augments.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
   <CODE BEGINS> file "ietf-bfd-lag-ext@2022-02-22.yang"

   module ietf-bfd-lag-ext {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-lag-ext";
     prefix "bfd-lag-ext";

     import ietf-bfd {
       prefix "bfd";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     import ietf-routing {
       prefix "rt";
       reference
         "RFC 8349: A YANG Data Model for Routing Management
          (NMDA version)";
     }

     import ietf-bfd-lag {
       prefix "bfd-lag";
       reference
         "RFC 9314: A YANG Data Model for Bidirectional Forwarding
          Detection (BFD)";
     }

     organization "IETF BFD Working Group";
     contact
       "WG Web:   <http://tools.ietf.org/wg/bfd>
        WG List:  <rtg-bfd@ietf.org>

        Editors:  Rajaguru Veluchamy (rvelucha@cisco.com)";

     description
       "This module contains the YANG definition for BFD IP single-hop
        as per RFC 5881 with some extended info.

        Copyright (c) 2018 IETF Trust and the persons
        identified as authors of the code.  All rights reserved.

        Code Components extracted from this document must
        include Simplified BSD License text as described in Section 4.e of
        the Trust Legal Provisions and are provided without warranty as
        described in the Simplified BSD License

        This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.";

     reference
        "RFC 5881: Bidirectional Forwarding Detection (BFD)
         for IPv4 and IPv6 (Single Hop)
         RFC 9314: YANG Data Model for Bidirectional Forwarding
         Detection (BFD)";

     revision 2022-02-18 {
       description "Initial revision.";
       reference 
          "RFC XXXX: A YANG data model for BFD IP single-hop extension";
     }

     /*
      * Augments
      */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/bfd:bfd/bfd-lag:lag/" 
           + "bfd-lag:sessions/bfd-lag:session" {
       description "BFD augmentation for LAG ext";
       leaf session-offloaded {
           type boolean;
           description 
             "Indicates whether BFD session is running in hardware";
       }
     }
   }

<CODE ENDS>
        ]]></artwork>
        </figure>
      </section>

    <section title="Security Considerations">
      <t> Security considerations defined in <xref target="RFC9314"/> 
       apply here too .</t>
    </section>

    <section title="IANA Considerations">
      <t indent="0" pn="section-10-1"> 
       This document registers the following namespace URIs in the "IETF XML Registry"
       <xref target="RFC3688" format="default" sectionFormat="of" derivedContent="RFC3688"/> 
       : 
      </t>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-2">
      <dt pn="section-10-2.1">URI:</dt>
      <dd pn="section-10-2.2">urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh-ext</dd>
      <dt pn="section-10-2.3">Registrant Contact:</dt>
      <dd pn="section-10-2.4">The IESG.</dd>
      <dt pn="section-10-2.5">XML:</dt>
      <dd pn="section-10-2.6">N/A; the requested URI is an XML namespace.</dd>
     </dl>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-3">
      <dt pn="section-10-3.1">URI:</dt>
      <dd pn="section-10-3.2">urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh-ext</dd>
      <dt pn="section-10-3.3">Registrant Contact:</dt>
      <dd pn="section-10-3.4">The IESG.</dd>
      <dt pn="section-10-3.5">XML:</dt>
      <dd pn="section-10-3.6">N/A; the requested URI is an XML namespace.</dd>
     </dl>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-4">
      <dt pn="section-10-4.1">URI:</dt>
      <dd pn="section-10-4.2">urn:ietf:params:xml:ns:yang:ietf-bfd-lag-ext</dd>
      <dt pn="section-10-4.3">Registrant Contact:</dt>
      <dd pn="section-10-4.4">The IESG.</dd>
      <dt pn="section-10-4.5">XML:</dt>
      <dd pn="section-10-4.6">N/A; the requested URI is an XML namespace.</dd>
     </dl>

     <t indent="0" pn="section-10-5">
      This document registers the following YANG modules in the "YANG Module Names" registry
      <xref target="RFC6020" format="default" sectionFormat="of" derivedContent="RFC6020"/>
      : 
     </t>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-6">
      <dt pn="section-10-6.1">Name:</dt>
      <dd pn="section-10-6.2">ietf-bfd-ip-sh-ext</dd>
      <dt pn="section-10-6.3">Namespace:</dt>
      <dd pn="section-10-6.4">urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh-ext</dd>
      <dt pn="section-10-6.5">Prefix:</dt>
      <dd pn="section-10-6.6">bfd-ip-sh</dd>
      <dt pn="section-10-6.7">Reference:</dt>
      <dd pn="section-10-6.8">RFC 9314</dd>
     </dl>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-7">
      <dt pn="section-10-7.1">Name:</dt>
      <dd pn="section-10-7.2">ietf-bfd-ip-mh-ext</dd>
      <dt pn="section-10-7.3">Namespace:</dt>
      <dd pn="section-10-7.4">urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh-ext</dd>
      <dt pn="section-10-7.5">Prefix:</dt>
      <dd pn="section-10-7.6">bfd-ip-mh</dd>
      <dt pn="section-10-7.7">Reference:</dt>
      <dd pn="section-10-7.8">RFC 9314</dd>
     </dl>

     <dl spacing="compact" indent="3" newline="false" pn="section-10-8">
      <dt pn="section-10-8.1">Name:</dt>
      <dd pn="section-10-8.2">ietf-bfd-lag</dd>
      <dt pn="section-10-8.3">Namespace:</dt>
      <dd pn="section-10-8.4">urn:ietf:params:xml:ns:yang:ietf-bfd-lag</dd>
      <dt pn="section-10-8.5">Prefix:</dt>
      <dd pn="section-10-8.6">bfd-lag</dd>
      <dt pn="section-10-8.7">Reference:</dt>
      <dd pn="section-10-8.8">RFC 9314</dd>
     </dl>

    </section>

    <section title="Acknowledgements">
      <t>I would like to thank Vengada Prasad Govindan for his support and 
      guidance on this work. </t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.9314"?>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.5880'?>

      <?rfc include='reference.RFC.5881'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8340'?>

      <?rfc include='reference.RFC.8349'?>

      <?rfc include='reference.RFC.6020'?>

      <?rfc include='reference.RFC.3688'?>

    </references>

    <section title="Change log">
      <t>RFC Editor: Remove this section upon publication as an RFC.</t>

    </section>
  </back>
</rfc>
