<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc symrefs="yes" ?>
<rfc ipr="trust200902"
     docName="draft-ietf-xrblock-rtcp-xt-discard-metrics-00.txt" category="std">
<!-- What is the category field value-->
<front>
    <title abbrev="RTCP XR Discard RLE">
         Real-time Transport Control Protocol Extension Report for Run Length Encoding of Discarded Packets
    </title>
    <author initials="J." surname="Ott" fullname="Joerg Ott">
      <organization>Aalto University</organization>
      <address>
	<postal>
          <street>Otakaari 5 A</street>
	  <city>Espoo</city> <region>FIN</region><code>02150</code>
	  <country>Finland</country>
 	</postal>
	<email>jo@comnet.tkk.fi</email>
      </address>
    </author>
    <author initials="I." surname="Curcio" fullname="Igor D.D. Curcio">
      <organization>Nokia Research Center</organization>
      <address>
	<postal>
          <street>P.O. Box 1000 (Visiokatu 1)</street>
	  <city>Tampere</city> <region>FIN</region><code>33721</code>
	  <country>Finland</country>
 	</postal>
	<email>igor.curcio@nokia.com</email>
      </address>
    </author>
    
	<author fullname="Varun Singh" initials="V" surname="Singh">
      <organization>Aalto University</organization>
      <address>
        <postal>
          <street>School of Science and Technology</street>
          <street>Otakaari 5 A</street>
          <city>Espoo</city>
          <region>FIN</region>
          <code>02150</code>
          <country>Finland</country>
        </postal>
        <email>varun@comnet.tkk.fi</email>
      </address>
    </author>

    <date year="2011" />
    <area>RAI</area>
    <workgroup>XR Block Working Group</workgroup>
    <keyword>RTP</keyword>
    <keyword>RTCP</keyword>
    <abstract>
      <t>
      The Real-time Transport Control Protocol (RTCP) is used in conjunction
      with the Real-time Transport Protocol (RTP) in to provide a variety of
      short-term and long-term reception statistics.  The available reporting
      may include aggregate information across longer periods of time as well
      as individual packet reporting.  This document specifies a per-packet
      report metric capturing individual packets discarded from the jitter
      buffer after successful reception.
      </t>
    </abstract>
</front>
<middle>

  <section title="Introduction">
    <t>
      <xref target="RFC3550">RTP</xref> provides a transport for real-time
      media flows such as audio and video together with the RTP control porotocl
      which provides periodic feedback about the media streams received in a specific
      duration.  In addition, RTCP can be used for timely feedback about individual
      events to report (e.g., packet loss) <xref target="RFC4585"/>.  Both long-term
      and short-term feedback enable a sender to adapt its media transmission and/or
      encoding dynamically to the observed path characteristics.
    </t>

    <t>
      <xref target="RFC3611">RFC3611</xref> defines RTCP eXtension Reports as a
      detailed reporting framework to provide more than just the coarse RR
      statistics.  The detailed reporting may enable a sender to react more
      appropriately to the observed networking conditions as these can be
      characterized better, albeit at the expense of extra overhead.
    </t>
    <t>
      Among many other fields, RFC3611 specifies the Loss RLE block which
      define runs of packets received and lost with the granularity of
      individual packets.  This can help both error recovery and path loss
      characterization.  In addition to lost packets, RFC 3611 defines the notion
      of "discarded" packets: packets that were received but dropped from the jitter
      buffer because they were either too early (for buffering) or too late
      (for playout).  This metric is part of the VoIP metrics report block even
      though it is not just applicable to audio: it is specified as the fraction
      of discarded packets since the beginning of the session.  See section 4.7.1
      of <xref target="RFC3611">RFC3611</xref>.
    </t>
    <t>
      Recently proposed extensions to the XR reporting suggest enhancing this
      discard metric:
      <list style="symbols">
	<t>
	  Reporting the number of discarded packets 
	  during either the last reporting interval or since the beginning of
	  the session, as indicated by a flag in the suggested XR report
	  <xref target="I-D.ietf-avt-rtcp-xr-discard"/>.
	</t>
	<t>
	  Reporting gaps and bursts of discarded packets during the last reporting
	  interval or cumulatively since the beginning of the session
	  <xref target="I-D.ietf-avt-rtcp-xr-burst-gap-discard"/>.
	</t>
      </list>
    </t>
    <t>
      However, none of these metrics allow a receiver to report precisely which
      packets were discarded.  While this information could in theory be derived
      from high-frequency reporting on the number of discarded packets or from the
      gap/burst report, these two mechanisms do not appear feasible: The former
      would require an unduly high amount of reporting which still might not be
      sufficient due to the non-deterministic scheduling of RTCP packets.  The
      latter incur significant complexity and reporting overhead and might still
      not deliver the desired accuracy.
    </t>
    <t>
      This document defines a discard report block following the idea of the
      run-length encoding applied for lost and received packets in RFC3611.
    </t>
    <t>
      Complementary to or instead of the indication which packets were lost,
      an XR block is defined to indicate the number of bytes lost, per interval
      or for the duration of the session, similar to other XR report blocks.
    </t>
</section>

<section title="Terminology" anchor="sec-terminology">
  <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">RFC 2119</xref> and indicate requirement
    levels for compliant implementations.
  </t>
  <t>
    The terminology defined in <xref target="RFC3550">RTP</xref> and
    in the extensions for XR reporting <xref target="RFC3611"/> applies.
  </t>
</section>

<section title="XR Discard RLE Report Block" anchor="spec">
  <t>
    The XR Discard RLE report block uses the same format as specified
    for the loss and duplicate report blocks in <xref target="RFC3611">RFC3611</xref>.
    Figure <xref target="packet-format-rle"/> recaps the packet format.
    The fields "BT", "T", "block length", "SSRC of source", "begin_seq", and "end_seq"
    SHALL have the same semantics and representation as defined in RFC3611.
    The "chunks" encoding the run length SHALL have the same representation
    as in RFC3611, but encode discarded packets.
  </t>
  <t>
    <figure anchor="packet-format-rle" title="XR Discard Report Block">
      <artwork><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     BT=DRLE   |rsvd |E|   T   |         block length          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        SSRC of source                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          begin_seq            |             end_seq           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          chunk 1              |             chunk 2           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   :                              ...                              :
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          chunk n-1            |             chunk n           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]></artwork>
    </figure>
  </t>
  <t>
    The 'E' bit is introduced to distinguish between packets discarded due
    to early arrival and those discarded due to late arrival.  The 'E' bit
    MUST be set to '1' if the chunks represent packets discarded due to
    too early arrival and MUST be set to '0' otherwise.
  </t>
  <t>
    In case both early and late discarded packets shall be reported,
    two Discard RLE report blocks MUST be included; their sequence
    number range MAY overlap, but individual packets MUST only be
    reported as either early or late.  Packets reported in both MUST
    be considered as discarded without further information available,
    packets reported in neither are considered to be properly received
    and not discarded.
  </t>
  <t>
    Discard RLE Report Blocks SHOULD be sent in conjunction with an RTCP RR
    as a compound RTCP packet.
  </t>
  <t>
    Editor's node: is it acceptable to use one of the 'reserved' bits for this
    purpose or should two block types be used?
  </t>
</section>
<section title="XR Bytes Discarded Report Block" anchor="spec-2">
  <t>
    The XR Bytes Discarded report block uses the following format which
    follows the model of the framework for performance metric development
    <xref target="I-D.ietf-pmol-metrics-framework"/>.
  </t>
  <t>
    <figure anchor="packet-format-bytes" title="XR Bytes Discarded Report Block">
      <artwork><![CDATA[
    0               1               2               3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     BT=BDR    |I|E|   resv    |       block length=2          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        SSRC of source                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                  number of bytes discarded                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>
    </figure>
  </t>
  <t>
      The Interval Metric flag (I) (1 bit)
      is used to indicate whether the Post-Repair Loss metric
      is an Interval or a Cumulative metric, that is, whether the
      reported value applies to the most recent measurement interval
      duration between successive metrics reports (I=1) (the Interval
      Duration) or to the accumulation period characteristic of
      cumulative measurements (I=0) (the Cumulative Duration).
      Numerical values for both these intervals are provided in the
      Measurement Identifier block referenced by the tag field below.
  </t>
  <t>
    The 'E' bit is introduced to distinguish between packets discarded due
    to early arrival and those discarded due to late arrival.  The 'E' bit
    MUST be set to '1' if the chunks represent packets discarded due to
    too early arrival and MUST be set to '0' otherwise.
    In case both early and late discarded packets shall be reported,
    two Bytes Discarded report blocks MUST be included.
  </t>
  <t>
    The 'number of bytes discarded' is a 32-bit unsigned integer value
    indicating the total number of bytes discarded (I=0) or the number of
    bytes discarded since the last RTCP XR Bytes Discarded block was sent.
  </t>
  <t>
    Bytes Discarded Report Blocks SHOULD be sent in conjunction with an RTCP RR
    as a compound RTCP packet.
  </t>
  <t>
    Editor's note: is it acceptable to use one of the 'reserved' bits for this
    purpose or should two block types be used?
  </t>
</section>

<section title="Protocol Operation" anchor="protocol">
  <t>
    This section describes the behavior of the reporting (= receiver) RTP node and
    the sender RTP node.
  </t>
  <section title="Reporting Node (Receiver)">
    <t>
      Transmission of RTCP XR Discard RLE Reports is up to the discretion
      of the receiver, as is the reporting granularity.  However, it is
      RECOMMENDED that the receiver signals all discarded packets using
      the method defined in this document.  If all packets over a reporting
      period were lost, the receiver MAY use the Discard Report Block
      <xref target="I-D.ietf-avt-rtcp-xr-discard"/> instead.  In case
      of limited available reporting bandwidth, it is up to the receiver
      whether or not to include RTCP XR Discard RLE reports or not.
    </t>
    <t>
      The receiver MAY send the Discard RLE Reports as part of the
      regularly scheduled RTCP packets as per RFC3550.  It MAY also
      include Discard RLE Reports in immediate or early feedback
      packets as per RFC4585.
    </t>
  </section>
  <section title="Media Sender">
    <t>
      The media sender MUST be prepared to operate without receiving any
      Discard RLE reports.  If Discard RLE reports are generated by the
      receiver, the sender cannot rely on all these reports being received,
      nor can the sender rely on a regular generation pattern from the 
      receiver side.
    </t>
    <t>
      However, if the sender receives any RTCP reports but no Discard RLE
      report blocks and is aware that the receiver supports Discard RLE
      report blocks, it MAY assume that no packets were discarded at the
      receiver.
    </t>
  </section>
</section>

<section title="SDP signaling" anchor="sdp">
  <t>
    The report blocks specified in this document define extensions to RTCP XR reporting.
    Whether or not this specific extended report is sent is left to the
    discretion of the receiver.  Its presence may enable better operation
    of the sender since more detailed information is available.  Not
    providing this information will make the sender rely on other 
    RTCP report metrics.
  </t>
  <t>
    A participant of a media session MAY use SDP to signal its support
    for this attribute.  In this case, the RTCP XR attribute as defined
    in <xref target="RFC3611">RFC3611</xref> MUST be used.  The SDP
    <xref target="RFC4566">RFC4566</xref> attribute 'xr-format'
    defined in RFC3611 is augmented as described in the following to indicate
    the discard metric.
  </t>
  <t>
    <artwork><![CDATA[
   rtcp-xr-attrib = "a=" "rtcp-xr" ":" [xr-format *(SP xr-format)] 
                    CRLF   ; defined in [RFC3611]
   
   xr-format       =/ xr-discard-rle
                    / xr-discard-bytes
   
   xr-discard-rle   = "discard-rle"
   xr-discard-bytes = "discard-bytes"
   ]]></artwork>
  </t>
  <t>
    The literal 'discard-rle' MUST be used to indicate support for the Discard
    RLE Report Block defined in section <xref target="spec"/>, the literal
    'discard-bytes' to indicate support for the Bytes Discarded Report Block
    defined in section <xref target="spec-2"/>
  </t>
  <t>
    For signaling support for the discard metric, the rules defined in
    RFC3611 apply.  Generally, senders and receivers SHOULD indicate
    this capability if they support this metric and would like to use
    it in the specific media session being signaled.  The receiver MAY decide
    not to send discard information unless it knows about the sender's
    support to save on RTCP reporting bandwidth. 
  </t>
  <t>
    A participant in a media session MAY use the two report blocks specified
    in this document without any explicit (SDP) signaling.
  </t>
</section>

<section title="Security Considerations" anchor="security">
  <t>
    The security considerations of RFC3550, RFC3611, and RFC4585 apply.
    Since this document offers only a more precide reporting for an
    already existing metric, no further security implications are foreseen.
  </t>
</section>


<section title="IANA Considerations" anchor="iana">
  <t>
    New block types for RTCP XR are subject to IANA registration.  For
    general guidelines on IANA considerations for RTCP XR, refer to
    <xref target="RFC3611">RFC3611</xref>.
  </t>
  <section title="XR Report Block Registration">
    <t>
      This document extends the IANA "RTCP XR Block Type Registry" by two
      new values: DRLE and BDR.
    </t>
    <t>
      [Note to RFC Editor: please replace DRLE and BDR with the IANA provided RTCP
      XR block type for this block here and in the diagrams above.]
    </t>
  </section>
  <section title="SDP Parameter Registration">
    <t>
      This document registers two new parameters for the Session Description
      Protocol (SDP), "discard-rle" and "discard-bytes", in the "RTCP XR SDP
      Parameters Registry".
    </t>
  </section>
  <section title="Contact information for IANA registrations">
    <t>
      Joerg Ott (jo@comnet.tkk.fi)
    </t>
    <t>
      Aalto University Comnet, Otakaari 5A, 02150 Espoo, Finland.
    </t>
  </section>
</section>

</middle>
<back>

    <references title="Normative References"> 
      <?rfc include="reference.RFC.2119" ?>
      <?rfc include="reference.RFC.3550" ?>
      <?rfc include="reference.RFC.3551" ?>
      <?rfc include="reference.RFC.4585" ?>
      <?rfc include="reference.RFC.4566" ?>
      <?rfc include="reference.RFC.3611" ?>
      <?rfc include="reference.RFC.5760.xml" ?>
      <?rfc include="reference.I-D.ietf-avt-rtcp-xr-discard.xml" ?>
      <?rfc include="reference.I-D.ietf-avt-rtcp-xr-burst-gap-discard.xml" ?>
      <?rfc include="reference.I-D.ietf-pmol-metrics-framework.xml" ?>
    </references>
  </back>

</rfc>

<!-- LocalWords: xref CDATA  -->
