From fdd60dacc436b68229139a1c1f95d0dbc8bee315 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Tue, 19 Dec 2023 15:10:43 +0000 Subject: [PATCH] Minor updates Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22674) --- include/internal/quic_engine.h | 12 ++++++++---- ssl/quic/quic_engine.c | 1 - ssl/quic/quic_engine_local.h | 4 ++-- ssl/quic/quic_port_local.h | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/internal/quic_engine.h b/include/internal/quic_engine.h index a08f76e53f..5d06d076b9 100644 --- a/include/internal/quic_engine.h +++ b/include/internal/quic_engine.h @@ -28,7 +28,11 @@ * represents a single QUIC connection. All QUIC_PORT instances must belong * to a QUIC_ENGINE. * - * A QUIC engine is the root engine in a QUIC event domain, and is responsible + * TODO(QUIC SERVER): Currently a QUIC_PORT belongs to a single QUIC_CHANNEL. + * This will cease to be the case once connection migration and/or multipath is + * implemented, so in future a channel might be associated with multiple ports. + * + * A QUIC engine is the root object in a QUIC event domain, and is responsible * for managing event processing for all QUIC ports and channels (e.g. timeouts, * clock management, the QUIC_REACTOR instance, etc.). */ @@ -37,9 +41,9 @@ typedef struct quic_engine_args_st { const char *propq; /* - * This must be a mutex the lifetime of which will exceed that of the port - * and all channels. The instantiator of the port is responsible for - * providing a mutex as this makes it easier to handle instantiation and + * This must be a mutex the lifetime of which will exceed that of the engine + * and all ports and channels. The instantiator of the engine is responsible + * for providing a mutex as this makes it easier to handle instantiation and * teardown of channels in situations potentially requiring locking. * * Note that this is a MUTEX not a RWLOCK as it needs to be an OS mutex for diff --git a/ssl/quic/quic_engine.c b/ssl/quic/quic_engine.c index 9f881b3cc4..3bcb5d6810 100644 --- a/ssl/quic/quic_engine.c +++ b/ssl/quic/quic_engine.c @@ -65,7 +65,6 @@ static void qeng_cleanup(QUIC_ENGINE *qeng) } QUIC_REACTOR *ossl_quic_engine_get0_reactor(QUIC_ENGINE *qeng) - { return &qeng->rtor; } diff --git a/ssl/quic/quic_engine_local.h b/ssl/quic/quic_engine_local.h index 214cc5e5fe..280fd31dd7 100644 --- a/ssl/quic/quic_engine_local.h +++ b/ssl/quic/quic_engine_local.h @@ -35,8 +35,8 @@ struct quic_engine_st { /* * Master synchronisation mutex for the entire QUIC event domain. Used for * thread assisted mode synchronisation. We don't own this; the instantiator - * of the port passes it to us and is responsible for freeing it after port - * destruction. + * of the engine passes it to us and is responsible for freeing it after + * engine destruction. */ CRYPTO_MUTEX *mutex; diff --git a/ssl/quic/quic_port_local.h b/ssl/quic/quic_port_local.h index f44352a893..b5e1206368 100644 --- a/ssl/quic/quic_port_local.h +++ b/ssl/quic/quic_port_local.h @@ -45,8 +45,8 @@ struct quic_port_st { QUIC_ENGINE *engine; /* - * QUIC_ENGINE keeps the channels which belong to it on a list for - * bookkeeping purposes. + * QUIC_ENGINE keeps the ports which belong to it on a list for bookkeeping + * purposes. */ OSSL_LIST_MEMBER(port, QUIC_PORT);