<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[]>
<?rfc toc="yes" ?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc compact="yes" ?>
<?rfc iprnotified="Yes" ?>
<?rfc strict="no" ?>
<rfc ipr="trust200902" category="exp" docName="draft-kuppani-pcep-flowspec-sync-00" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="FLOWSPEC-SYNC">PCEP Flowspec Synchronization Procedures.</title>
    <author initials="S" surname="Kuppani" fullname="Swapna Kuppani">
      <organization>Huawei Technologies</organization>
        <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560066</code>
          <country>India</country>
        </postal>
        <email>swapnak@huawei.com</email>
      </address>
    </author>
    <author initials="A" surname="Sinha" fullname="Ankit Sinha">
      <organization>Huawei Technologies</organization>
        <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560066</code>
          <country>India</country>
        </postal>
        <email>Ankit.Kumar.Sinha1@huawei.com</email>
      </address>
    </author>

    <date month="May" year="2016" />
    <area>Routing</area>
    <workgroup>PCE Working Group</workgroup>
    <abstract>
          <t>Dissemination of the traffic flow specifications was first introduced
      in the BGP protocol via RFC 5575. In order to distribute the flow
      specifications from PCE controller to network device without BGP
      protocol it is desirable to extend PCEP with flow specification
      information.</t>
      
   <t><xref target="I-D.li-pce-pcep-flowspec"/> specifies a set of extensions to PCEP to support
      dissemination of flow specifications. The extensions include the
      instantiation, updation and deletion of flow specifications.</t>

   <t>Flow specifications downloaded to forwarding entries requires a reliable synchronization
   mechanism  between the path computation clients (PCCs) and the PCE.
   This draft specify the flow specification synchronization mechanism for managing
   of flow specification (FLOwSPEC-DB) at node (PCC) aligning with FLOWSPEC-DB at PCE
   on initial session UP or session flap and specifies the required Path
   Computation Element Communication Protocol (PCEP) extensions.</t>
   </abstract>
  </front>
  <middle>
    <section title="Introduction" toc="default">
    <t><xref target="I-D.li-pce-pcep-flowspec"/>  specify the procedures and PCEP protocol extensions to
   support dissemination of flow specifications and includes the creation, updation and withdrawal
   of flow specifications via PCEP.</t>

    <t>Flow specifications downloaded to forwarding entries requires a reliable synchronization
   mechanism  between the path computation clients (PCCs) and the PCE.
   This draft specify the PCE maintenance of flow specification database per session,
   and describes the flow specification(FLOWSPEC-DB) synchronization mechanism for managing
   of flow specification database at node (PCC) aligning with flow specification database at PCE 
   on initial session UP or session flap and specifies the required Path
   Computation Element Communication Protocol (PCEP) extensions.</t>
   <t> This draft specify the optimizations for FLOWSPEC-DB synchronization and the corresponding PCEP
   procedures and extensions.</t> 
   <section title="Requirements Language"
               toc="default">
        <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
        <xref target="RFC2119" />.</t>
      </section>
    </section>
  
      
	<section title="FLOWSPEC-DB Synchronization">
		<t>PCE MUST maintains the FLOWSPEC-DB for each PCEP session separately.
		The purpose of FLOWSPEC-DB synchronization is to make sure that the
		PCE's view of FLOWSPEC-DB matches with the PCC's FLOWSPEC-DB. The FLOWSPEC-DB
		synchronization MUST be performed from PCE to PCC immediately after the LSP state and label database synchronization.
		<xref target="I-D.ietf-pce-stateful-pce"/> describes the basic
		mechanism for LSP state synchronization. 
		<xref target="I-D.ietf-pce-stateful-sync-optimizations"/> describes the optimizations for LSP state synchronization. 
		<xref target="I-D.palle-pce-controller-labeldb-sync"/> describes the Label database synchronization.</t>

		<t>By default a Full FLOWSPEC-DB is performed from PCE to PCC  on Initial session UP or every session flap.
		see <xref target="SEC_FULL_FLOWSPEC_DB"/> for detail procedures.</t>
		
		<t>But a Full FLOWSPEC-DB synchronization is not always necessary following a PCEP
		session restart and providing an Optimizations for FLOWSPEC-DB synchronization can result 
		in significant savings in both control-plane data exchanges and the time it takes
		for the PCC to become fully operational.</t>

		<t>Optimizations for FLOWSPEC-DB synchronization describes the need that both PCEP 
		speakers support flowspec database version capability and maintain 
		flowspec database version for each session. See <xref target="SEC_OPT_FLOWSPEC_DB"/> for detail procedures.</t>
		
	</section>		
	
    <section title="Full FLOWSPEC-DB Synchronization procedure" anchor="SEC_FULL_FLOWSPEC_DB">
    <t>During Full FLOWSPEC-DB Synchronization, a PCE first takes a snapshot of the
   FLOWSPEC database for the session, then sends this snapshot to the PCC in a
   sequence of FlowSpec message (FlowSpec message defined in <xref target="I-D.li-pce-pcep-flowspec"/>).
    Each FlowSpec message sent during FLOWSPEC-DB Synchronization has the SYNC Flag
    in the SRP Object(see <xref target="SEC_SRP_OBJ"/>) set to 1.</t>

   <t>The end of synchronization marker is a FlowSpec message with the SYNC
   Flag set to 0 for SRP Object with Flow ID equal to reserved value 0 in the FLOW object (<xref target="I-D.li-pce-pcep-flowspec"/>). 
   If the PCE has no flow to synchronize, it will only send the
   end of synchronization marker.</t>

    <t>
   A PCE SHOULD NOT send FlowSpec messages to a PCC before FLOWSPEC-DB
   Synchronization is complete.</t>

    <t>Either the PCE or the PCC MAY terminate the session using the PCEP
   session termination procedures during the FLOWSPEC-DB synchronization phase.  If
   the session is terminated, the PCC MUST clean up flow(s) it received
   from this PCE.  The session reestablishment MUST be re-attempted as per
   the procedures defined in <xref target="RFC5440"/>, including use of a back-off
   timer.</t>
   <t>The PCC does not send positive acknowledgements for properly received
   flowspec database synchronization messages.  It MUST respond with a PCErr message with
   Error-type TBD1 (Flow specification Database Synchronization Error) and Error-value 1
   (indicating an error in processing the FlowSpec) if it
   encounters a problem with the Flow Update it received from the
   PCE and it MUST terminate the session.</t>
   <t>If the PCE encounters a problem which prevents it from completing the
   flow transfer, it MUST send a PCErr message with Error-type TBD1 (Flow specification
   Database Synchronization Error) and Error-value 2 (indicating an
   internal PCE Error) to the PCC and terminate the session.</t>

   <t> The successful FLOWSPEC-DB Synchronization sequence is shown in <xref target="SEC_FULL_FLOWSPEC_DB_SUCC"/>.</t>
 <t>
          <figure title="Successful FLOWSPEC-DB synchronization" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_FULL_FLOWSPEC_DB_SUCC">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[
+-+-+-+                         +-+-+
|PCE  |                         |PCC|
+-+-+-+                         +-+-+
   |                             |
   |-----FlowSpec, SYNC=1------->| (Sync start)
   |                             |
   |-----FlowSpec, SYNC=1------->|
   |            .                |
   |            .                |
   |            .                |
   |-----FlowSpec, SYNC=1------->|
   |            .                |
   |            .                |
   |            .                |
   |                             |
   |-----FlowSpec, SYNC=0------->| (End of sync marker
   |                             |  Flow Update
   |                             |  FLOW ID =0)
   |                             | (Sync done)
]]></artwork>
          </figure>
        </t>

  <t> The sequence where the PCC fails during the FLOWSPEC-DB Synchronization
   phase is shown in <xref target="SEC_FULL_FLOWSPEC_DB_PCC_FAIL"/>.</t>
 <t>
          <figure title="Failed FLOWSPEC-DB synchronization(PCC failure)" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_FULL_FLOWSPEC_DB_PCC_FAIL">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[
+-+-+-+                           +-+-+
|PCE  |                           |PCC|
+-+-+-+                           +-+-+
   |                                |
   |--------FlowSpec, SYNC=1------->| (Sync start)
   |                                |
   |--------FlowSpec, SYNC=1------->|
   |               .                |
   |               .                |
   |               .                |
   |--------FlowSpec, SYNC=1------->|
   |                                |
   |---FlowSpec, SYNC=1             |
   |            \    ,----PCErr ----|
   |             \  /               |
   |              \/                |
   |              /\                |
   |             /   `------------->| (Ignored)
   |<-----------`                   |

]]></artwork>
          </figure>
        </t>
        <t> The sequence where the PCE fails during the FLOWSPEC-DB Synchronization
   phase is shown in <xref target="SEC_FULL_FLOWSPEC_DB_PCE_FAIL"/>.</t>
 <t>
          <figure title="Failed FLOWSPEC-DB synchronization(PCE failure)" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_FULL_FLOWSPEC_DB_PCE_FAIL">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[
+-+-+-+                         +-+-+
|PCE  |                         |PCC|
+-+-+-+                         +-+-+
   |                             |
   |-----FlowSpec, SYNC=1------->| (Sync start)
   |                             |
   |-----FlowSpec, SYNC=1------->|
   |            .                |
   |            .                |
   |            .                |
   |----------- PCErr=? -------->|
   |                             |

]]></artwork>
          </figure>
        </t>
        </section>

<section title="Optimizations for FLOWSPEC-DB Synchronization" anchor="SEC_OPT_FLOWSPEC_DB"> 	
<t>This section add some of the optimization mechanisms for FLOWSPEC-DB
synchronization. By default, the full FLOWSPEC-DB synchronization is performed.</t>

<section title="FLOWSPEC-DB Synchronization Avoidance Procedure" anchor="SEC_OPT_FLOWSPEC_DB_AVOID">
   <t>The FLOWSPEC-DB synchronization MAY be skipped following a PCEP session restart
   if there is no change in the FLOWSPEC-DB of the session at PCE, during the period
   prior to session re-initialization.  To be able to make this
   determination, flows must be exchanged and maintained by both PCE and
   PCC during normal operation.  This is accomplished by keeping track
   of the changes to the flow database, using a version tracking
   field called the Flowspec Database Version Number.</t>

   <t>The Flowspec Database Version Number, carried in FLOWSPEC-DB-VERSION TLV
   (see <xref target="SEC_FLOWSPEC_DB_VER_TLV"/>), is owned by a PCE and it MUST be incremented by
   1 for each successive change in the PCE's flowspec database.  The
   Flowspec Database Version Number MUST start at 1 and may wrap
   around.  Values 0 and 0xFFFFFFFFFFFFFFFF are reserved.  If either of
   the two values are used during FLOWSPEC-DB synchronization, the
   PCC speaker receiving this node should send back a PCErr with Error-type TBD1 Error-value 3 'Received an invalid
   Flowspec Database Version Number', and close the PCEP session.  Operations that
   trigger a change to the Flowspec database include an addition or deletion of flows that 
   would trigger a flow update to the PCC.</t>

   <t>FLOWSPEC-DB synchronization avoidance is advertised on a PCEP session
   during session startup using the INCLUDE-FLOWSPEC-DB-VERSION (I) bit in the
   PCE FlowSpec capability TLV (see <xref target="SEC_FLOWSPEC_CAP"/>).
   The PCEP peer MAY include the SPEAKER-ENTITY-ID TLV described in <xref target="I-D.ietf-pce-stateful-sync-optimizations"/>
   in the OPEN message to identify the peer in case of IP address change.</t>

   <t>If both PCEP speakers set the I flag in the OPEN object's PCE FlowSpec Capability TLV
   to 1, the PCE MUST include the FLOWSPEC-DB-VERSION TLV
   in each FLOW object of the FlowSpec message.  If the FLOWSPEC-DB-VERSION TLV
   is missing in a FlowSpec message, the PCC will generate an error with
   Error-Type 6 (mandatory object missing) and Error-Value TBD2
   'FLOWSPEC-DB-VERSION TLV missing' and close the
   session.  If FLOWSPEC-DB synchronization avoidance has not been enabled on
   a PCEP session, the PCE SHOULD NOT include the FLOWSPEC-DB-VERSION TLV in
   the FLOWSPEC Object and the PCC SHOULD ignore it were it to receive one.</t>

   <t>If a PCC's flow specification database survived the restart of a PCEP session,
   the PCC will include the FLOWSPEC-DB-VERSION TLV in its OPEN object, and
   the TLV will contain the last Flowspec Database Version Number
   received on an Flow Update from the PCE in the previous PCEP
   session.  If a PCE's Flowspec Database survived the restart of a
   PCEP session, the PCE will include the FLOWSPEC-DB-VERSION TLV in its OPEN
   object and the TLV will contain the latest Flowspec Database Version
   Number.  If a PCEP speaker's flowspec database did not survive the
   restart of a PCEP session, the PCEP speaker MUST NOT include the FLOWSPEC-DB-VERSION TLV in the OPEN object.</t>

   <t>If both PCEP speakers include the FLOWSPEC-DB-VERSION TLV in the OPEN
   Object and the TLV values match, the PCE MAY skip FLOWSPEC-DB
   synchronization.  Otherwise, the PCE MUST perform full FLOWSPEC-DB
   synchronization (see <xref target="SEC_FULL_FLOWSPEC_DB"/>) or incremental FLOWSPEC-DB synchronization
   (see <xref target="SEC_OPT_FLOWSPEC_DB_INC"/>) to the PCC,  Incase, the PCE attempts to skip FLOWSPEC-DB synchronization,
   by setting the SYNC Flag to 0 on the first Flow Update
   from the PCE, the PCC MUST send back a PCErr with Error-type TBD1
   (Flowspec Database Synchronization Error) and Error-value 4(Flowspec Database Version mismatch),
   and close the PCEP session.</t>

   <t>If FLOWSPEC-DB synchronization is required, then prior to completing the
   initialization phase, the PCC MUST mark any flows in the flowspec database
   that were previously updated by the PCE as stale.  When the PCE
   updates a flow during FLOWSPEC-DB synchronization, if the flow already
   exists in the flowspec database, the PCC MUST update the flowspec database and
   clear the stale marker from the flow.  When it has finished FLOWSPEC-DB
   synchronization, the PCE MUST immediately send an end of
   synchronization marker.  The end of synchronization marker is a Path
   Computation flowspec (FlowSpec) message with a SRP object
   containing the SYNC flag set to 0 (see <xref target="SEC_SRP_OBJ"/>)
   and Flow ID as 0 in the FLOW object.
   The FLOWSPEC-DB-VERSION TLV MUST be included in this FlowSpec message.
   On receiving this flow Update, the PCC MUST purge any flows from the flowspec
   database that are still marked as stale.</t>

   <t>Note that a PCE/PCC MAY force FLOWSPEC-DB synchronization by not including
   the FLOWSPEC-DB-VERSION TLV in its OPEN object.</t>

   <t><xref target="SEC_OPT_FLOWSPEC_DB_AVOID_SKIP"/> shows an example sequence where the FLOWSPEC-DB synchronization is
   skipped.</t>
   <t>
          <figure title="FLOWSPEC-DB synchronization Skipped" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_OPT_FLOWSPEC_DB_AVOID_SKIP">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[
          +-+-+-+                         +-+-+
          |PCE  |                         |PCC|
          +-+-+-+                         +-+-+
             |                 ,----Open---|
             |                /   DBv=35   |
             |--Open--,      /     I=1     |
             |  DBv=35 \    /              |
             |    I=1   \  /               |
             |           \/                |
             |           /\                |
             |          /   `------------->| (OK to skip sync)
 (Skip sync) |<--------`                   |
             |            .                |
             |            .                |
             |            .                |
             |                             |
             |--FlowSpec,DBv=36,SYNC=0---->| (Regular
             |                             |  FlowSpec Message)
             |--FlowSpec,DBv=37,SYNC=0---->| (Regular
             |                             |  FlowSpec Message)
             |--FlowSpec,DBv=38,SYNC=0---->|
             |                             |
]]></artwork>
          </figure>
        </t>
        <t><xref target="SEC_OPT_FLOWSPEC_DB_AVOID_PERF"/> shows an example sequence where the FLOWSPEC-DB synchronization is
   performed due to flowspec database version mismatch during the PCEP
   session setup.  Note that the same FLOWSPEC-DB synchronization sequence
   would happen if either the PCC or the PCE would not include the FLOWSPEC-
   DB-VERSION TLV in their respective Open messages.</t>
        <t>
          <figure title="FLOWSPEC-DB synchronization Performed" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_OPT_FLOWSPEC_DB_AVOID_PERF">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[
        +-+-+-+                         +-+-+
        |PCE  |                         |PCC|
        +-+-+-+                         +-+-+
           |                 ,----Open---|
           |                /   DBv=35   |
           |--Open--,      /     I=1     |
           |  DBv=39 \    /              |
           |    I=1   \  /               |
           |           \/                |
           |           /\                |
           |          /   `------------->| (Expect sync)
 (Do sync) |<--------`                   |
           |                             |
           |--FlowSpec,DBv=39,SYNC=1---->| (Sync start)
           |            .                |
           |            .                |
           |            .                |
           |--FlowSpec,DBv=39,SYNC=0---->| (Sync done)
           |            .                |(Purge flow
           |            .                | if applicable)
           |            .                |
           |--FlowSpec,DBv=40,SYNC=0---->| (Regular
           |                             |  FlowSpec Message)
           |--FlowSpec,DBv=41,SYNC=0---->| (Regular
           |                             |  FlowSpec Message)
           |--FlowSpec,DBv=42,SYNC=0---->|
           |                             |

]]></artwork>
          </figure>
        </t>
        <t><xref target="SEC_OPT_FLOWSPEC_DB_AVOID_SKIP_1"/> shows an example sequence where the FLOWSPEC-DB synchronization is
   skipped, but because one or both PCEP speakers set the I Flag to 0,
   the PCE does not send FLOWSPEC-DB-VERSION TLVs in subsequent FlowSpec
   messages to the PCC.  If the current PCEP session restarts, the PCEP
   speakers will have to perform full FLOWSPEC-DB synchronization, since the PCC
   does not know the PCE's latest Flowspec database Version Number
   information.</t>
   <t>
           <figure title="FLOWSPEC-DB Synchronization Skipped, no FLOWSPEC-DB-VERSION TLVs sent
                                 from PCE" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_OPT_FLOWSPEC_DB_AVOID_SKIP_1">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[

         +-+-+-+                         +-+-+
         |PCE  |                         |PCC|
         +-+-+-+                         +-+-+
            |                 ,----Open---|
            |                /   DBv=43   |
            |--Open--,      /     I=0     |
            |  DBv=43 \    /              |
            |    I=0   \  /               |
            |           \/                |
            |           /\                |
            |          /   `------------->| (OK to skip sync)
(Skip sync) |<--------`                   |
            |            .                |
            |            .                |
            |            .                |
            |------FlowSpec,SYNC=0------->| (Regular
            |                             |  FlowSpec Message)
            |------FlowSpec,SYNC=0------->| (Regular
            |                             |  FlowSpec Message)
            |------FlowSpec,SYNC=0------->|
            |                             |
]]></artwork>
          </figure>
        </t> 
        </section>
		
        <section title="Incremental FLOWSPEC-DB Synchronization Procedure" anchor="SEC_OPT_FLOWSPEC_DB_INC">
		<t>If a PCC restarts and its Flowspec database survived, PCE with
   mismatched Flowspec Database Version Number will send all their Flows
   information (full FLOWSPEC-DB) to the PCC, even if only a small number of
   changes happened.  It can take a long time and consume large communication
   channel bandwidth. </t>		
        <t>This section extends the idea to only synchronize the delta (changes) in case of
        Flowspec Database Version Number of both PCEP peers is non-zero and mismatch.</t>
        <t>If both PCEP speakers include the FLOWSPEC-DB-VERSION TLV in the OPEN
   object and the FLOWSPEC-DB-VERSION TLV values match, the PCE MAY skip
   FLOWSPEC-DB synchronization.  Otherwise, the PCE MUST perform FLOWSPEC-DB
   synchronization.  Incremental flow specification database synchronization capability is
   advertised on a PCEP session during session startup using the DELTA-FLOWSPEC-SYNC-CAPABILITY (D) bit in the capabilities TLV (see <xref target="SEC_FLOWSPEC_CAP"/>).
   Instead of dumping full FLOWSPEC-DB to the PCC again, the PCE
   synchronizes the delta (changes) as described in <xref target="SEC_INC_FLOWSPEC-DB_FIG"/> when D flag
   and I flag is set to 1 by both PCC and PCE.  Other combinations of D
   and I flags setting by PCC and PCE result in full FLOWSPEC-DB
   synchronization procedure as described in
   <xref target="SEC_FULL_FLOWSPEC_DB"/>.  The PCE MAY force a full FLOWSPEC-DB
   synchronization by setting the D flag to zero in the OPEN message.</t>
   <t>
           <figure title="Incremental Synchronization Procedure" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_INC_FLOWSPEC-DB_FIG">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![CDATA[

          +-+-+-+                         +-+-+
          |PCE  |                         |PCC|
          +-+-+-+                         +-+-+
             |                 ,----Open---|
             |                /   DBv=35   |
             |--Open--,      /     I=1     |
             |  DBv=39 \    /      D=1     |
             |    I=1   \  /               |
             |    D=1    \/                |
             |           /\                |
             |          /   `------------->| (Expect Delta sync)
    (Do sync)|<--------`                   | (DONOT Purge Flow)
    (Delta)  |                             |
             |                             |
(Delta       |--FlowSpec,DBv=39,SYNC=1---->|
Sync starts) |            .                |
             |            .                |
             |            .                |
             |            .                |
             |--FlowSpec,DBv=39,SYNC=0---->| (Sync done)
             |                             |
             |                             |
             |--FlowSpec,DBv=40,SYNC=0---->| (Regular
             |                             |  FlowSpec Message)
             |--FlowSpec,DBv=41,SYNC=0---->| (Regular
             |                             |  FlowSpec Message)
             |--FlowSpec,DBv=42,SYNC=0---->|
             |                             |
]]></artwork>
          </figure>
          </t>
    <t>As per <xref target="SEC_OPT_FLOWSPEC_DB_AVOID"/>, the Flowspec Database Version Number is
   incremented each time a change is made to the PCE's flowspec
   database.  Each flow is associated with the DB version at the time of
   its addition.  This is needed to determine which flow and what
   information needs to be synchronized in incremental FLOWSPEC-DB
   synchronization.</t>

   <t>It is not necessary for a PCE to store a complete history of flowspec
   database change, but rather remember the flows (including
   flow addition and deletion) that happened between the PCEP
   session(s) restart in order to carry out incremental FLOWSPEC-DB
   synchronization.  After the synchronization procedure finishes, the
   PCE can dump this history information.  In the example shown in
   <xref target="SEC_INC_FLOWSPEC-DB_FIG"/>, the PCE needs to store the flow changes that happened
   between DB Version 35 to 39 and synchronizes these changes only when
   performing incremental flow update.  So a PCE needs to remember
   at least the flow changes that happened after an existing PCEP
   session with a PCC goes down to have any chance of doing
   incremental synchronization when the session is re-established.</t>

   <t>If a PCE finds out it does not have sufficient information to
   complete incremental synchronization after advertising incremental
   FLOWSPEC-DB synchronization capability, it MUST send a PCErr with
   Error-Type TBD1 and Error-Value 5 'A PCE indicates to a PCC that it can
   not complete the FLOWSPEC-DB synchronization' and terminate the session.  The PCE
   SHOULD re-establish the session with the D bit set to 0 in the OPEN
   message.</t>

   <t>The other procedures and error checks remain unchanged from the full
   FLOWSPEC-DB synchronization defined in <xref target="SEC_FULL_FLOWSPEC_DB"/>.</t>
    </section>
	</section>
	
    <section title="PCEP Extensions">
        <section title="SRP object" anchor="SEC_SRP_OBJ">
			<t>SRP object is defined in <xref target="I-D.ietf-pce-stateful-pce"/> and extended in
			<xref target="I-D.ietf-pce-pce-initiated-lsp"/>. 
			Further, <xref target="I-D.palle-pce-controller-labeldb-sync"/> added 
			a 'SYNC' flag (S bit) to specify the LABEL-DB synchronization operation. 
			This document extends the usage of the same bit for the	
			FLOWSPEC-DB synchronization operation as well.</t>
			
          <t>The S Flag MUST be set to 1 on each FlowSpec Message sent
		  from a PCE during FLOWSPEC-DB Synchronization.  The S Flag MUST be set
		  to 0 in other messages sent from the PCE.</t>
        </section>
		
        <section title="Extension of FlowSpec Capability TLV" anchor="SEC_FLOWSPEC_CAP">
			<t>PCE FlowSpec Capability TLV is defined in <xref target="I-D.li-pce-pcep-flowspec"/>.
			This draft defines a new 'INCLUDE-FLOWSPEC-DB-VERSION' flag (I bit) to specify
			the flowspec database version capability  and 'DELTA-FLOWSPEC-SYNC-CAPABILITY' to specify the
			incremental flowspec database synchronization capability.</t>
			
			<t> The format of the PCE FlowSpec Capability TLV is shown <xref target="SEC_FLOWSPEC_CAP_FIG"/>:</t>
		<t>
           <figure title="PCE FlowSpec Capability TLV" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_FLOWSPEC_CAP_FIG">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![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=4           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                             Value                         |D|I|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
          </figure>
        </t>

			<t>I (INCLUDE-FLOWSPEC-DB-VERSION - 1 bit):  if set to 1 by both PCEP Speakers,
			the PCE will include the FLOWSPEC-DB-VERSION TLV in each FLOWSPEC Object.</t>
		
			<t>D (DELTA-FLOWSPEC-SYNC-CAPABILITY - 1 bit):  if set to 1 by a PCEP
			speaker, it indicates that the PCEP speaker allows incremental
			(delta) FLOWSPEC-DB synchronization.</t>		
        </section>
		
        <section title="New FLOWSPEC-DB-VERSION TLV" anchor="SEC_FLOWSPEC_DB_VER_TLV">
			 <t>The Flowspec Database Version Number (FLOWSPEC-DB-VERSION) TLV is an
			optional TLV that MAY be included in the OPEN object and the FLOWSPEC
			object.</t>

			<t>The format of the FLOWSPEC-DB-VERSION TLV is shown in the following figure:</t>
		<t>
          <figure title="FLOWSPEC-DB-VERSION TLV format" suppress-title="false" align="center" alt="" width="" height="" anchor="SEC_FLOWSPEC_DB_VER_TLV_FIG">
            <artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height=""><![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=[TBD3]         |            Length=8           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FlowSpec Database Version Number                 |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>
        </t>
		
			<t> The type of the TLV is [TBD3] and it has a fixed length of 8 octets.
			The value contains a 64-bit unsigned integer, representing the FlowSpec
			Database Version Number.</t>
        </section>
    </section>

    <section title="Manageability Considerations" toc="default">
    <t>TBD</t>
    </section>
    <section title="Security Considerations" toc="default">
    <t>TBD</t>
    </section>

    <section title="IANA Considerations" toc="default">
    <t>TBD</t>
    </section>
    <section title="Acknowledgements" toc="default">
    <t>This document borrows some of the structure and text from 
    <xref target="I-D.ietf-pce-stateful-sync-optimizations"/> and 
    <xref target="I-D.palle-pce-controller-labeldb-sync"/>, and 
    would like to thanks the authors and contributors of the document.
    </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
    <?rfc include="reference.RFC.2119.xml" ?>
    <?rfc include="reference.RFC.5440.xml" ?>
    <?rfc include="reference.I-D.ietf-pce-stateful-pce"?>
    <?rfc include="reference.I-D.zhao-pce-pcep-extension-for-pce-controller"?>
    
    
    <?rfc include="reference.I-D.li-pce-pcep-flowspec"?>
    </references>
    <references title="Informative References">
    <?rfc include="reference.I-D.ietf-pce-pce-initiated-lsp"?>
    <?rfc include="reference.I-D.ietf-pce-stateful-sync-optimizations"?>
    <?rfc include="reference.I-D.palle-pce-controller-labeldb-sync"?>
    </references>
<section title="Contributor Addresses" toc="default">
      <t><figure align="left" alt="" height="" suppress-title="false" title=""
          width="">
          <artwork align="left" alt="" height="" name="" type="" width=""
                   xml:space="preserve"><![CDATA[
Dhruv Dhody
Huawei Technologies
Divyashree Techno Park, Whitefield
Bangalore, Karnataka  560066
India
Email: dhruv.ietf@gmail.com

Udayasree Palle
Huawei Technologies
Divyashree Techno Park, Whitefield
Bangalore, Karnataka  560066
India
Email: udayasree.palle@huawei.com
        ]]></artwork>
        </figure></t>
    </section>
  </back>
</rfc>
