Replace the linked list of TCP dispatches with hash table
Reusing TCP connections with dns_dispatch_gettcp() used linear linked list to lookup existing outgoing TCP connections that could be reused. Replace the linked list with per-loop cds_lfht hashtable to speedup the lookups. We use cds_lfht because it allows non-unique node insertion that we need to check for dispatches in different connection states.
This commit is contained in:
@@ -77,7 +77,8 @@ struct dns_dispatchset {
|
||||
#define DNS_DISPATCHOPT_FIXEDID 0x00000001U
|
||||
|
||||
isc_result_t
|
||||
dns_dispatchmgr_create(isc_mem_t *mctx, isc_nm_t *nm, dns_dispatchmgr_t **mgrp);
|
||||
dns_dispatchmgr_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr, isc_nm_t *nm,
|
||||
dns_dispatchmgr_t **mgrp);
|
||||
/*%<
|
||||
* Creates a new dispatchmgr object, and sets the available ports
|
||||
* to the default range (1024-65535).
|
||||
|
||||
Reference in New Issue
Block a user