From: Hugo Landau Date: Fri, 8 Sep 2023 12:30:56 +0000 (+0100) Subject: QLOG: Wiring: QUIC FIFD X-Git-Tag: openssl-3.3.0-alpha1~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e5287803972de26d0ccbb912bf26e4fd42e39e1;p=thirdparty%2Fopenssl.git QLOG: Wiring: QUIC FIFD Reviewed-by: Matt Caswell Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/22037) --- diff --git a/include/internal/quic_fifd.h b/include/internal/quic_fifd.h index a260ec4471d..1271bd5bc49 100644 --- a/include/internal/quic_fifd.h +++ b/include/internal/quic_fifd.h @@ -16,6 +16,7 @@ # include "internal/quic_ackm.h" # include "internal/quic_txpim.h" # include "internal/quic_stream.h" +# include "internal/qlog.h" # ifndef OPENSSL_NO_QUIC @@ -45,6 +46,7 @@ struct quic_fifd_st { void (*sstream_updated)(uint64_t stream_id, void *arg); void *sstream_updated_arg; + QLOG *qlog; }; int ossl_quic_fifd_init(QUIC_FIFD *fifd, @@ -69,7 +71,8 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd, void *confirm_frame_arg, void (*sstream_updated)(uint64_t stream_id, void *arg), - void *sstream_updated_arg); + void *sstream_updated_arg, + QLOG *qlog); void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */ diff --git a/include/internal/quic_txp.h b/include/internal/quic_txp.h index 7c00c414193..6f1debb1d99 100644 --- a/include/internal/quic_txp.h +++ b/include/internal/quic_txp.h @@ -21,6 +21,7 @@ # include "internal/quic_fc.h" # include "internal/bio_addr.h" # include "internal/time.h" +# include "internal/qlog.h" # ifndef OPENSSL_NO_QUIC @@ -49,6 +50,7 @@ typedef struct ossl_quic_tx_packetiser_args_st { OSSL_CC_DATA *cc_data; /* QUIC Congestion Controller Instance */ OSSL_TIME (*now)(void *arg); /* Callback to get current time. */ void *now_arg; + QLOG *qlog; /* Optional QLOG instance */ /* * Injected dependencies - crypto streams. diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index 9e8f30bf1eb..2b1838bb912 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -262,6 +262,7 @@ static int ch_init(QUIC_CHANNEL *ch) txp_args.cc_data = ch->cc_data; txp_args.now = get_time; txp_args.now_arg = ch; + txp_args.qlog = ch_get_qlog(ch); for (pn_space = QUIC_PN_SPACE_INITIAL; pn_space < QUIC_PN_SPACE_NUM; ++pn_space) { ch->crypto_send[pn_space] = ossl_quic_sstream_new(INIT_CRYPTO_SEND_BUF_LEN); diff --git a/ssl/quic/quic_fifd.c b/ssl/quic/quic_fifd.c index a3dd1db978a..14ae8f07baa 100644 --- a/ssl/quic/quic_fifd.c +++ b/ssl/quic/quic_fifd.c @@ -34,7 +34,8 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd, void *confirm_frame_arg, void (*sstream_updated)(uint64_t stream_id, void *arg), - void *sstream_updated_arg) + void *sstream_updated_arg, + QLOG *qlog) { if (cfq == NULL || ackm == NULL || txpim == NULL || get_sstream_by_id == NULL || regen_frame == NULL) @@ -51,6 +52,7 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd, fifd->confirm_frame_arg = confirm_frame_arg; fifd->sstream_updated = sstream_updated; fifd->sstream_updated_arg = sstream_updated_arg; + fifd->qlog = qlog; return 1; } diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c index f26f1e81a1b..b18f8c0e38e 100644 --- a/ssl/quic/quic_txp.c +++ b/ssl/quic/quic_txp.c @@ -481,7 +481,8 @@ OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETIS get_sstream_by_id, txp, on_regen_notify, txp, on_confirm_notify, txp, - on_sstream_updated, txp)) { + on_sstream_updated, txp, + args->qlog)) { OPENSSL_free(txp); return NULL; } diff --git a/test/quic_fifd_test.c b/test/quic_fifd_test.c index 4e0f252fa48..e560e5a253c 100644 --- a/test/quic_fifd_test.c +++ b/test/quic_fifd_test.c @@ -338,7 +338,8 @@ static int test_fifd(int idx) get_sstream_by_id, NULL, regen_frame, NULL, confirm_frame, NULL, - sstream_updated, NULL))) + sstream_updated, NULL, + NULL))) goto err; for (i = 0; i < OSSL_NELEM(info.sstream); ++i)