Re: [PATCH net-next v8 07/15] quic: add connection id management
Paolo Abeni <[email protected]> Thu, 29 Jan 2026 13:33:11 +0100
| Newsgroups | dev.linux.lists.quic,dev.linux.lists.kernel-tls-handshake,org.kernel.vger.linux-cifs,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 1/26/26 3:51 PM, Xin Long wrote: > This patch introduces 'struct quic_conn_id_set' for managing Connection > IDs (CIDs), which are represented by 'struct quic_source_conn_id' > and 'struct quic_dest_conn_id'. > > It provides helpers to add and remove CIDs from the set, and handles > insertion of source CIDs into the global connection ID hash table > when necessary. > > - quic_conn_id_add(): Add a new Connection ID to the set, and inserts > it to conn_id hash table if it is a source conn_id. > > - quic_conn_id_remove(): Remove connection IDs the set with sequence > numbers less than or equal to a number. > > It also adds utilities to look up CIDs by value or sequence number, > search the global hash table for incoming packets, and check for > stateless reset tokens among destination CIDs. These functions are > essential for RX path connection lookup and stateless reset processing. > > - quic_conn_id_find(): Find a Connection ID in the set by seq number. > > - quic_conn_id_lookup(): Lookup a Connection ID from global hash table > using the ID value, typically used for socket lookup on the RX path. > > - quic_conn_id_token_exists(): Check if a stateless reset token exists > in any dest Connection ID (used during stateless reset processing). > > Note source/dest conn_id set is per socket, the operations on it are > always pretected by the sock lock. > > Signed-off-by: Xin Long <[email protected]> Acked-by: Paolo Abeni <[email protected]>