]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: avoid unnecessary source lookups
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 14 Dec 2021 09:04:39 +0000 (10:04 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 14 Dec 2021 09:47:10 +0000 (10:47 +0100)
commitf2ba20f2932e3fcd76f5bd5d0d53248a560e51ef
treeb0ad7dfcec9edc5b4cb9624dc4bfd7608973001e
parentfcd384523b2e20d89800e92cd8aacf3fa2bde007
ntp: avoid unnecessary source lookups

Avoid searching the hash table of sources when a packet in the client
mode is received. It cannot be a response from our source. Analogously,
avoid source lookups for transmitted packets in the server mode. This
doesn't change anything for packets in symmetric modes, which can be
requests and responses at the same time.

This slightly improves the maximum packet rate handled as a server.
ntp_sources.c
test/unit/ntp_sources.c