]> 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:23 +0000 (12:57 +0200)
commit38264b6a4d272dbbe948cf66eef9634041d14f98
tree732e7e877994f5107942d27c27f902b0c2e76f05
parentf0fa6f0245070db484847f0c26c1db3689d6ff97
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