Age | Commit message (Collapse) | Author |
|
Its now possible to set a rcvbuf (otp) option value
of {N :: pos_integer(), BufSz :: pos_integer()}.
This value is used for type stream and protocol tcp,
when calling the function recv with length = 0 (zero).
The second value, BufSz, is the actual size of the receive
buffer used when calling the socket recv function, and
the first value, N, is the max number of possible reads
that will be performed (at most), even if there is more
data to read. This is limit the effect of DoS attacks.
OTP-15497
|
|
The read and write functions now *only* use the isReadable and
isWritable fields, respectively, to decide if the "socket" can be read
from and written to (previously the state field was used outside of
the mutex lock).
Also made it possible to enable / disable test suite groups individually,
via environment variables (ESOCK_TEST_...). Specifically, the ttest
group has been excluded by default (takes to long a time).
OTP-15549
|
|
Add a way to *get* the file descriptor (fd) of a socket.
Useful mostly for debugging.
OTP-15528
|
|
Add a simple wrapper script for the socket ttest program(s).
Intended to be used when running a performance test in a
standard shell (bash).
OTP-14831
|
|
It took "forever" to run the ttest test cases, so the runtime
of these have been adjusted down to 10 seconds (from 60 seconds).
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Handle (rcv and snd) buffer set failure.
The number of iterations (message exchanges) that the
traffic ping-cases has been adjusted down (by a factor of 10).
Also, improve skip'ing.
OTP-14831
|
|
The test case tried to validate the (socket option) protocol,
which is not actually available on OpenBSD. So, add a check
if the option is supported.
OTP-14831
|
|
|
|
|
|
The macro (define) IPTOS_MINCOST does not exist
on OpenBSD 6.3.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
|
|
Added a number of ttest test cases with transport socket.
Server with transport = socket(tcp), active = true and client
using transport = socket(tcp) (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport socket and gen_tcp.
Server with transport = socket(tcp), active = true and client
using transport = gen_tcp (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport socket.
Server with transport = socket(tcp), active = once and client
using transport = socket(tcp) (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport socket and gen_tcp.
Server with transport = socket(tcp), active = once and client
using transport = gen_tcp (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport socket.
Server with transport = socket(tcp), active = false and client
using transport = socket(tcp) (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport socket and gen_tcp.
Server with transport = socket(tcp), active = false and client
using transport = gen_tcp (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp and socket.
Server with transport = gen_tcp, active = true and client
using transport = socket(tcp) (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp.
Server with transport = gen_tcp, active = true and client
using transport = gen_tcp (and active = false, once and true).
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp and socket.
Server with transport = gen_tcp, active = once and client
using transport = socket(tcp) (and active = false, once and true).
Also fixed a counting error in the server (forgot to include the
header, 16 bytes, in the byte count).
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp.
Server with transport = gen_tcp, active = once and client
using transport = gen_tcp (and active = false, once and true).
Also a bit of client and server cleanup (remove and cleanup up
some printouts).
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp and socket.
Server with transport = gen_tcp, active = false and client
using transport = socket(tcp) (and active = false, once and true).
Also a bit of "grouping".
OTP-14831
|
|
Added a number of ttest test cases with transport gen_tcp.
Server with transport = gen_tcp, active = false and client
using transport = gen_tcp (and active = false, once and true).
Also "fixed" the gen_tcp socket buffer size (default size
was way to small for the "large" messages).
OTP-14831
|
|
Added a (first) test case based on the ttest modules.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added a global logger that make it possible to log
from the slave nodes (with "ease").
Also "fixed" the test case that failed on "older"
linux (Ubuntu 14.04). For now we let it skip
instead (we should really check the OS version).
Also corrected a couple of (ping-pong) cases for which
the buffer adjustments did not work.
OTP-14831
|
|
Assumed the wrong success value ({ok, _} instead of ok) for the
api-to-connect-tcp test case.
OTP-14831
|
|
Previously the "message interface" between the functions in
socket.erl and the nif-code (socket_nif.c) was "ad hoc".
This has now been changed so that we have a unified message
{'$socket', SockRef | undefined, Tag, Info}
This also has the added advantage of preparing the code for
when we start using the new select-fucntions (with which
its possible to specify your own message). This will be used
in order to get around our eterm "leak" (we will use a simple
counter, maintained in the nif, instead of the [Recv|Send|Acc]Ref
we generate in the erlang code today.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added a ttest lib module for some common functions.
Added a process (server handler and reader processes) stats
printouts. So far only used by the server.
There is still a "leak". Its a term leak. Some of the
functions take a ref as argument (recv, send and accept for
instance). This is stored internally, by way of a call to
the enif_make_copy, in order to be used later in a select
call. Its not "released" though, until the environment is
released, which happens when the socket dtor callback function
is called.
Possible solution: We need to keep "temporary" environments (one
for each of the queues), which we can clear (basically we need two,
one that is currently used for new ref's and one for the old ref's).
OTP-14831
|
|
"Dry fixed" the "same" problems as was found for nif_recv (missing
binary free(s)).
OTP-14831
|
|
Running valgrind, found a couple of cases when allocated
binaries where not released. Mostly when the recv failed
for some reason.
Also clear and free the environment associated with the
socket (resource) (in the _dtor callback function).
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
|
|
* Socket close callback
Only demonitor the closer if its local (close) and its not
a direct call. There was a spurious warning message.
* Down callback
Only process this event if the socket is not closed or closing.
OTP-14831
|
|
The default read buffer size was 2K and has now been
increased to 8K.
OTP-14831
|
|
The ping-pong merge had some problems...
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added config checks for the sctp struct field:
sctp_event_subscribe.sctp_authentication_event
Also, if-def'ed the code accordingly.
If-def'ed code to handle the (non-) existence of IP_PMTUDISC_PROBE
and IPV6_PMTUDISC_PROBE for the IP and IPv6 MTU_DISCOVER options.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added config checks for the sctp struct field:
sctp_event_subscribe.sctp_sender_dry_event
Also, if-def'ed the code accordingly.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Attempt to fix the the api_to_connect_tcp[4|6] test cases.
On some linux versions (Ubuntu 14), the backlog seems to not
work. No luck...
OTP-14831
|
|
Added a socket close (actually shutdown(write)) for recv and
recvmsg for tcp.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added ping-pong test cases for UDP, small and medium, using
the sendto/recvfrom and sendmsg/recvmsg functions.
OTP-14831
|
|
When type = dgram, the functions recvfrom and recvmsg did not
properly handle socket close, cuaing the caller to hang
indefinitely.
OTP-14831
|
|
Some minor restructure of the ping-pong test cases in order
to not have duplicate the send and receive fun's.
OTP-14831
|