mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
deps: upgrade to libuv 1.37.0
Notable changes: - The UV_UDP_RECVMMSG flag has been added. This flag is now required in order to utilize recvmmsg(). This was added in response to a regression introduced in 1.35.0 and 1.36.0. PR-URL: https://github.com/nodejs/node/pull/32866 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
1 parent
7afe24dba6
commit
b5bbde8cf1
9 files changed
+48
-21
No files matched your search
Vendored
+1
@@ -424,3 +424,4 @@ Lin Zhang <linroid@gmail.com>
|
||||
Sk Sajidul Kadir <sheikh.sajid522@gmail.com>
|
||||
twosee <twose@qq.com>
|
||||
Rikard Falkeborn <rikard.falkeborn@gmail.com>
|
||||
Yash Ladha <yashladhapankajladha123@gmail.com>
|
||||
Vendored
+9
@@ -1,3 +1,12 @@
|
||||
2020.04.20, Version 1.37.0 (Stable), 02a9e1be252b623ee032a3137c0b0c94afbe6809
|
||||
|
||||
Changes since version 1.36.0:
|
||||
|
||||
* timer: remove redundant check in heap compare (Yash Ladha)
|
||||
|
||||
* udp: add flag to enable recvmmsg(2) explicitly (Saúl Ibarra Corretgé)
|
||||
|
||||
|
||||
2020.04.16, Version 1.36.0 (Stable), 533b738838ad8407032e14b6772b29ef9af63cfa
|
||||
|
||||
Changes since version 1.35.0:
|
||||
|
||||
Vendored
+1
-1
@@ -13,7 +13,7 @@
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([libuv], [1.36.0], [https://github.com/libuv/libuv/issues])
|
||||
AC_INIT([libuv], [1.37.0], [https://github.com/libuv/libuv/issues])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
m4_include([m4/libuv-extra-automake-flags.m4])
|
||||
m4_include([m4/as_case.m4])
|
||||
|
||||
Vendored
+18
-6
@@ -41,12 +41,16 @@ Data types
|
||||
* (provided they all set the flag) but only the last one to bind will receive
|
||||
* any traffic, in effect "stealing" the port from the previous listener.
|
||||
*/
|
||||
UV_UDP_REUSEADDR = 4
|
||||
UV_UDP_REUSEADDR = 4,
|
||||
/*
|
||||
* Indicates that the message was received by recvmmsg, so the buffer provided
|
||||
* must not be freed by the recv_cb callback.
|
||||
*/
|
||||
UV_UDP_MMSG_CHUNK = 8
|
||||
UV_UDP_MMSG_CHUNK = 8,
|
||||
/*
|
||||
* Indicates that recvmmsg should be used, if available.
|
||||
*/
|
||||
UV_UDP_RECVMMSG = 256
|
||||
};
|
||||
|
||||
.. c:type:: void (*uv_udp_send_cb)(uv_udp_send_t* req, int status)
|
||||
@@ -125,12 +129,17 @@ API
|
||||
|
||||
.. c:function:: int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags)
|
||||
|
||||
Initialize the handle with the specified flags. At the moment the lower 8 bits
|
||||
of the `flags` parameter are used as the socket domain. A socket will be created
|
||||
for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
|
||||
just like :c:func:`uv_udp_init`.
|
||||
Initialize the handle with the specified flags. The lower 8 bits of the `flags`
|
||||
parameter are used as the socket domain. A socket will be created for the given domain.
|
||||
If the specified domain is ``AF_UNSPEC`` no socket is created, just like :c:func:`uv_udp_init`.
|
||||
|
||||
The remaining bits can be used to set one of these flags:
|
||||
|
||||
* `UV_UDP_RECVMMSG`: if set, and the platform supports it, :man:`recvmmsg(2)` will
|
||||
be used.
|
||||
|
||||
.. versionadded:: 1.7.0
|
||||
.. versionchanged:: 1.37.0 added the `UV_UDP_RECVMMSG` flag.
|
||||
|
||||
.. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock)
|
||||
|
||||
@@ -379,6 +388,9 @@ API
|
||||
.. versionchanged:: 1.35.0 added support for :man:`recvmmsg(2)` on supported platforms).
|
||||
The use of this feature requires a buffer larger than
|
||||
2 * 64KB to be passed to `alloc_cb`.
|
||||
.. versionchanged:: 1.37.0 :man:`recvmmsg(2)` support is no longer enabled implicitly,
|
||||
it must be explicitly requested by passing the `UV_UDP_RECVMMSG` flag to
|
||||
:c:func:`uv_udp_init_ex`.
|
||||
|
||||
.. c:function:: int uv_udp_recv_stop(uv_udp_t* handle)
|
||||
|
||||
|
||||
Vendored
+6
-1
@@ -610,7 +610,12 @@ enum uv_udp_flags {
|
||||
* Indicates that the message was received by recvmmsg, so the buffer provided
|
||||
* must not be freed by the recv_cb callback.
|
||||
*/
|
||||
UV_UDP_MMSG_CHUNK = 8
|
||||
UV_UDP_MMSG_CHUNK = 8,
|
||||
|
||||
/*
|
||||
* Indicates that recvmmsg should be used, if available.
|
||||
*/
|
||||
UV_UDP_RECVMMSG = 256
|
||||
};
|
||||
|
||||
typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status);
|
||||
|
||||
Vendored
+1
-1
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#define UV_VERSION_MAJOR 1
|
||||
#define UV_VERSION_MINOR 36
|
||||
#define UV_VERSION_MINOR 37
|
||||
#define UV_VERSION_PATCH 0
|
||||
#define UV_VERSION_IS_RELEASE 1
|
||||
#define UV_VERSION_SUFFIX ""
|
||||
|
||||
Vendored
+1
-6
@@ -51,12 +51,7 @@ static int timer_less_than(const struct heap_node* ha,
|
||||
/* Compare start_id when both have the same timeout. start_id is
|
||||
* allocated with loop->timer_counter in uv_timer_start().
|
||||
*/
|
||||
if (a->start_id < b->start_id)
|
||||
return 1;
|
||||
if (b->start_id < a->start_id)
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
return a->start_id < b->start_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vendored
+10
-6
@@ -262,11 +262,9 @@ static void uv__udp_recvmsg(uv_udp_t* handle) {
|
||||
assert(buf.base != NULL);
|
||||
|
||||
#if HAVE_MMSG
|
||||
uv_once(&once, uv__udp_mmsg_init);
|
||||
if (uv__recvmmsg_avail) {
|
||||
/* Returned space for more than 1 datagram, use it to receive
|
||||
* multiple datagrams. */
|
||||
if (buf.len >= 2 * UV__UDP_DGRAM_MAXSIZE) {
|
||||
if (handle->flags & UV_HANDLE_UDP_RECVMMSG) {
|
||||
uv_once(&once, uv__udp_mmsg_init);
|
||||
if (uv__recvmmsg_avail) {
|
||||
nread = uv__udp_recvmmsg(handle, &buf);
|
||||
if (nread > 0)
|
||||
count -= nread;
|
||||
@@ -949,6 +947,7 @@ static int uv__udp_set_source_membership6(uv_udp_t* handle,
|
||||
int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
|
||||
int domain;
|
||||
int err;
|
||||
int extra_flags;
|
||||
int fd;
|
||||
|
||||
/* Use the lower 8 bits for the domain */
|
||||
@@ -956,7 +955,9 @@ int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
|
||||
if (domain != AF_INET && domain != AF_INET6 && domain != AF_UNSPEC)
|
||||
return UV_EINVAL;
|
||||
|
||||
if (flags & ~0xFF)
|
||||
/* Use the higher bits for extra flags */
|
||||
extra_flags = flags & ~0xFF;
|
||||
if (extra_flags & ~UV_UDP_RECVMMSG)
|
||||
return UV_EINVAL;
|
||||
|
||||
if (domain != AF_UNSPEC) {
|
||||
@@ -977,6 +978,9 @@ int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
|
||||
QUEUE_INIT(&handle->write_queue);
|
||||
QUEUE_INIT(&handle->write_completed_queue);
|
||||
|
||||
if (extra_flags & UV_UDP_RECVMMSG)
|
||||
handle->flags |= UV_HANDLE_UDP_RECVMMSG;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
@@ -104,6 +104,7 @@ enum {
|
||||
/* Only used by uv_udp_t handles. */
|
||||
UV_HANDLE_UDP_PROCESSING = 0x01000000,
|
||||
UV_HANDLE_UDP_CONNECTED = 0x02000000,
|
||||
UV_HANDLE_UDP_RECVMMSG = 0x04000000,
|
||||
|
||||
/* Only used by uv_pipe_t handles. */
|
||||
UV_HANDLE_NON_OVERLAPPED_PIPE = 0x01000000,
|
||||
|
||||
Reference in new issue
Block a user