Instead of keeping one pair of RX and TX timestamp for each address, add a separate RX->TX map using an ordered circular buffer. Save the RX timestamps as 64-bit integers and search them with a combined linear interpolation and binary algorithm. This enables the server to support multiple interleaved clients sharing the same IP address (e.g. NAT) and it will allow other improvements to be implemented later. A drawback is that a single broken client sending interleaved requests at a high rate (without spoofing the source address) can now prevent clients on other addresses from getting interleaved responses. The total number of saved timestamps does not change. It's still determined by the clientloglimit directive. A new option may be added later if needed. The whole buffer is allocated at once, but only on first use to not waste memory on client-only configurations. |
||
---|---|---|
.. | ||
compilation | ||
kernel | ||
simulation | ||
system | ||
unit |