diff options
author | Anders Svensson <[email protected]> | 2015-06-19 09:35:55 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-06-19 11:09:32 +0200 |
commit | aea4c4d4c3b4293ef401621bfd46b6ee5a87cf1b (patch) | |
tree | a940af01125262f24cb1b1f622b88ca21b168c7c /lib/diameter/test/diameter_util.erl | |
parent | 8fae9fc78e32656702a5661af4be470395cfa23d (diff) | |
download | otp-aea4c4d4c3b4293ef401621bfd46b6ee5a87cf1b.tar.gz otp-aea4c4d4c3b4293ef401621bfd46b6ee5a87cf1b.tar.bz2 otp-aea4c4d4c3b4293ef401621bfd46b6ee5a87cf1b.zip |
Increase send/receive buffers for testsuite SCTP listeners
The defaults result in sporadic timeouts in the traffic suite after
testing over SCTP was added in commit fadf753b. The behaviour looks to
be specific to SLES 11, and is presumably the same resends/congestion
that lead to the buffers being increased in the gen_sctp suite in commit
12febf13 (and commented in commit e931991f). The behaviour hasn't been
seen on SLES 10.
Diffstat (limited to 'lib/diameter/test/diameter_util.erl')
-rw-r--r-- | lib/diameter/test/diameter_util.erl | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl index df7d268429..c9022b9c53 100644 --- a/lib/diameter/test/diameter_util.erl +++ b/lib/diameter/test/diameter_util.erl @@ -380,12 +380,26 @@ tmod(any) -> [diameter_sctp, diameter_tcp]. opts(Prot, T) -> - [{transport_module, M} || M <- tmod(Prot)] - ++ [{transport_config, [{ip, ?ADDR}, {port, 0} | opts(T)]}]. + lists:append([[{transport_module, M}, {transport_config, C}] + || M <- tmod(Prot), + C <- [cfg(M,T) ++ cfg(M) ++ cfg(T)]]). -opts(listen) -> +%% Listening SCTP socket need larger-than-default buffers to avoid +%% resends on some platforms (eg. SLES 11). +cfg(diameter_sctp, listen) -> + [{recbuf, 1 bsl 16}, {sndbuf, 1 bsl 16}]; + +cfg(_, _) -> + []. + +cfg(M) + when M == diameter_tcp; + M == diameter_sctp -> + [{ip, ?ADDR}, {port, 0}]; + +cfg(listen) -> [{accept, M} || M <- [{256,0,0,1}, ["256.0.0.1", ["^.+$"]]]]; -opts(PortNr) -> +cfg(PortNr) -> [{raddr, ?ADDR}, {rport, PortNr}]. %% --------------------------------------------------------------------------- |