Aller au contenu principal

2.3.1. Credit Window Initialization

This page preserves the original RFC text for the section and adds navigation metadata for the documentation site.

Original RFC Text​

2.3.1.  Credit Window Initialization

   As noted above, the Credit Window Initialization Data Item is used by
   a modem to identify a credit window and set its size.  In order to
   avoid errors caused by the use of undefined FIDs or uninitialized
   credit windows, this Data Item SHOULD be included in any Session
   Initialization Response Message that indicates support for any such
   extension.  Updates to previously identified credit windows or new
   credit windows MAY be sent by a modem by including the Data Item in
   Session Update Messages.  More than one Data Item MAY be included in
   a message to provide information on multiple credit windows.

   The Credit Window Initialization Data Item identifies a credit window
   using a FID.  It also provides the size of the identified credit
   window.  To be used, a FID must be defined within a Traffic
   Classification Data Item, and the associated TID must be provided via
   a Credit Window Association Data Item.

   The format of the Credit Window Initialization Data Item is as
   follows:

        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
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       | Data Item Type                | Length (16)                   |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       | Flow Identifier (FID)         |            Reserved           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                         Credit Value                          |
       |                                                               |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |    Scale      |         Credit Window Max Size                |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Data Item Type:
      30

   Length:
      16

      As specified in [RFC8175], Length is the number of octets in the
      Data Item.  It MUST be equal to sixteen (16).  If it is some other
      value, the Data Item is corrupt, so the message in which it
      appears cannot be reliably parsed and is ignored.

   Flow Identifier (FID):
      A 2-octet flow identifier as defined by the Traffic Classification
      Data Item [RFC9892].  The FID also uniquely identifies a credit
      window for a specific DLEP session.

   Reserved:
      For the Credit Window Initialization Data Item, this reserved
      field is currently unused.  It MUST be set to all zeros for this
      version of the Data Item and is currently ignored on reception.
      This allows for future extensions of the Data Item if needed.

   Credit Value:
      A 64-bit unsigned integer representing the credits, in octets, to
      be added to the credit window.  This value includes MAC headers as
      seen on the link between the modem and router.

   Scale:
      An 8-bit unsigned integer indicating the scale used in the Credit
      Window Max Size field.  The valid values are as follows:

      +=======+=========================+
      | Value |          Scale          |
      +=======+=========================+
      | 0     | B: Bytes (Octets)       |
      +-------+-------------------------+
      | 1     | KB: Kilobytes (B/1024)  |
      +-------+-------------------------+
      | 2     | MB: Megabytes (KB/1024) |
      +-------+-------------------------+
      | 3     | GB: Gigabytes (MB/1024) |
      +-------+-------------------------+

       Table 1: Valid Scale Field Values

   Credit Window Max Size:
      A 24-bit unsigned integer representing the maximum size, in the
      octet scale indicated by the Scale field, of the associated credit
      window.

   A router that receives a Credit Window Initialization Data Item MUST
   ensure that the FID field value has been provided by the modem in a
   Traffic Classification Data Item carried in either the current
   message or a previous message.  If the FID cannot be found, the
   router SHOULD log this information.  The method of logging is left to
   the router implementation.  Note that no traffic will be associated
   with the credit window in this case.  After FID validation, the
   router MUST locate the credit window that is associated with the FID
   indicated in each received Data Item.  If no associated credit window
   is found, the router MUST initialize a new credit window using the
   values carried in the Data Item.  When an associated credit window is
   found, the router MUST update the credit window and associated data
   plane state using the values carried in the Data Item.  If the
   resultant credit value results in the credit window exceeding the
   represented Credit Window Max Size, the Credit Window Max Size field
   value is used as the new credit window size.

   It is worth noting that such updates can result in a credit window
   size being reduced -- for example, due to a transmission rate change
   on the modem.  After sending the Session Update Message with one or
   more Credit Window Initialization Data Items that decrease the Credit
   Window Max Size, the modem SHOULD continue processing received
   packets that match the indicated FIDs, fit within the window for the
   unmodified Credit Window Max Size, and arrive before the modem
   receives the corresponding Session Update Response Message.  The
   modem SHOULD NOT issue additional credits for any affected FID until
   that FID's associated window has drained to be less than the new
   Credit Window Max Size, regardless of when the corresponding Session
   Update Response Message is received.