MINOR: quic: remove ODCID dedicated tree
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 3 Apr 2023 16:50:58 +0000 (18:50 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 5 Apr 2023 09:07:01 +0000 (11:07 +0200)
commit2c98209c1c807d378c303cc65299a74730b3809a
tree46f414868038f6d061d9e7f3e418630a81aec5a4
parent162baaff7ab761c411800f4ca6bef45315d7afcb
MINOR: quic: remove ODCID dedicated tree

First connection CID generation has been altered. It is now directly
derived from client ODCID since previous commit :
  commit 162baaff7ab761c411800f4ca6bef45315d7afcb
  MINOR: quic: derive first DCID from client ODCID

This patch removes the ODCID tree which is now unneeded. On connection
lookup via CID, if a DCID is not found the hash derivation is performed
for an INITIAL/0-RTT packet only. In case a client has used multiple
times an ODCID, this will allow to retrieve our generated DCID in the
CID tree without storing the ODCID node.

The impact of this two combined patch is that it may improve slightly
haproxy memory footprint by removing a tree node from quic_conn
structure. The cpu calculation induced by hash derivation should only be
performed only a few times per connection as the client will start to
use our generated CID as soon as it received it.

This should be backported up to 2.7.
include/haproxy/quic_conn-t.h
src/proto_quic.c
src/quic_conn.c