<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/diameter/src/transport, branch KennethL-patch-1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Merge branch 'anders/diameter/sctp/OTP-10889' into maint</title>
<updated>2017-09-18T13:20:47+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-09-18T13:20:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=445ed7f183e40186f44b0af3c4b19bd65262c9a0'/>
<id>445ed7f183e40186f44b0af3c4b19bd65262c9a0</id>
<content type='text'>
* anders/diameter/sctp/OTP-10889:
  Make unordered delivery configurable
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/sctp/OTP-10889:
  Make unordered delivery configurable
</pre>
</div>
</content>
</entry>
<entry>
<title>Make unordered delivery configurable</title>
<updated>2017-09-17T14:54:28+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-09-14T10:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d38295257c5309e7291487edfacdfad605eec3e9'/>
<id>d38295257c5309e7291487edfacdfad605eec3e9</id>
<content type='text'>
Changing the default in the parent commit is possibly a bit dangerous,
even if the motivation still holds. Take a step back and make unordered
delivery a matter of configuration, without changing the default:
configuration is {unordered, boolean() | pos_integer()}, with false the
default, and N equivalent to OS =&lt; N, where OS is the number of outbound
streams negotiated on the association in question.

A user can mess with this by configuring an sctp_default_send_param of
their own, but unordered sending is them from start, not only after the
second message reception.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changing the default in the parent commit is possibly a bit dangerous,
even if the motivation still holds. Take a step back and make unordered
delivery a matter of configuration, without changing the default:
configuration is {unordered, boolean() | pos_integer()}, with false the
default, and N equivalent to OS =&lt; N, where OS is the number of outbound
streams negotiated on the association in question.

A user can mess with this by configuring an sctp_default_send_param of
their own, but unordered sending is them from start, not only after the
second message reception.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/sctp/OTP-10889' into maint</title>
<updated>2017-09-03T11:31:40+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-09-03T11:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=58d6f069744d9528a5059b8b4398f3368c798150'/>
<id>58d6f069744d9528a5059b8b4398f3368c798150</id>
<content type='text'>
* anders/diameter/sctp/OTP-10889:
  Send unordered on all outbound diameter_sctp streams
  Delay rotation of diameter_sctp outbound streams
  Exercise unordered delivery in traffic suite
  Use unordered delivery on a lone outbound stream in diameter_sctp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/sctp/OTP-10889:
  Send unordered on all outbound diameter_sctp streams
  Delay rotation of diameter_sctp outbound streams
  Exercise unordered delivery in traffic suite
  Use unordered delivery on a lone outbound stream in diameter_sctp
</pre>
</div>
</content>
</entry>
<entry>
<title>Send unordered on all outbound diameter_sctp streams</title>
<updated>2017-08-29T20:29:49+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-29T20:26:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a3749fd240260958053f90539b0f7e04e720d070'/>
<id>a3749fd240260958053f90539b0f7e04e720d070</id>
<content type='text'>
There's no reason for sending ordered since request handling is
concurrent: different processes handling incoming requests can't know in
which order they were received on the transport, and different processes
sending requests can't know the order in which they're sent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason for sending ordered since request handling is
concurrent: different processes handling incoming requests can't know in
which order they were received on the transport, and different processes
sending requests can't know the order in which they're sent.
</pre>
</div>
</content>
</entry>
<entry>
<title>Delay rotation of diameter_sctp outbound streams</title>
<updated>2017-08-29T20:29:49+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-29T12:33:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1fd9b919608b54e4d08340c45fe1cabb6975880c'/>
<id>1fd9b919608b54e4d08340c45fe1cabb6975880c</id>
<content type='text'>
For the same reason as unordered delivery is delayed in the grandparent
commit. Delivery is ordered only within a stream, so until a second
message is received from the peer, there's no guarantee that a second
outgoing request won't be received before the initial capablities
exchange message. Rotation begins upon reception of a second message
from the peer, messages being sent on stream 0 until then.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the same reason as unordered delivery is delayed in the grandparent
commit. Delivery is ordered only within a stream, so until a second
message is received from the peer, there's no guarantee that a second
outgoing request won't be received before the initial capablities
exchange message. Rotation begins upon reception of a second message
from the peer, messages being sent on stream 0 until then.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/config_consistency/OTP-14555' into maint</title>
<updated>2017-08-29T13:14:19+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-29T13:14:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=614cc9aba105f6fe5c72de356be4735c22579ca2'/>
<id>614cc9aba105f6fe5c72de356be4735c22579ca2</id>
<content type='text'>
* anders/diameter/config_consistency/OTP-14555:
  Let strict_mbit and incoming_maxlen be configured per transport
  Let a service configure default transport options
  Rename type evaluable -&gt; eval
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/config_consistency/OTP-14555:
  Let strict_mbit and incoming_maxlen be configured per transport
  Let a service configure default transport options
  Rename type evaluable -&gt; eval
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'anders/diameter/loopback_any/OTP-14544' into maint</title>
<updated>2017-08-29T13:13:31+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-29T13:13:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=6f9ddb858507dc91cfdf0ccc82f3f6aad5463f50'/>
<id>6f9ddb858507dc91cfdf0ccc82f3f6aad5463f50</id>
<content type='text'>
* anders/diameter/loopback_any/OTP-14544:
  Use loopback/any config in examples suite
  Handle loopback/any as local address in diameter_tcp/sctp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* anders/diameter/loopback_any/OTP-14544:
  Use loopback/any config in examples suite
  Handle loopback/any as local address in diameter_tcp/sctp
</pre>
</div>
</content>
</entry>
<entry>
<title>Use unordered delivery on a lone outbound stream in diameter_sctp</title>
<updated>2017-08-29T12:51:40+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-28T21:53:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=0447bd6e8bcd3b0249b9956883c213c434095ec5'/>
<id>0447bd6e8bcd3b0249b9956883c213c434095ec5</id>
<content type='text'>
RFC 6733 say the below about head-of-line blocking and SCTP, the
suggestion of unordered sending being new compared to the RFC 3588.
Until now, all delivery in diameter_sctp has been ordered, and
roundrobin over available streams unless the user passes a stream
identifier in an outgoing diameter_packet record. This commit changes
this to use unordered delivery when there's only a single outbound
stream to choose from.

The special case at capabilities exchange is handled by only starting to
send unordered after the second message from the peer has been received.
(First message after capabilities exchange, as the RFC probably means.)
The special case at DPR isn't handled, since there's no knowing the
order in which a peer will answer: a node that sends DPR while it has
other requests outstanding can't expect that the latter will be answered
before DPR, even if delivery is ordered since incoming requests are
handled concurrently. If it wants a guarantee then it simply has to wait
for answers before sending DPR.

A user can force all delivery to be unordered by specifying

  {sctp_default_send_params, #sctp_sndrcvinfo{flags = [unordered]}}

as a config option to diameter_sctp, but in this case there's no
handling of a request being sent directly after CEA since there's no
ordered flag to override the default.

RFC 6733:

2.1.1.  SCTP Guidelines

   Diameter messages SHOULD be mapped into SCTP streams in a way that
   avoids head-of-the-line (HOL) blocking.  Among different ways of
   performing the mapping that fulfill this requirement it is
   RECOMMENDED that a Diameter node send every Diameter message (request
   or response) over stream zero with the unordered flag set.  However,
   Diameter nodes MAY select and implement other design alternatives for
   avoiding HOL blocking such as using multiple streams with the
   unordered flag cleared (as originally instructed in RFC 3588).  On
   the receiving side, a Diameter entity MUST be ready to receive
   Diameter messages over any stream, and it is free to return responses
   over a different stream.  This way, both sides manage the available
   streams in the sending direction, independently of the streams chosen
   by the other side to send a particular Diameter message.  These
   messages can be out-of-order and belong to different Diameter
   sessions.

   Out-of-order delivery has special concerns during a connection
   establishment and termination.  When a connection is established, the
   responder side sends a CEA message and moves to R-Open state as
   specified in Section 5.6.  If an application message is sent shortly
   after the CEA and delivered out-of-order, the initiator side, still
   in Wait-I-CEA state, will discard the application message and close
   the connection.  In order to avoid this race condition, the receiver
   side SHOULD NOT use out-of-order delivery methods until the first
   message has been received from the initiator, proving that it has
   moved to I-Open state.  To trigger such a message, the receiver side
   could send a DWR immediately after sending a CEA.  Upon reception of
   the corresponding DWA, the receiver side should start using out-of-
   order delivery methods to counter the HOL blocking.

   Another race condition may occur when DPR and DPA messages are used.
   Both DPR and DPA are small in size; thus, they may be delivered to
   the peer faster than application messages when an out-of-order
   delivery mechanism is used.  Therefore, it is possible that a DPR/DPA
   exchange completes while application messages are still in transit,
   resulting in a loss of these messages.  An implementation could
   mitigate this race condition, for example, using timers, and wait for
   a short period of time for pending application level messages to
   arrive before proceeding to disconnect the transport connection.
   Eventually, lost messages are handled by the retransmission mechanism
   described in Section 5.5.4.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RFC 6733 say the below about head-of-line blocking and SCTP, the
suggestion of unordered sending being new compared to the RFC 3588.
Until now, all delivery in diameter_sctp has been ordered, and
roundrobin over available streams unless the user passes a stream
identifier in an outgoing diameter_packet record. This commit changes
this to use unordered delivery when there's only a single outbound
stream to choose from.

The special case at capabilities exchange is handled by only starting to
send unordered after the second message from the peer has been received.
(First message after capabilities exchange, as the RFC probably means.)
The special case at DPR isn't handled, since there's no knowing the
order in which a peer will answer: a node that sends DPR while it has
other requests outstanding can't expect that the latter will be answered
before DPR, even if delivery is ordered since incoming requests are
handled concurrently. If it wants a guarantee then it simply has to wait
for answers before sending DPR.

A user can force all delivery to be unordered by specifying

  {sctp_default_send_params, #sctp_sndrcvinfo{flags = [unordered]}}

as a config option to diameter_sctp, but in this case there's no
handling of a request being sent directly after CEA since there's no
ordered flag to override the default.

RFC 6733:

2.1.1.  SCTP Guidelines

   Diameter messages SHOULD be mapped into SCTP streams in a way that
   avoids head-of-the-line (HOL) blocking.  Among different ways of
   performing the mapping that fulfill this requirement it is
   RECOMMENDED that a Diameter node send every Diameter message (request
   or response) over stream zero with the unordered flag set.  However,
   Diameter nodes MAY select and implement other design alternatives for
   avoiding HOL blocking such as using multiple streams with the
   unordered flag cleared (as originally instructed in RFC 3588).  On
   the receiving side, a Diameter entity MUST be ready to receive
   Diameter messages over any stream, and it is free to return responses
   over a different stream.  This way, both sides manage the available
   streams in the sending direction, independently of the streams chosen
   by the other side to send a particular Diameter message.  These
   messages can be out-of-order and belong to different Diameter
   sessions.

   Out-of-order delivery has special concerns during a connection
   establishment and termination.  When a connection is established, the
   responder side sends a CEA message and moves to R-Open state as
   specified in Section 5.6.  If an application message is sent shortly
   after the CEA and delivered out-of-order, the initiator side, still
   in Wait-I-CEA state, will discard the application message and close
   the connection.  In order to avoid this race condition, the receiver
   side SHOULD NOT use out-of-order delivery methods until the first
   message has been received from the initiator, proving that it has
   moved to I-Open state.  To trigger such a message, the receiver side
   could send a DWR immediately after sending a CEA.  Upon reception of
   the corresponding DWA, the receiver side should start using out-of-
   order delivery methods to counter the HOL blocking.

   Another race condition may occur when DPR and DPA messages are used.
   Both DPR and DPA are small in size; thus, they may be delivered to
   the peer faster than application messages when an out-of-order
   delivery mechanism is used.  Therefore, it is possible that a DPR/DPA
   exchange completes while application messages are still in transit,
   resulting in a loss of these messages.  An implementation could
   mitigate this race condition, for example, using timers, and wait for
   a short period of time for pending application level messages to
   arrive before proceeding to disconnect the transport connection.
   Eventually, lost messages are handled by the retransmission mechanism
   described in Section 5.5.4.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename type evaluable -&gt; eval</title>
<updated>2017-08-24T14:09:24+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-24T09:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2d540b95755a6f628b0cfc5a9bab4ff41046fe4b'/>
<id>2d540b95755a6f628b0cfc5a9bab4ff41046fe4b</id>
<content type='text'>
Export the old type as a synonym for backwards compatability. The name
evaluable is a bit too awkward.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export the old type as a synonym for backwards compatability. The name
evaluable is a bit too awkward.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle loopback/any as local address in diameter_tcp/sctp</title>
<updated>2017-08-19T21:52:41+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2017-08-19T12:56:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2a4ec066046a5953527e496226f10171e229ae3e'/>
<id>2a4ec066046a5953527e496226f10171e229ae3e</id>
<content type='text'>
The support is implied by documentation, but wasn't handled in code. Be
consistent in retrieving the address from the sock rather than the
configuration, and in accepting both ip and ifaddr for a local address.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The support is implied by documentation, but wasn't handled in code. Be
consistent in retrieving the address from the sock rather than the
configuration, and in accepting both ip and ifaddr for a local address.
</pre>
</div>
</content>
</entry>
</feed>
