Age | Commit message (Collapse) | Author |
|
* anders/diameter/20.0/OTP-14398:
vsn -> 2.0
Update appup for 20.0
|
|
* anders/diameter/capx_vs_dpr/OTP-14338:
Let candidate peers be passed to diameter:call/4
Comment on RFC ambiguity regarding application identifiers
Remove trailing whitespace
|
|
* anders/diameter/performance/OTP-14343: (50 commits)
Let spawn_opt config replace erlang:spawn_opt/2 for request processes
Move (most of) diameter_gen.hrl to diameter_gen.erl
Change signature associated with dictionary @custom_type/@codecs
Avoid sending answer terms between processes unnecessarily
Refactor handling of incoming requests
Restore diameter_codec:decode/2, update diameter_codec(3)
Add diameter_codec option ordered_encode
Restore undocumented Failed-AVP setting convenience
Fix/simplify setting of one Failed-AVP
Avoid recreating records
Avoid recreating records
Avoid recreating records
Avoid recreating records
Adapt test suites to modified encode/decode
Simplify diameter_caps construction
Don't compute URI defaults unnecessarily
Don't deconstruct {TPid, Caps} unnecessarily
Remove use of process dictionary in decode
Remove minor diameter_config bloat
Fix maximum AVP arity check
...
|
|
* anders/diameter/transport/ERL-332: (35 commits)
Capitulate on SCTP vs sparc-sun-solaris2.10
Remove obsolete traffic testcase
Fix dialyzer warnings
Remove client/server string decode from traffic suite
Add diameter_sctp option packet
Add diameter_sctp send/recv callbacks
Let diameter_tcp send/recv callbacks deal in diameter_packet
Randomly select traffic testcases
Exercise diameter_tcp message callbacks in traffic suite
Exercise diameter_{tcp,sctp} sender in traffic suite
Remove upgrade from diameter_traffic
Add diameter_tcp send/recv callbacks
Make diameter_{tcp,sctp} sender configurable
Remove upgrade from diameter_sctp; tweak diameter_tcp to match
Fix incomprehensible dialyzer warning
Simplify acks to transport processes
Strip throttling callbacks from diameter_tcp
Deal with (another) SCTP association id quirk on Solaris
Use binary:copy/2 when generating largish data in test suites
Deal with SCTP association id quirk on Solaris
...
|
|
|
|
|
|
By accepting an MFA that is applied to the fun that is otherwise spawned
for each incoming request, to allow handler processes to be reused. This
is not yet documented and may change, but the motivation is to let spawn
be replaced by process pool, from which the MFA selects. A list-valued
spawn_opt is equivalent to {erlang, spawn_opt, [Opts]}.
|
|
To solve the problem of being able to send messages to a peer that
hasn't advertised support for the application in question, as discussed
in the parent commit. diameter:call/4 can be passed 'peer' options to
identify candidates, and the only requirement is that an appropriate
dictionary be configured for encode. Filters are applied as if
candidates had been selected by advertised application.
|
|
It is tempting to regard remote support for the common application as
implicit, but that leads to the problems noted, and a node could never
then expect non-intersecting application support to result in 5010. It
probably can't anyway given the different ways the RFC's intent can be
interpreted, but it's not unreasonable that a node should be able to
advertise a single Diameter application and get 5010 if the peer doesn't
support it.
The problem we have currently is that peer selection is based on the
support advertised by the peer. The application id of an outgoing
request is used to lookup peers that have advertised support, so if the
peer hasn't advertised support for Diameter common messages then the
user won't be able to send DPR and more: diameter:call/4 will just
return {error, no_connection}. This commit doesn't solve the problem.
|
|
|
|
To remove the requirement that dictionary modules be recompiled whenever
the encode/decode implementation changes. The included diameter_gen.hrl
now only contains trivial functions that call info diameter_gen.erl.
|
|
To pass the options map through the encode. This is not backwards
compatible, and dictionaries supporting @custom_types or @codecs will
need to be updated.
|
|
As in commit fb14eac9, but for outgoing answers.
|
|
To simplify the call chains and intermediate terms, that had become a
little convoluted over time.
|
|
The documentation has been out of date since the string_decode option
was added in commit 1590920c. The optionless decode/2 was removed in the
commit that removed the use of the process dictionary in decode.
|
|
To allow list-valued messaged to be encoded in the specified order,
instead of in the dictionary order by first converting the list to a
record. This is not yet exposed in configuration.
|
|
The parent commit removed the convenience of setting something like the
following in the errors field of the diameter_packet of an answer
message.
[#diameter_avp{} = A2, {5001, #diameter_avp{} = A1}]
This results in Result-Code = 5001 and Failed-AVP = [A1,A2], but is
currently undocumented. Probably useful, so restore it.
Also accept {RC, [#diameter_avp{}]} at encode, which is probably more
useful; eg. [{5001, [A || {5001, A} <- Errors]}]
Anyone who wants full control can set errors = false and formulate
Result-Code/Failed-AVP themselves. (As opposed to not setting a value
explicitly, which results in setting from the decoded errors list. A bit
quirky, but documented and historical.)
|
|
When setting the Result-Code/Failed-AVP of an outgoing answer from an
errors list either returned from or not discarded by a handle_request
callback, more than the AVP paired with the Result-Code in question
could be set in Failed-AVP.
RFC 6733:
7.5. Failed-AVP AVP
The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides
debugging information in cases where a request is rejected or not
fully processed due to erroneous information in a specific AVP. The
value of the Result-Code AVP will provide information on the reason
for the Failed-AVP AVP. A Diameter answer message SHOULD contain an
instance of the Failed-AVP AVP that corresponds to the error
indicated by the Result-Code AVP. For practical purposes, this
Failed-AVP would typically refer to the first AVP processing error
that a Diameter node encounters.
|
|
In this case the diameter_packet of an answer message for encode. The
record itself could be avoided, but that requires a new interface in
diameter_codec, probably for little gain.
|
|
In the theme of the previous two commits, creating the required
diameter_header of diameter_packet record only once.
|
|
As in the parent commit, recreating the options record is relatively
costly.
|
|
This old construction is approximately two to four times slower from
best (no elements modified) to worst (all modified) case, with the new
construction having constant speed.
|
|
|
|
Replace old macro-based implementation with something more readable.
|
|
|
|
The tuple is returned from and passed to callbacks, so retain the tuple
instead of its elements.
|
|
By passing additional arguments through it.
|
|
Despite the efforts of commits 1df74351 and 111261d1 to salvage it, SCTP
is just flakey on sparc-sun-solaris2.10. In addition to the woes of the
loopback address, even connect on other addresses sporadically returns
{error, eafnosupport}, so the initial check for a working SCTP (aka
resistance) is futile. Revert both commits.
|
|
Outgoing requests no longer write to the request table, as of commit
a4da06a5.
|
|
diameter_sctp.erl:292: Record construction #transport{parent::pid(),mode::{'accept',atom() | pid() | port() | {atom(),atom()}},active::'false',recv::'true',os::0,packet::'true',message_cb::'undefined',send::'false'} violates the declared type of field message_cb::'false' | fun() | maybe_improper_list(fun() | maybe_improper_list(any(),[any()]) | {atom(),atom(),[any()]},[any()]) | {atom(),atom(),[any()]}
diameter_sctp.erl:302: Record construction #transport{mode::{'accept',atom() | pid() | port() | {atom(),atom()}},active::'false',recv::'true',os::0,packet::'true',message_cb::'undefined',send::'false'} violates the declared type of field message_cb::'false' | fun() | maybe_improper_list(fun() | maybe_improper_list(any(),[any()]) | {atom(),atom(),[any()]},[any()]) | {atom(),atom(),[any()]}
|
|
Folded when I should have mapped.
|
|
|
|
Converting with list_to_binary/1 appears to be faster than the
equivalent binary comprehension:
<< (z(F,A)) || {F,A} <- avp_arity(Name) >>
|
|
Recursing over the entire list of arities and values is faster than
retrieving them one at a time.
|
|
|
|
|
|
This and subsequent commits are destined for OTP 20.0.
|
|
|
|
|
|
In particular, allow {Name, Value} and {Dict, Name, Value} without
requiring a diameter_avp wrapper.
|
|
Since value is ignored.
|
|
Which is the equivalent of what was done with '#new-'/1 and '#set-'/2.
|
|
|
|
base/diameter_codec.erl:716: Warning: OPTIMIZED: creation of sub binary delayed
|
|
base/diameter_codec.erl:545: Warning: OPTIMIZED: creation of sub binary delayed
|
|
base/diameter_codec.erl:600: Warning: OPTIMIZED: creation of sub binary delayed
|
|
|
|
|
|
|
|
Dict:avp(encode, Value, Name) no longer needs to return a binary, only
an iolist(). Message encode runs list_to_binary/1 to convert accumulated
lists into a message binary.
|