QUIC CHANNEL: Optimise struct packing
authorHugo Landau <hlandau@openssl.org>
Wed, 7 Feb 2024 08:49:30 +0000 (08:49 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 8 Feb 2024 16:50:01 +0000 (16:50 +0000)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23360)

doc/man3/SSL_get_value_uint.pod
ssl/quic/quic_channel_local.h

index 69652bec9a670f8670cc001b103f8ce847f2e443..4d342ceebbf71e683fcc62d829e342d468635277 100644 (file)
@@ -77,7 +77,7 @@ SSL_get_generic_value_uint() and SSL_set_generic_value_uint() for brevity.
 
 Values in this class are read-write, and represent what the local party is
 requesting during feature negotiation. Such a request will not necessarily be
-honoured; see B<SSL_VALUE_CLASS_FEATURE_NEOGTIATED>.
+honoured; see B<SSL_VALUE_CLASS_FEATURE_NEGOTIATED>.
 
 A value in this class may become read-only in certain circumstances; for
 example, after a connection has been established, for a value which cannot be
@@ -100,7 +100,7 @@ SSL_get_feature_peer_request_uint() for brevity.
 =item B<SSL_VALUE_CLASS_FEATURE_NEGOTIATED>
 
 Values in this value class are read-only, and represent the value which was
-actually negotated based on both local and peer input during feature
+actually negotiated based on both local and peer input during feature
 negotiation. This is the effective value in actual use.
 
 Attempting to read a value in this class will generally fail if the feature
index 88122f04358fe8f964615fd843263c97e77d1ec7..16d96ef7d995a3966aeeffc40808a663d99acba5 100644 (file)
@@ -119,6 +119,9 @@ struct quic_channel_st {
      */
     QUIC_CONN_ID                    retry_scid;
 
+    /* Server only: The DCID we currently expect the peer to use to talk to us. */
+    QUIC_CONN_ID                    cur_local_cid;
+
     /*
      * The DCID we currently use to talk to the peer and its sequence num.
      */
@@ -126,9 +129,6 @@ struct quic_channel_st {
     uint64_t                        cur_remote_seq_num;
     uint64_t                        cur_retire_prior_to;
 
-    /* Server only: The DCID we currently expect the peer to use to talk to us. */
-    QUIC_CONN_ID                    cur_local_cid;
-
     /* Transport parameter values we send to our peer. */
     uint64_t                        tx_init_max_stream_data_bidi_local;
     uint64_t                        tx_init_max_stream_data_bidi_remote;
@@ -142,6 +142,9 @@ struct quic_channel_st {
     uint64_t                        rx_max_ack_delay; /* ms */
     unsigned char                   rx_ack_delay_exp;
 
+    /* Diagnostic counters for testing purposes only. May roll over. */
+    uint16_t                        diag_num_rx_ack; /* Number of ACK frames received */
+
     /*
      * Temporary staging area to store information about the incoming packet we
      * are currently processing.
@@ -201,9 +204,6 @@ struct quic_channel_st {
      */
     uint64_t                        txku_threshold_override;
 
-    /* Diagnostic counters for testing purposes only. May roll over. */
-    uint16_t                        diag_num_rx_ack; /* Number of ACK frames received */
-
     /* Valid if we are in the TERMINATING or TERMINATED states. */
     QUIC_TERMINATE_CAUSE            terminate_cause;