]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use different allocators for UDP and TCP
authorEvan Hunt <each@isc.org>
Thu, 2 Jul 2020 14:27:38 +0000 (16:27 +0200)
committerMichał Kępień <michal@isc.org>
Wed, 5 Aug 2020 10:57:58 +0000 (12:57 +0200)
commit9a372f2bce642545164d2b4408eb6c4e301acc5e
tree2b7f89e3eee4a17d5fdaaece17fc309eab20870a
parentc01e6437155e14fbed37e19c2bd7c49ae366c0ac
Use different allocators for UDP and TCP

Each worker has a receive buffer with space for 20 DNS messages of up
to 2^16 bytes each, and the allocator function passed to uv_read_start()
or uv_udp_recv_start() will reserve a portion of it for use by sockets.
UDP can use recvmmsg() and so it needs that entire space, but TCP reads
one message at a time.

This commit introduces separate allocator functions for TCP and UDP
setting different buffer size limits, so that libuv will provide the
correct buffer sizes to each of them.
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/udp.c