summaryrefslogtreecommitdiff
path: root/erts/emulator/drivers
Commit message (Collapse)AuthorAgeFilesLines
* erts: Add comment about send timeout clearing busy portSverker Eriksson2020-10-301-0/+5
|
* Merge branch 'maint'Rickard Green2020-10-281-3/+30
|\ | | | | | | | | * maint: Look up IOV_MAX instead of assuming 16
| * Look up IOV_MAX instead of assuming 16Rickard Green2020-10-221-3/+30
| |
| * Merge branch ↵Erlang/OTP2020-10-021-9/+19
| |\ | | | | | | | | | | | | | | | | | | 'bmk/erts/20200909/active_once_wakes_up_io_polling_thread_unnecessarily/OTP-16847' into maint-23 * bmk/erts/20200909/active_once_wakes_up_io_polling_thread_unnecessarily/OTP-16847: [erts] Active-once wakes up IO possing thread unnecessarily
* | | Remove private ram_file:compress in favor of zlib:gzipJosé Valim2020-10-144-314/+2
| | |
* | | Merge branch 'maint'Micael Karlberg2020-09-301-9/+19
|\ \ \ | | | | | | | | | | | | OTP-16847
| * \ \ Merge branch ↵Micael Karlberg2020-09-301-9/+19
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | 'bmk/erts/20200909/active_once_wakes_up_io_polling_thread_unnecessarily/OTP-16847' into maint OTP-16847
| | * [erts] Active-once wakes up IO possing thread unnecessarilyMicael Karlberg2020-09-101-9/+19
| | | | | | | | | | | | | | | | | | | | | inet:setopts([{active,once}]) wakes up IO polling thread unnecessarily, leading to lock contention and visibly higher CPU utilization. OTP-16847 (ERL-1301)
* | | erts: Refactor all headers to work in C++Lukas Larsson2020-09-211-1/+1
| | | | | | | | | | | | | | | Co-authored-by: John Högberg <john@erlang.org> Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
* | | Remove unused and private ram_file functionsJosé Valim2020-08-101-167/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes support for: * ram_file:open/2 with deprecated file modes (it is now equivalent to raw_file_io:open/2) * ram_file:set_file/2 and ram_file:get_file_close/1 which are private and not used anywhere in Erlang/OTP * ram_file:uuencode/1 and ram_file:uudecode/2 which which are private and not used anywhere in Erlang/OTP Note that ram_file:get_size/1 also fits this criteria but it was kept because there is some usage in the wild.
* | [erts|inet] Casting warnings on windowsMicael Karlberg2020-06-151-204/+245
| | | | | | | | | | | | | | | | | | The debug macro calls used, on Windows, the wrong casting type and format string for the port type. Use '%p' as format string for pointer, no casting needed (since the ErlDrvPort is actually a pointer). OTP-16715
* | Don't use the false symbol as a labelCalvin Buckley2020-06-081-6/+6
| | | | | | | | | | If stdbool is included (Haiku seems to do this) in system headers, this becomes defined already and is bad juju. Use a unique sym.
* | Merge branch ↵Erlang/OTP2020-05-201-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 'bmk/kernel/20200514/sctp_and_udp_recv_hangs_on_close/m22/OTP-16654' into maint-23 * bmk/kernel/20200514/sctp_and_udp_recv_hangs_on_close/m22/OTP-16654: [kernel|test] Add SCTP test case for recv socket close [kernel|test] Add UDP test case for recv socket close [erts] Inform all async(s) when closing udp/sctp socket
| * | [erts] Inform all async(s) when closing udp/sctp socketMicael Karlberg2020-05-151-3/+4
| |/ | | | | | | | | | | | | The UDP and SCTP sockets did not inform all (async) waiting processes about socket close, basically leaving them hanging. OTP-16654
* | Merge branch 'sverker/win-compile-warnings/OTP-15800'Sverker Eriksson2020-05-033-15/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sverker/win-compile-warnings/OTP-15800: odbc: Fix windows compiler warnings wx: Fix windows compiler warnings os_mon: Fix windows compiler warnings erl_interface: Fix windows compiler warnings erts: Fix int_drv use of type SOCKLEN_T erts: Use ERTS_SYS_FD_INVALID instead of -1 erts: Fix misc Windows C compiler warnings
| * | erts: Fix int_drv use of type SOCKLEN_TSverker Eriksson2020-05-031-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOCKLEN_T is used for the last arguments of #define sock_getopt getsockopt #define sock_setopt setsockopt #define sock_name getsockname #define sock_peer getpeername On unix this is type socklen_t, but on Windows this is type int. Commit 011954e851d421b882b0b4eaeda04cfc2895d70a changed SOCKLEN_T from int to size_t which is not correct on Windows. Kept size_t fallback on non-Windows with a compile #warning, not sure if this is ever needed/correct.
| * | erts: Fix misc Windows C compiler warningsSverker Eriksson2020-05-033-10/+11
| |/
* | Merge branch 'dgud/erts/improve-werl'Dan Gudmundsson2020-03-201-3/+5
|\ \ | | | | | | | | | | | | | | | * dgud/erts/improve-werl: win32: Use OTP-version as default install path werl: Improve about box
| * | werl: Improve about boxDan Gudmundsson2020-02-251-3/+5
| | | | | | | | | | | | Add OTP-VERSION info, and change font and copyright notice.
* | | Merge branch 'maint'Rickard Green2020-03-132-2/+2
|\ \ \ | | |/ | |/| | | | | | | * maint: Update copyright year
| * | Update copyright yearRickard Green2020-03-132-2/+2
| | |
* | | [erts] Tweaked the config and usage of SCTP for NetBSDMicael Karlberg2020-03-041-7/+9
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | On NetBSD the type sctp_assoc_value does not exist. Its used normally when setting, for instance, the option SCTP_DELAYED_ACK_TIME. This option *does* exist on NetBSD, but it can only be used to set the "default value" (which on Linux is done by setting assoc_id (in assoc_value) to 0). The way to "properly" handle this on NetBSD would be to accept this option (for inet:[setopts/getopts]), but verify that the assoc id is zero (0). For now we simply test for the type, and if it does not exist, we do not allow set/get of this option.
* | Merge branch 'dgud/erts/improve-werl'Dan Gudmundsson2020-02-211-21/+37
|\ \ | | | | | | | | | | | | | | | | | | * dgud/erts/improve-werl: werl: style fixes werl: Fix x64 problems Increase werl line buffer size
| * | werl: style fixesDan Gudmundsson2020-02-191-4/+12
| | | | | | | | | | | | | | | | | | | | | Use a better default font there exists better looking AA fonts. Remove border so 90'ish. Don't default display toolbar, not adding much functionality and takes space.
| * | werl: Fix x64 problemsDan Gudmundsson2020-02-191-16/+24
| | | | | | | | | | | | | | | | | | Fix missed type conversions when ported to win64, caused background to not be re-drawn in the correct color, when changed.
| * | Increase werl line buffer sizeDan Gudmundsson2020-02-181-1/+1
| | | | | | | | | | | | Keep a larger scroll buffer
* | | Merge branch 'maint'Raimo Niskanen2020-02-181-7/+3
|\ \ \ | |/ / |/| / | |/ | | | | * maint: Write test case Remove shortcut for timeout == 0
| * Remove shortcut for timeout == 0Raimo Niskanen2020-02-111-7/+3
| |
* | increment the spec buffer size to fit string-type(3) instead of atom-type(2)Matyas Markovics2019-12-061-3/+3
| |
* | Change Reserved to unmodified HTTP header-fieldMatyas Markovics2019-11-241-5/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate unmodified header fields in the previously Reserved and undefined 4th element of the http_header tuple. *Why do we need this new feature?* While Section 4.2 of RFC 2616 for HTTP/1.1 states that Field names are case-insensitive, some non-compliant web services may rely on peculiar casing of Field names. Such web-services cannot be accessed through a Proxy-server, that is implemented in Erlang/OTP, certainly not over HTTPS. Despite the RFC, even the IANA lists a number of permanently registered headers in all-caps or mixed-cased format, e.g.: ALPN, HTTP2-Settings, WWW-Authenticate, etc. This leads to confusion and to service implementations, that only accept headers formatted the same way. A production issue was experienced using the common, drafted, but not yet standard header: DNT. There are a number of HTTP servers implemented in Erlang that could be used in a Proxy implementation. However, there is none that would respect header-casing. * cowboy, httpd - their header parser lower-cases the fields * yaws - emulators' internal HTTP header parsing via ssl/inet * mochiweb, elli - both use erlang:decode_packet/3 As a side note: An HTTPS-Proxy requires CONNECT method support. Therefor cowboy is not a real option despite its popularity. With this proposal yaws, mochiweb and elli could all be patched to respect casing of header fields and propagate the original header format to the application level modules. The DNT header issue was experienced using a patched mochiweb. *Risks or uncertain artifacts?* These changes are minimalistic and backward compatible, given application developers respected the documentation. All above mentioned http servers do so, they ignore the 4th element of http_header tuple. It was verified in the master branches of the project repositories. *How did you solve it?* The proposal is that packet_parser.c should also propagate unmodified fields to both inet_drv.c and erl_bif_port.c, where these would be put in the 4th place of the http_header tuple. Its recognised, that this element was Reserved for future and/or internal use. Hopefully you'd agree, that sending the original header fields is a productive use-case to free up the reservation. Adding a new httph_cs option, cs for case-sensitive, was also considered. I got the impression thought, that these these packet decoders exit for compatibility reasons only and the OTP-Team is not keen on adding new options.
* Merge branch 'raimo/udp-send-TOS/OTP-15422' into maintRaimo Niskanen2019-07-081-5/+2
|\ | | | | | | | | | | * raimo/udp-send-TOS/OTP-15422: Refine test cases Remove test code that fails on Windows
| * Remove test code that fails on WindowsRaimo Niskanen2019-07-031-5/+2
| |
* | Merge pull request #2272 from ↵Lukas Larsson2019-06-181-13/+31
|\ \ | |/ |/| | | | | garazdawi/lukas/erts/fix_active_n_close_win32/ERL-960/OTP-15901 Fix {active,N} close race condition on windows
| * erts: Fix {active,N} close race condition on windowsLukas Larsson2019-06-041-13/+31
| | | | | | | | | | When a close is detected on windows, we need to keep track of it as it will not trigger again.
* | Merge branch 'ingela/raimo/udp-send-TOS/ERIERL-294/OTP-15747' into ↵Ingela Anderton Andin2019-06-171-28/+154
|\ \ | | | | | | | | | | | | | | | | | | | | | ingela/merge-294 * ingela/raimo/udp-send-TOS/ERIERL-294/OTP-15747: Introduce udp send ancillary data argument down to inet_drv Fix old warnings
| * | Introduce udp send ancillary data argument down to inet_drvRaimo Niskanen2019-06-171-28/+154
| | |
* | | Merge branch 'raimo/incomplete-socket-close/ERIERL-353/OTP-15370' into maintRaimo Niskanen2019-06-121-5/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | * raimo/incomplete-socket-close/ERIERL-353/OTP-15370: Copy linger zero flag from listen socket Test linger zero flag from listen socket
| * | Copy linger zero flag from listen socketRaimo Niskanen2019-05-061-5/+3
| |/
* | Merge branch 'maint'Rickard Green2019-03-061-45/+68
|\ \ | |/ | | | | | | | | | | | | * maint: kernel runtime dependency to erts erts: Add yield via timeout to inet read_packet erts: Don't increase buffer when sctp sndbuf is set erts: Only change inet buffer if not set
| * Merge branch 'lukas/erts/fix_inet_buffer_auto_adjust/OTP-15651/OTP-15652' ↵Rickard Green2019-03-061-45/+68
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | into maint * lukas/erts/fix_inet_buffer_auto_adjust/OTP-15651/OTP-15652: kernel runtime dependency to erts erts: Add yield via timeout to inet read_packet erts: Don't increase buffer when sctp sndbuf is set erts: Only change inet buffer if not set
| | * erts: Add yield via timeout to inet read_packetLukas Larsson2019-02-181-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that the timeout of 0 will work like a yield so that that we don't starve other ports/processes, but it is faster than the select trigger. We don't deselect on the socket because it does not matter if it is triggered laster or not as we'll just get an EAGAIN. Doing this also circumvents the fact that no select is done on active true style sockets until all I/O has been handled. So in a system with a lot of active true style I/O this will could be very benificial.
| | * erts: Don't increase buffer when sctp sndbuf is setLukas Larsson2019-02-181-4/+0
| | | | | | | | | | | | | | | This is most likely a copy-paste bug that has lived in the code unnoticed for 5+ years...
| | * erts: Only change inet buffer if not setLukas Larsson2019-02-181-38/+49
| | | | | | | | | | | | | | | We only want to autoupdate update the buffer if recbuf is set if the buffer has not been set before.
* | | Merge branch 'maint'Sverker Eriksson2019-01-313-2/+8
|\ \ \ | |/ /
| * | erts: Add magic port control numbersSverker Eriksson2019-01-283-2/+8
| | | | | | | | | | | | | | | to increase the probablity of a nice badarg from erlang:port_control.
* | | Merge branch 'maint'Lukas Larsson2019-01-231-19/+21
|\ \ \ | |/ /
| * | Merge branch 'lukas/erts/fix_inet_multitimer_cleanup/OTP-15536' into maintLukas Larsson2019-01-231-19/+21
| |\ \ | | |/ | | | | | | | | | * lukas/erts/fix_inet_multitimer_cleanup/OTP-15536: erts: Fix cleanup of the inet MultiTimer
| | * erts: Fix cleanup of the inet MultiTimerLukas Larsson2019-01-221-19/+21
| | |
* | | Merge branch 'maint'Lukas Larsson2018-12-211-1/+5
|\ \ \ | |/ /
| * | Merge branch 'lukas/erts/inet_pktopts_old_linux/OTP-15494' into maintLukas Larsson2018-12-211-1/+5
| |\ \ | | |/ | |/| | | | | | | * lukas/erts/inet_pktopts_old_linux/OTP-15494: erts: Fix inet pktopts on very old linux kernels