QLOG: Wiring: QUIC QRX: Report the datagram ID from the DEMUX

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)
This commit is contained in:
Hugo Landau 2023-09-08 11:02:32 +01:00
parent 266a827d81
commit 285a76bda0
2 changed files with 18 additions and 3 deletions

View File

@ -225,6 +225,12 @@ struct ossl_qrx_pkt_st {
* packets.
*/
uint64_t key_epoch;
/*
* This monotonically increases with each datagram received.
* It is for diagnostic use only.
*/
uint64_t datagram_id;
};
/*

View File

@ -67,6 +67,12 @@ struct rxe_st {
*/
uint64_t key_epoch;
/*
* Monotonically increases with each datagram received.
* For diagnostic use only.
*/
uint64_t datagram_id;
/*
* alloc_len allocated bytes (of which data_len bytes are valid) follow this
* structure.
@ -865,6 +871,7 @@ static int qrx_process_pkt(OSSL_QRX *qrx, QUIC_URXE *urxe,
rxe->peer = urxe->peer;
rxe->local = urxe->local;
rxe->time = urxe->time;
rxe->datagram_id = urxe->datagram_id;
/* Move RXE to pending. */
ossl_list_rxe_remove(&qrx->rx_free, rxe);
@ -1046,9 +1053,10 @@ static int qrx_process_pkt(OSSL_QRX *qrx, QUIC_URXE *urxe,
qrx->largest_pn[pn_space] = rxe->pn;
/* Copy across network addresses and RX time from URXE to RXE. */
rxe->peer = urxe->peer;
rxe->local = urxe->local;
rxe->time = urxe->time;
rxe->peer = urxe->peer;
rxe->local = urxe->local;
rxe->time = urxe->time;
rxe->datagram_id = urxe->datagram_id;
/* Move RXE to pending. */
ossl_list_rxe_remove(&qrx->rx_free, rxe);
@ -1227,6 +1235,7 @@ int ossl_qrx_read_pkt(OSSL_QRX *qrx, OSSL_QRX_PKT **ppkt)
rxe->pkt.local
= BIO_ADDR_family(&rxe->local) != AF_UNSPEC ? &rxe->local : NULL;
rxe->pkt.key_epoch = rxe->key_epoch;
rxe->pkt.datagram_id = rxe->datagram_id;
rxe->pkt.qrx = qrx;
*ppkt = &rxe->pkt;