]> git.kaiwu.me - haproxy.git/commit
REORG: dns/ring: split the ring between the generic one and the DNS one
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Feb 2024 13:38:59 +0000 (14:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2024 17:34:19 +0000 (17:34 +0000)
commitad31e5328740a1f7d418a74bdab17f7cea290579
tree2769251dc86b05e8bfc1030a2d2d29d9a7404f23
parent8022ae326c31b6a05a73f9cdab575d2d8e553673
REORG: dns/ring: split the ring between the generic one and the DNS one

A ring is used for the DNS code but slightly differently from the generic
one, which prevents some important changes from being made to the generic
code without breaking DNS. As the use cases differ, it's better to just
split them apart for now and have the DNS code use its own ring that we
rename dns_ring and let the generic code continue to live on its own.

The unused parts such as CLI registration were dropped, resizing and
allocation from a mapped area were dropped. dns_ring_detach_appctx() was
kept despite not being used, so as to stay consistent with the comments
that say it must be called, despite the DNS code explicitly mentioning
that it skips it for now (i.e. this may change in the future).

Hopefully after the generic rings are converted the DNS code can migrate
back to them, though this is really not necessary.
Makefile
include/haproxy/dns-t.h
include/haproxy/dns_ring-t.h [new file with mode: 0644]
include/haproxy/dns_ring.h [new file with mode: 0644]
src/dns.c
src/dns_ring.c [new file with mode: 0644]
src/resolvers.c