RFC 7097

RTP Control Protocol (RTCP) Extended Report (XR) for RLE of Discarded Packets

๐Ÿ“… published January 2014, from ietf

RTP Control Protocol (RTCP) Extended Report (XR) for RLE of Discarded Packets ๐ŸŽ€

okay bestie, this is RFC 7097 and it is so good ๐Ÿ˜ญ๐Ÿ’– It's a spec for a per-packet "these exact packets got tossed" report, and it lives inside RTCP.

  • Request for Comments: 7097 ๐Ÿฆ‹
  • Category: Standards Track โœจ
  • ISSN: 2070-1721
  • Date: January 2014 ๐Ÿ“…
  • Published by: Internet Engineering Task Force (IETF)
  • Authors: J. Ott, V. Singh (Ed.) (affiliation: Aalto University), and I. Curcio (affiliation: Nokia Research Center) ๐Ÿ‘‘
  • Obsoletes: none listed in the title block
  • Updates: none listed in the title block

Nothing in the header says it replaces or updates another RFC, so this one is standing on its own, iconic ๐Ÿ’…


Abstract โœจ

okay so RTCP works with RTP to give you all kinds of reception stats ๐Ÿ“Š some are short-term, some are long-term, and the report can cover big time windows or individual packets ๐ŸŒธ this doc adds a per-packet report metric that captures individual packets that got yeeted from the de-jitter buffer after they were successfully received ๐Ÿ™ˆ


Status of This Memo ๐ŸŒˆ

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7097.


Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. 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.


Table of Contents ๐Ÿ—บ๏ธ

1. Introduction ....................................................3
2. Terminology .....................................................4
3. RTCP XR Discard RLE Report Block ................................4
4. Protocol Operation ..............................................6
   4.1. Reporting Node (Receiver) ..................................6
   4.2. Media Sender ...............................................6
5. SDP Signaling ...................................................6
6. Security Considerations .........................................7
7. IANA Considerations .............................................7
   7.1. XR Report Block Registration ...............................7
   7.2. SDP Parameter Registration .................................8
   7.3. Contact Information for IANA Registrations .................8
8. Acknowledgments .................................................8
9. References ......................................................8
   9.1. Normative References .......................................8
   9.2. Informative References .....................................9
Appendix A. Metrics Represented Using the Template from RFC 6390 ..10

1. Introduction ๐ŸŽ€

okay so RTP [RFC3550] handles transport for real-time media like audio and video ๐ŸŽง๐Ÿ“น and its buddy RTCP gives periodic feedback about the streams being received over a given duration โฑ๏ธ RTCP can also send timely feedback about individual events, like packet loss [RFC4585] ๐Ÿ˜ฌ both the long-term and short-term feedback let a media sender tweak how it sends and encodes media so it fits the path it's actually on ๐Ÿ’…

RFC 3611 [RFC3611] defines RTCP Extended Reports ๐Ÿ“‘ it's a detailed reporting framework that goes way beyond the coarse Receiver Report (RR) stats ๐Ÿค“ more detail means a media sender can react better to network conditions, since they can be characterised more accurately, but it comes with extra overhead, so it's a trade-off โš–๏ธ

Among a bunch of other report blocks, RFC 3611 specifies the Loss Run Length Encoding (RLE) block ๐Ÿงถ it reports runs of packets that were received and runs that were lost, with individual-packet granularity ๐Ÿ”ฅ this can help with error recovery and with characterising path loss ๐Ÿซถ on top of lost packets, RFC 3611 also defines "discarded" packets: packets that were received but got dropped from the de-jitter buffer because they were either too early (for buffering) or too late (for playout) ๐Ÿ™ƒ the "discard rate" metric lives in the Voice over IP (VoIP) metrics report block, even though it's not just for audio ๐ŸŽถ it's specified as the fraction of discarded packets since the beginning of the session (see Section 4.7.1 of RFC 3611 [RFC3611]) โœจ the discard metric is believed to be applicable to a large class of RTP applications that use a de-jitter buffer [RFC5481] ๐ŸŒธ

Some extensions to the Extended Reports (XRs) have been proposed recently to level up this discard metric ๐Ÿ“ˆ

  • Reporting the number of discarded packets in a measurement interval, i.e., either during the last reporting interval or since the beginning of the session, as indicated by a flag in the suggested XR [RFC7002]. If an endpoint needs to report packet discard due to reasons other than early and late arrival (for example, discard due to duplication, redundancy, etc.), then it should consider using the Discarded Packets report block [RFC7002].
  • Reporting gaps and bursts of discarded packets during a measurement interval, i.e., the last reporting interval or the duration of the session [RFC7003].
  • Reporting the sum of payload bytes discarded during a measurement interval, i.e., the last reporting interval or the duration of the session [DISCARD-METRIC].

BUT none of these metrics let a receiver report exactly which packets got discarded ๐Ÿ˜ญ you could maybe derive it from high-frequency reporting on the number of discarded packets [RFC7002] or from the gap/burst report [RFC7003], but those two don't really seem feasible ๐Ÿ™…โ€โ™€๏ธ the first would need an unreasonably high amount of reporting, and it still might not be enough because RTCP packet scheduling is non-deterministic ๐ŸŽฒ the second adds significant complexity and reporting overhead and might still not deliver the accuracy you want ๐Ÿ’€

So this document defines a discard report block that follows the same run-length encoding idea used for lost and received packets in [RFC3611] ๐Ÿ’–


2. Terminology ๐Ÿ“š

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, RFC 2119 [RFC2119].

The terminology defined in RTP [RFC3550] and in the extensions for XR reporting [RFC3611] applies.


3. RTCP XR Discard RLE Report Block ๐Ÿง

The RTCP XR Discard RLE report block uses the same format as specified for the loss and duplicate report blocks in RFC 3611 [RFC3611] ๐ŸŽ€ Figure 1 shows the packet format. The fields "BT", "T", "block length", "SSRC of source", "begin_seq", and "end_seq" have the same semantics and representation as defined in [RFC3611], with one addition: the "E" flag, which tells you the reason for the discard ๐Ÿซถ the "chunks" that encode the run length have the same representation as in RFC 3611, but they encode discarded packets ๐Ÿ—‘๏ธ a definition of a discarded packet is given in RFC 7002 [RFC7002] ๐Ÿ”

       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=25     |rsvd |E|   T   |         block length          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        SSRC of source                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          begin_seq            |             end_seq           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          chunk 1              |             chunk 2           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      :                              ...                              :
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          chunk n-1            |             chunk n           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 1: RTCP XR Discard RLE Report Block ๐Ÿ“ธ

Block Type (BT, 8 bits): a Discard RLE report block is identified by the constant 25 ๐Ÿ”ข

rsvd (3 bits): this field is reserved for future definition ๐Ÿ”ฎ until something gets defined there, the bits in this field MUST be set to zero and MUST be ignored by the receiver ๐Ÿ™…โ€โ™€๏ธ

The 'E' bit exists to tell apart packets discarded due to early arrival from those discarded due to late arrival ๐Ÿ•ฐ๏ธ the 'E' bit is set to '1' if the chunks represent packets discarded due to arriving too early, and it's set to '0' otherwise โœ…

If both early and late discarded packets shall be reported, two Discard RLE report blocks MUST be included ๐Ÿ“ฆ๐Ÿ“ฆ their sequence number ranges MAY overlap, but individual packets MUST only be reported as either early or late, and they must not appear marked in both ๐Ÿšซ if packets show up in both report blocks, the conflicting packets will be ignored ๐Ÿ—‘๏ธ packets not reported in either block are considered properly received and not discarded ๐Ÿฅณ

Discard RLE report blocks SHOULD be sent in conjunction with an RTCP RR as a compound RTCP packet ๐Ÿงฉ


4. Protocol Operation ๐ŸŽฌ

This section describes the behavior of the reporting node (= media receiver) and the media sender ๐Ÿ’•

4.1. Reporting Node (Receiver) ๐Ÿ“ก

Sending RTCP XR Discard RLE report blocks is up to the discretion of the media receiver, and so is the reporting granularity ๐ŸŽ›๏ธ however, it is RECOMMENDED that the media receiver signal all discarded packets using the method defined in this document ๐Ÿ’… if all packets over a reporting period are discarded, the media receiver MAY use the Discard Report Block [RFC7002] instead ๐Ÿคทโ€โ™€๏ธ if reporting bandwidth is limited, it's up to the receiver whether or not to include RTCP XR Discard RLE report blocks ๐Ÿซ 

The media receiver MAY send the Discard RLE report blocks as part of the regularly scheduled RTCP packets, as per RFC 3550 ๐Ÿ—“๏ธ it MAY also include Discard RLE report blocks in immediate or early feedback packets, as per RFC 4585 โšก

4.2. Media Sender ๐ŸŽ™๏ธ

The media sender MUST be prepared to operate without receiving any Discard RLE report blocks ๐Ÿซถ if the media receiver does generate Discard RLE report blocks, the media sender cannot rely on all of those reports arriving, and it also can't rely on a regular generation pattern from the media receiver ๐ŸŒ€

However, if the media sender receives RTCP XR reports but the reports contain no Discard RLE report blocks, and it knows the media receiver supports Discard RLE report blocks, it MAY assume that no packets were discarded at the media receiver ๐Ÿฅฐ

5. SDP Signaling ๐Ÿ“ฃ

Participants in a media session MAY use SDP to say "hey, I support this report block" ๐Ÿ™Œ, or they can just use it without any signaling beforehand (see Section 5 of RFC 3611 [RFC3611]).

When it comes to SDP, the RTCP XR attribute from RFC 3611 [RFC3611] MUST be used ๐Ÿ’…. The SDP [RFC4566] attribute xr-format from RFC 3611 gets a little glow-up so it can flag the discard RLE metric โœจ.

   rtcp-xr-attrib = "a=" "rtcp-xr" ":" [xr-format *(SP xr-format)]
                    CRLF   ; defined in [RFC3611]

   xr-format      =/ xr-discard-rle

   xr-discard-rle = "discard-rle"

The discard-rle parameter is how you say you support the Discard RLE report block from Section 3 ๐Ÿฆ‹.

When SDP shows up in an Offer/Answer situation, the mechanism RFC 3611 [RFC3611] defines for unilateral rtcp-xr attribute parameters applies (see Section 5.2 of RFC 3611 [RFC3611]) ๐ŸŒธ.


6. Security Considerations ๐Ÿšจ

Okay bestie, this one is serious, so read it carefully ๐Ÿ˜ญ๐Ÿ”’.

The Discard RLE report block gives per-packet statistics, so the confidentiality risk spelled out in Section 7, Paragraph 3, of RFC 3611 [RFC3611] applies ๐Ÿ’€. In some situations, sending back really detailed error info (like over-range measurement or measurement unavailable) with this report block can hand an attacker insight into the security processing ๐Ÿ™ˆ. Implementers should consider the guidance in [NO-SRTP] for using appropriate security mechanisms. That means that where security is a concern, the implementation should apply encryption and authentication to the report block ๐Ÿ”. For example, you can do this by pairing the AVPF profile with the Secure RTP profile from RFC 3711 [RFC3711]. An appropriate combo of the two profiles (an "SAVPF") is specified in RFC 5124 [RFC5124] ๐Ÿ’œ. Other mechanisms also exist [SRTP-OPTIONS] and might be more suitable, so don't just stop here ๐Ÿ‘‘.

Additionally, the security considerations of RFC 3550 [RFC3550], RFC 3611 [RFC3611], and RFC 4585 [RFC4585] apply too ๐Ÿซถ.


7. IANA Considerations ๐Ÿ“‹

New block types for RTCP XR are subject to IANA registration ๐Ÿงš. For general guidelines on IANA considerations for RTCP XR, refer to RFC 3611 โœจ.

7.1. XR Report Block Registration

This document extends the IANA "RTP Control Protocol Extended Reports (RTCP XR) Block Type Registry" by assigning value 25 to DRLE (Discard RLE Report) ๐ŸŒˆ.

7.2. SDP Parameter Registration

This document registers 'discard-rle' in the "RTCP XR SDP Parameters" ๐Ÿ“.

7.3. Contact Information for IANA Registrations

   Joerg Ott (jo@comnet.tkk.fi)

   Aalto University Comnet, Otakaari 5A, 02150 Espoo, Finland.

8. Acknowledgments ๐Ÿซถ

The authors would like to thank Alan Clark, Roni Even, Sam Hartman, Colin Perkins, Dan Romascanu, Dan Wing, and Qin Wu ๐ŸŒˆ๐Ÿ’– for giving valuable feedback on earlier draft versions of this document. Iconic behaviour, honestly ๐Ÿ‘‘.


9. References ๐Ÿ“š

9.1. Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
              Jacobson, "RTP: A Transport Protocol for Real-Time
              Applications", STD 64, RFC 3550, July 2003.

   [RFC3611]  Friedman, T., Caceres, R., and A. Clark, "RTP Control
              Protocol Extended Reports (RTCP XR)", RFC 3611, November
              2003.

   [RFC4585]  Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey,
              "Extended RTP Profile for Real-time Transport Control
              Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, July
              2006.

   [RFC4566]  Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
              Description Protocol", RFC 4566, July 2006.

   [RFC7002]  Clark, A., Zorn, G., and Q. Wu, "RTP Control Protocol
              (RTCP) Extended Report (XR) Block for Discard Count Metric
              Reporting", RFC 7002, September 2013.

9.2. Informative References

   [RFC7003]  Clark, A., Huang, R., and Q. Wu, "RTP Control Protocol
              (RTCP) Extended Report (XR) Block for Burst/Gap Discard
              Metric Reporting", RFC 7003, September 2013.

   [RFC5481]  Morton, A. and B. Claise, "Packet Delay Variation
              Applicability Statement", RFC 5481, March 2009.

   [RFC3711]  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
              Norrman, "The Secure Real-time Transport Protocol (SRTP)",
              RFC 3711, March 2004.

   [RFC5124]  Ott, J. and E. Carrara, "Extended Secure RTP Profile for
              Real-time Transport Control Protocol (RTCP)-Based Feedback
              (RTP/SAVPF)", RFC 5124, February 2008.

   [NO-SRTP]  Perkins, C. and M. Westerlund, "Securing the RTP Protocol
              Framework: Why RTP Does Not Mandate a Single Media
              Security Solution", Work in Progress, October 2013.

   [SRTP-OPTIONS]
              Westerlund, M. and C. Perkins, "Options for Securing RTP
              Sessions", Work in Progress, November 2013.

   [DISCARD-METRIC]
              Singh, V., Ed., Ott, J., and I. Curcio, "RTP Control
              Protocol (RTCP) Extended Report (XR) for Bytes Discarded
              Metric", Work in Progress, November 2013.

Appendix A. Metrics Represented Using the Template from RFC 6390 ๐Ÿงพ

a. RLE of Discarded RTP Packets Metric

  • Metric Name: RLE - Run-length encoding of Discarded RTP Packets Metric.
  • Metric Description: Instances of RTP packets discarded over the period covered by this report.
  • Method of Measurement or Calculation: See Section 3 for the definition of Discard RLE, and Section 4.1 of RFC 3611 for RLE.
  • Units of Measurement: Every RTP packet in the interval is reported as discarded or not. See Section 3 for the definition.
  • Measurement Point(s) with Potential Measurement Domain: The measurement of these metrics is made at the receiving end of the RTP stream.
  • Measurement Timing: Each RTP packet between a beginning sequence number (begin_seq) and ending sequence number (end_seq) is reported as discarded or not. See Section 3 for the definition of Discard RLE.
  • Use and applications: See Section 1, paragraph 1.
  • Reporting model: See RFC 3611.

Authors' Addresses ๐Ÿ–Š๏ธ

   Joerg Ott
   Aalto University
   School of Electrical Engineering
   Otakaari 5 A
   Espoo, FIN  02150
   Finland

   EMail: jo@comnet.tkk.fi


   Varun Singh (editor)
   Aalto University
   School of Electrical Engineering
   Otakaari 5 A
   Espoo, FIN  02150
   Finland

   EMail: varun@comnet.tkk.fi
   URI:   http://www.netlab.tkk.fi/~varun/


   Igor D.D. Curcio
   Nokia Research Center
   P.O. Box 1000 (Visiokatu 3)
   Tampere, FIN  33721
   Finland

   EMail: igor.curcio@nokia.com
๐Ÿ“ฆ where this page comes from