<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?rfc toc='yes'?>
<?rfc compact='yes' ?>
<?rfc subcompact='no' ?>
<?rfc rfcedstyle="yes" ?>
<?rfc symrefs="yes" ?>

<!--v1 used-->

<rfc category="std"
     ipr="trust200902"
     number="7053"
     updates="4960" submissionType="IETF" consensus="yes">
<front>
<title abbrev='SACK-IMMEDIATELY'>
SACK-IMMEDIATELY Extension for the Stream Control Transmission Protocol
</title>


<!-- ************** MICHAEL TUEXEN *************** -->
<author initials='M.' surname='Tuexen' fullname='Michael Tuexen'>
<organization abbrev='Muenster Univ. of Appl. Sciences'>
              Muenster University of Applied Sciences</organization>
<address>
    <postal>
        <street>Stegerwaldstr. 39</street>
        <city>48565 Steinfurt</city>
        <country>DE</country>
    </postal>
    <email>tuexen@fh-muenster.de</email>
</address>
</author>

<!-- *************** IRENE RUENGELER ***************** -->
<author initials='I.' surname='Ruengeler' fullname='Irene Ruengeler'>
<organization abbrev='Muenster Univ. of Appl. Sciences'>
              Muenster University of Applied Sciences</organization>
<address>
    <postal>
        <street>Stegerwaldstr. 39</street>
        <city>48565 Steinfurt</city>
        <country>DE</country>
    </postal>
    <email>i.ruengeler@fh-muenster.de</email>
</address>
</author>

<!-- ************** RANDALL STEWART ***************-->
<author initials='R. R.' surname='Stewart' fullname='Randall R. Stewart'>
<organization>Adara Networks</organization>
<address>
    <postal>
        <street></street>
        <street></street>
        <city>Chapin</city> <region>SC</region>
        <code>29036</code>
        <country>US</country>
    </postal>
    <email>randall@lakerest.net</email>
</address>
</author>

<date month="October" year="2013"/>

<!-- [rfced] Please insert any keywords (beyond those that appear in 
the title) for use on http://www.rfc-editor.org/search/rfc_search.php. -->

<keyword>example</keyword>


<abstract>
<t>This document updates RFC 4960 by defining a method for the sender of a
DATA chunk to indicate that the corresponding Selective Acknowledgment (SACK) chunk should be sent
back immediately and should not be delayed.

<!-- [rfced] We notice in RFC 4690, bit names U bit (U)nordered bit, B bit
(B)eginning fragment bit, E bit (E)nding fragment bit. Should I-bit in this doc
be expanded (I)mmediate bit? 

Also, please note that instances of "I-bit" have been updated to reflect "I 
bit" (no hyphen) - to match the IANA registry 
(http://www.iana.org/assignments/sctp-parameters) and RFC 4960.  In addition, 
no hyphen is more common within the RFC series.  Please let us know
any objections. 

-->

It is done by specifying a bit in the DATA chunk header, called the (I)mmediate
bit, which can get set by either the Stream Control Transmission
Protocol (SCTP) implementation or the application using an SCTP stack.
Since unknown flags in chunk headers are ignored by SCTP implementations,
this extension does not introduce any interoperability problems.</t>
</abstract>
</front>

<middle>

<section title='Introduction'>
<t>According to <xref target='RFC4960'/>, the receiver of a DATA
chunk should use delayed SACKs. This delay is completely controlled by
the receiver of the DATA chunk and remains the default behavior.</t>
<t>In specific situations, the delaying of SACKs results in
reduced performance of the protocol:
<list style='numbers'>
<t>If such a situation can be detected by the receiver, the corresponding
SACK can be sent immediately.
For example, <xref target='RFC4960'/> recommends immediately sending the SACK if the
receiver has detected message loss or message duplication.</t>
<t>However, if the situation can only be detected by the sender of
the DATA chunk, <xref target='RFC4960'/> provides no method
of avoiding a delay in sending the SACK.
Examples of these situations include ones that require interaction with the
application (e.g., applications using the SCTP_SENDER_DRY_EVENT,
see <xref target='use_cases_app'/>)
and ones that can be detected by the SCTP stack itself (e.g., closing the
association, hitting window limits, or resetting streams,
see <xref target='use_cases_sctp'/>).</t>
</list></t>
<t>To overcome the limitation described in the second case,
this document describes a simple extension of the SCTP DATA chunk
by defining a new flag, the "I bit".
By setting this bit, the sender of a DATA chunk indicates 
that the corresponding SACK chunk should not be delayed.</t>
</section>

<section title='Conventions'>
<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 title='The (I)mmediate Bit in the DATA Chunk Header'>
<t><xref target='ext_data_chunk'/> shows the extended DATA chunk.</t>
<figure title='Extended DATA chunk format'
        anchor='ext_data_chunk'>
<artwork>
 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 = 0    |  Res  |I|U|B|E|           Length              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              TSN                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Stream Identifier      |     Stream Sequence Number    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  Payload Protocol Identifier                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\                                                               \
/                           User Data                           /
\                                                               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
<t>The only difference between the DATA chunk in
<xref target='ext_data_chunk'/> and the DATA chunk defined in
<xref target='RFC4960'/> is the addition of the I bit in the flags
field of the DATA chunk header.</t>

<t><xref target='RFC4960'/> defines the Reserved field and specifies that these
bits should be set to 0 by the sender and ignored by the receiver.
</t>

</section>

<section title='Use Cases'
         anchor='use_cases'>
<t>The setting of the I bit can either be triggered by the application
using SCTP or by the SCTP stack itself. The following two subsections
provide a non-exhaustive list of examples of how the I bit may be set.</t>

<section title='Triggering at the Application Level'
         anchor='use_cases_app'>
<t>One example of a situation in which it may be desirable for
an application to trigger the setting of the I bit involves the
SCTP_SENDER_DRY_EVENT in the SCTP socket API <xref target='RFC6458'/>.
Upper layers of SCTP that use the socket API as defined in <xref target='RFC6458'/> may
subscribe to the SCTP_SENDER_DRY_EVENT to be notified as soon as no user data
is outstanding.  To avoid an unnecessary delay, the application can request
that the I bit be set when sending the last user message before waiting for the
event. This results in setting the I bit of
the last DATA chunk corresponding to the user message; this is possible
using the extension of the socket API described in <xref target='api'/>.</t>
</section>

<section title='Triggering at the SCTP Level'
         anchor='use_cases_sctp'>
<t>There are also situations in which the SCTP implementation
can set the I bit without interacting with the upper layer.</t>
To avoid an unnecessary delay while waiting for such an event, the application
can request the setting of the I bit when sending the last user message
<t>If the association is in the SHUTDOWN-PENDING state, setting the I bit
reduces the number of simultaneous associations for a busy server handling
short-lived associations.</t>
<t>Another case is where the sending of a DATA chunk fills the
congestion or receiver window. Setting the I bit in these cases
improves the throughput of the transfer.</t>
<t>If an SCTP association supports the SCTP Stream Reconfiguration extension
defined in <xref target='RFC6525'/>, the performance can be improved by
setting the I bit when there are pending reconfiguration requests
that require that there be no outstanding DATA chunks.</t>
</section>
</section>

<section title='Procedures'>
<section title='Sender-Side Considerations'>
<t>Whenever the sender of a DATA chunk can benefit from the corresponding
SACK chunk being sent back without delay, the sender MAY set the I bit
in the DATA chunk header. Please note that why the sender has set the I bit is
irrelevant to the receiver.</t>

<t>Reasons for setting the I bit include, but are not limited to
(see <xref target='use_cases'/> for the benefits):
<list style='symbols'>
<t>The application requests to set the I bit of the last DATA chunk
   of a user message when providing the user message to the
   SCTP implementation (see <xref target='api'/>).</t>
<t>The sender is in the SHUTDOWN-PENDING state.</t>
<t>The sending of a DATA chunk fills the congestion or receiver window.</t>
<t>The sending of an Outgoing SSN Reset Request Parameter or an
   SSN/TSN Reset Request Parameter is pending, if the association
   supports the Stream Reconfiguration extension defined in
   <xref target='RFC6525'/>.</t>
</list>
</t>
</section>

<section title='Receiver Side Considerations'>
<t>Upon receipt of an SCTP packet containing a DATA chunk with the I bit set,
the receiver SHOULD NOT delay the sending of the corresponding SACK chunk, i.e.,
the receiver SHOULD immediately respond with the corresponding SACK chunk.</t>
</section>
</section>

<section title='Interoperability Considerations'>
<t>According to <xref target='RFC4960'/>, the receiver of a DATA chunk with
the I bit set should ignore this bit when it does not support the extension
described in this document. Since the sender of the DATA chunk is
able to handle this case, there is no requirement for negotiating
the support of the feature described in this document.

<!-- [rfced] The following sentence is a bit tough to parse.  Please consider 
whether the suggested text correctly conveys the intended meaning.

Original:
   Since the sender of the DATA chunk is
   able to handle this case, there is no requirement for negotiating the
   support of the feature described in this document.

Suggested: 
   Since the sender of the DATA chunk is
   able to handle this case, support of the I bit is not required.
-->

</t>
</section>

<section title='Socket API Considerations'
         anchor='api'>
<t>This section describes how the socket API defined in
<xref target='RFC6458'/> is extended
to provide a way for the application to set the I bit.</t>
<t>Please note that this section is informational only.</t>
<t>A socket API implementation based on <xref target='RFC6458'/>
needs to be extended to allow the application to set the I bit of the last DATA
chunk when sending each user message.</t>
<t>This can be done by setting a flag called SCTP_SACK_IMMEDIATELY
in the snd_flags field of the struct sctp_sndinfo structure when using
sctp_sendv() or sendmsg().
If the deprecated struct sctp_sndrcvinfo structure is used instead
when calling sctp_send(), sctp_sendx(), or sendmsg(), the SCTP_SACK_IMMEDIATELY
flag can be set in the sinfo_flags field. When using the deprecated function
sctp_sendmsg(), the SCTP_SACK_IMMEDIATELY flag can be in the flags parameter.</t>
</section>

<section title='IANA Considerations'>

<t>Following the chunk flag registration procedure defined in
<xref target='RFC6096'/>, IANA has registered a new bit, the I bit, for
the DATA chunk.</t>
<t>The "Chunk Flags" registry for SCTP has been updated as described in the
following table.</t>
<texttable>
<preamble>DATA Chunk Flags</preamble>
<ttcol align='left'>Chunk Flag Value</ttcol>
<ttcol align='left'>Chunk Flag Name</ttcol>
<ttcol align='left'>Reference</ttcol>
<c>0x01</c> <c>E bit     </c> <c>[RFC4960]</c>
<c>0x02</c> <c>B bit     </c> <c>[RFC4960]</c>
<c>0x04</c> <c>U bit     </c> <c>[RFC4960]</c>
<c>0x08</c> <c>I bit     </c> <c>[RFC7053]</c>
<c>0x10</c> <c>Unassigned</c> <c>         </c>
<c>0x20</c> <c>Unassigned</c> <c>         </c>
<c>0x40</c> <c>Unassigned</c> <c>         </c>
<c>0x80</c> <c>Unassigned</c> <c>         </c>
</texttable>
</section>

<section title='Security Considerations'>
<t>See <xref target='RFC4960'/> for general security considerations for SCTP.
In addition,  a malicious sender can force its peer to send packets
containing a SACK chunk for each received packet containing DATA chunks instead
of every other received packet containing DATA chunks.
This could impact the network, resulting in more packets sent on the network,
or the peer, because the generating and sending of the packets has some
processing cost.
However, the additional packets can only contain the simplest SACK chunk
(no gap reports, no duplicate TSNs), since in cases of packet drops or
reordering in the network a SACK chunk would be sent immediately anyway. Therefore,
this does not introduce a significant additional processing cost on the
receiver side. This also
does not result in more traffic in the network, because a receiver sending a
SACK for every packet is already permitted.
</t>
</section>

<section title='Acknowledgments'
         anchor='acks'>
<t>The authors wish to thank
Mark Allmann,
Brian Bidulock,
David Black,
Anna Brunstrom,
Gorry Fairhurst,
Janardhan Iyengar,
Kacheong Poon,
and Michael Welzl
for their invaluable comments.</t>
</section>

</middle>

<back>
<references title='Normative References'>
<?rfc include='reference.RFC.2119' ?>
<?rfc include='reference.RFC.4960' ?>
<?rfc include='reference.RFC.6096' ?>
</references>
<references title='Informative References'>
<?rfc include='reference.RFC.6458' ?>
<?rfc include='reference.RFC.6525' ?>
</references>
</back>
</rfc>
